TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why are we so fragmented in databases options?

10 点作者 felipelalli超过 2 年前
Hello grumpy friends!<p>I have 22 years of experience in the area and I always had a huge difficulty when starting a new project: choosing a database. There are tens of thousands of options out there and every single day a new one appears here on HN. And still I can&#x27;t choose a suitable one for my case.<p>This huge fragmentation in database is much worse than the fragmentation of code languages. This fragmentation makes it difficult: migrations, common knowledge base, integration, union and selection of data, and countless other issues.<p>I imagine that the minimum qualities of a database are: immutable, ease of use in any language, performance, ease of querying and manipulating data, easy to configure, maintain and scale, lightweight, among others. Every time I go to choose a db I always come across some critical problem.<p>Why isn&#x27;t out there an ultimate general-purpose database? Which fits well for 90% of cases at least? I know my grumpy friends will tell that every case is a case. But if it had a widely used database, everyone&#x27;s lives would be easier.<p>In your opinion, is there an &quot;ultimate&quot; database? If yes, which one? If not, why?

11 条评论

twunde超过 2 年前
To make it easier to think about databases, I group them into categories<p>- SQL Databases (Mysql, Postgres, SQL Server, SQLite)<p>- JSON document stores (MongoDB, etc)<p>- In-memory key-value stores (redis, memcache)<p>- key-value stores (cassandra, etc)<p>- Graph DBs (neo4j, dgraph)<p>- Search DBs (elasticsearch, Lucene)<p>- Timeseries DBs (timescale)<p>I consider the SQL databases and the JSON document stores to be the general default databases that my applications will use 90%+ of the time. SQL databases require defining the schema ahead of time, while with document stores I can just dump data into the database and then figure out what&#x27;s needed afterwards. At this point, I usually use postgres as my go-to database since it&#x27;s open-source, well-supported and has some additional features like the ability to use json, but if you&#x27;re more familiar with a different SQL db use that instead. Most of the other database categories are specialized for specific use-cases (in-memory key-values are great for queues and caching, time-series dbs are great for metrics)<p>EDIT: <a href="https:&#x2F;&#x2F;db-engines.com&#x2F;en&#x2F;ranking" rel="nofollow">https:&#x2F;&#x2F;db-engines.com&#x2F;en&#x2F;ranking</a> currently shows 381 unique databases, which is probably a bit of an undercount but not by much.<p>I realized I didn&#x27;t answer the `Why there are so many databases` part of your question. Essentially, many companies outgrow the general-purpose databases and need databases optimized to their read-write level and data structures. Analytics tend to use columnar-databases once their data sets are in the TB+ range so that their queries return quickly.
评论 #33348076 未加载
borplk超过 2 年前
&gt; Why isn&#x27;t out there an ultimate general-purpose database? Which fits well for 90% of cases at least?<p>There is. It&#x27;s called PostgreSQL :)
评论 #33346309 未加载
gregjor超过 2 年前
Relational databases have dominated since the 1980s. You have a handful of options that differ mainly in terms of price and features. They all follow the same model and will imply the same or very similar application code. You can pay for Oracle, SQL Server, or DB&#x2F;2, or go with the free&#x2F;open source PostgreSQL or MySQL. For many applications SQLite is a good fit.<p>I don&#x27;t know about the other tens of thousands of databases out there, I certainly have never heard of that many. You have various NoSQL options from Redis to MongoDB, Cassandra, various object-oriented databases, column-oriented, document databases, etc., all of which fall into a small number of general groups that target specific applications and requirements. Unless you work on hobby projects and like to experiment I can&#x27;t think of a reason to look at hundreds or thousands of obscure databases.<p>&gt; I imagine that the minimum qualities of a database are: immutable, ease of use in any language, performance, ease of querying and manipulating data, easy to configure, maintain and scale, lightweight, among others. Every time I go to choose a db I always come across some critical problem.<p>An &quot;immutable&quot; database (read only) would have limited value. &quot;Easy&quot; describes your subjective experience and opinion, not a quality of a database. Maybe list some of the &quot;critical problems&quot; you encounter. Certainly most non-trivial applications use databases without dealing with &quot;critical&quot; problems.
评论 #33348579 未加载
PaulHoule超过 2 年前
Personally my favorite db for pet projects is<p><a href="https:&#x2F;&#x2F;www.arangodb.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.arangodb.com&#x2F;</a><p>I think you hear very little about it because ADB users see it as a &quot;secret weapon&quot; to crush their competitors with. I&#x27;ve done large ontology work (MESH and other health ontologies) and IoT work (keep several years of sensor readings for sensors in my house) and workflow systems (select interesting HN articles or jobs I want to apply to) and it has never let me down. I haven&#x27;t run a real instance serving customers in the cloud though.<p>For the last few years every eng manager I have worked with has been a fan of<p><a href="https:&#x2F;&#x2F;www.postgresql.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.postgresql.org&#x2F;</a><p>In the early 2000s I thought it overpromised and underdelivered and called it CrashGreSlow but after MySQL got bought by Oracle the pgsql team has worked hard to improve it I think it is great today. It supports all kinds of advanced features such as stored procs, full-text search, JSON equivalent fields, etc.
jstx1超过 2 年前
&gt; There are tens of thousands of options out there and every single day a new one appears here on HN.<p>Not really, realistically you have a handful of options for every use case unless you&#x27;re deliberately picking really obscure stuff for the sake of it.<p>&gt; Why isn&#x27;t out there an ultimate general-purpose database?<p>Because:<p>1. There&#x27;s many good solutions that all work well especially if we&#x27;re talking about general purpose.<p>2. Still not everything works for every use case.<p>3. It&#x27;s healthy to have options to pick from.
redwood超过 2 年前
IMO the one real way for an &quot;ultimate&quot; to emerge is for it to be able to do a lot of heavy lifting for you: and that basically means it has to be a managed cloud service. It&#x27;s just not going to be reasonable in pure software to service the vast majority of the needs of the vast majority of your applications. But in the cloud with managed services the possibility space changes massively
BerislavLopac超过 2 年前
&quot;I have 22 years of experience in the area of woodworking, and I always had a huge difficulty when starting a new project: choosing a tool. Do I need a chisel? Or a hammer? Or should I go for a screwdriver?&quot;<p>Databases are tools like any others, and you choose them based on what you actually need for any specific time. In fact, many projects already use multiple databases - storing dynamic state in a RDBM, and static resources in the filesystem (which is absolutely a database).<p>Of course, there are other criteria involved, like e.g. the familiarity of the team with different database paradigms, but the core fact stays the same: database is a means to an end, which can be summarized as &quot;finding a solution for persistent storage of some data&quot;.
gregjor超过 2 年前
Rather than throwing out nonsense like &quot;tens of thousands of options&quot; and &quot;I always come across some critical problem&quot; why don&#x27;t you describe your requirements and list some of those &quot;critical problems&quot; that seem to uniquely afflict your work, whatever that is.<p>Your actual question doesn&#x27;t have an answer. No such thing as an &quot;ultimate&quot; database for the same reason we can&#x27;t objectively agree on the &quot;ultimate&quot; car or the &quot;ultimate&quot; food, or programming language, or anything else. It always comes down to <i>it depends on the requirements.</i>
评论 #33355090 未加载
codegeek超过 2 年前
I was just talking to someone today. If in doubt, just start with Postgres. Lowest hanging fruit if you are just getting started. Don&#x27;t overthink it. Remember I said if in doubt. If you already know, then sure go ahead choose whatever you like. 99.9% of cases don&#x27;t need anything beyond a decently hosted Postgres instance.
muzani超过 2 年前
Flipping the question around, it sounds like with 22 years of experience and tens of thousands of options, you should be the one educating us. I&#x27;d say for most folk around here, they only know about 1-8 options.
endisneigh超过 2 年前
I wonder this every day.<p>I’ve settled on:<p>-CockroachDB for relational -FoundationDB for key value<p>I’m currently looking for a full search text engine that supports pluggable storage so I can have FDB be the backing store.