Good reasons NOT to use a relational database?

2019-01-29 15:12发布

Can you please point to alternative data storage tools and give good reasons to use them instead of good-old relational databases? In my opinion, most applications rarely use the full power of SQL--it would be interesting to see how to build an SQL-free application.

21条回答
狗以群分
2楼-- · 2019-01-29 15:40

The filesystem's prety handy for storing binary data, which never works amazingly well in relational databases.

查看更多
何必那么认真
3楼-- · 2019-01-29 15:41

There are a large number of ways to store data - even "relational databse" covers a range of alternatives from a simple library of code that manipulates a local file (or files) as if it were a relational database on a single user basis, through file based systems than can handle multiple-users to a generous selection of serious "server" based systems.

We use XML files a lot - you get well structured data, nice tools for querying same the ability to do edits if appropriate, something that's human readable and you don't then have to worry about the db engine working (or the workings of the db engine). This works well for stuff that's essentially read only (in our case more often than not generated from a db elsewhere) and also for single user systems where you can just load the data in and save it out as required - but you're creating opportunities for problems if you want multi-user editing - at least of a single file.

For us that's about it - we're either going to use something that will do SQL (MS offer a set of tools that run from a .DLL to do single user stuff all the way through to enterprise server and they all speak the same SQL (with limitations at the lower end)) or we're going to use XML as a format because (for us) the verbosity is seldom an issue.

We don't currently have to manipulate binary data in our apps so that question doesn't arise.

Murph

查看更多
The star\"
4楼-- · 2019-01-29 15:42

One might want to consider the use of an LDAP server in the place of a traditional SQL database if the application data is heavily key/value oriented and hierarchical in nature.

查看更多
成全新的幸福
5楼-- · 2019-01-29 15:42

I would offer RDBMS :) If you do not wont to have troubles with set up/administration go for SQLite. Built in RDBMS with full SQL support. It even allows you to store any type of data in any column.

Main advantage against for example log file: If you have huge one, how are you going to search in it? With SQL engine you just create index and speed up operation dramatically.

About full text search: SQLite has modules for full text search too..

Just enjoy nice standard interface to your data :)

查看更多
对你真心纯属浪费
6楼-- · 2019-01-29 15:43

Object databases are not relational databases. They can be really handy if you just want to stuff some objects in a database. They also support versioning and modify classes for objects that already exist in the database. db4o is the first one that comes to mind.

查看更多
霸刀☆藐视天下
7楼-- · 2019-01-29 15:43

Full-text databases, which can be queried with proximity operators such as "within 10 words of," etc.

Relational databases are an ideal business tool for many purposes - easy enough to understand and design, fast enough, adequate even when they aren't designed and optimized by a genius who could "use the full power," etc.

But some business purposes require full-text indexing, which relational engines either don't provide or tack on as an afterthought. In particular, the legal and medical fields have large swaths of unstructured text to store and wade through.

查看更多
登录 后发表回答