Database alternatives?
Asked Answered
L

5

6

I was wondering the trade-offs for using databases and what the other options were? Also, what problems are not well suited for databases?

I'm concerned with Relational Databases.

Lederhosen answered 19/11, 2009 at 7:36 Comment(4)
Web applications like Facebook, Twitter, Wikipedia are not suitable for using the database that you know of. For related articles, I recommended you to check out: highscalability.comGuido
All three of those in fact run off of MySQL.Annia
You should define the term "database" better in your question.Chilung
Sorry about the vagueness, I was just looking for an understanding of RDBMS. If there are speciality DBs that would be interesting to put in the answers. I'm trying to get a "Designing Data for Client-Server Apps 101".Lederhosen
C
8

The concept of database is very broad. I will make some simplifications in what I present here.

For some tasks, the most common database is the relational database. It's a database based on the relational model. The relational model assumes that you describe your data in rows, belonging to tables where each table has a given and fixed number of columns. You submit data on a "per row" basis, meaning that you have to provide a row in a single shot containing the data relative to all columns of your table. Every submitted row normally gets an identifier which is unique at the table level, sometimes at the database level. You can create relationships between entities in the relational database, for example by saying that a given cell in your table must refer to another table's row, so to preserve the so called "referential integrity".

This model works fine, but it's not the only one out there. In some cases, data are better organized as a tree. The filesystem is a hierarchical database. starts at a root, and everything goes under this root, in a tree like structure. Another model is the key/value pair. Sleepycat BDB is basically a store of key/value entities.

LDAP is another database which has two advantages: stores rather generic data, it's distributed by design, and it's optimized for reading.

Graph databases and triplestores allow you to store a graph and perform isomorphism search. This is typically needed if you have a very generic dataset that can encompass a broad level of description of your entities, so broad that is basically unknown. This is in clear opposition to the relational model, where you create your tables with a very precise set of columns, and you know what each column is going to contain.

Some relational column-based databases exist as well. Instead of submitting data by row, you submit them by whole column.

So, to answer your question: a database is a method to store data. Technically, even a text file is a database, although not a particularly nice one. The choice of the model behind your database is mostly relative to what is the typical needs of your application.

Setting the answer as CW as I am probably saying something strictly not correct. Feel free to edit.

Chilung answered 19/11, 2009 at 7:36 Comment(0)
S
1

This is a rather broad question, but databases are well suited for managing relational data. Alternatives would almost always imply to design your own data storage and retrieval engine, which for most standard/small applications is not worth the effort.

A typical scenario that is not well suited for a database is the storage of large amounts of data which are organized as a relatively small amount of logical files, in this case a simple filesystem-like system can be enough.

Selfimmolation answered 19/11, 2009 at 7:43 Comment(0)
G
1

Don't forget to take a look at NOSQL databases. It's pretty new technology and well suited for stuff that doesn't fit/scale in a relational database.

Gonzalo answered 19/11, 2009 at 7:47 Comment(0)
L
0
  • For search applications, full-text search engines (some of which are integrated to traditional DBMSes, but some of which are not), can be a good alternative, allowing both more features (various linguistic awareness, ability to have semi-structured data, ranking...) as well as better performance.

  • Also, I've seen applications where configuration data is stored in the database, and while this makes sense in some cases, using plain text files (or YAML, XML and such) and loading the underlying objects during initialization, may be preferable, due to the self-contained nature of such alternative, and to the ease of modifying and replicating such files.

  • A flat log file, can be a good alternative to logging to DBMS, depending on usage of course.

This said, in the last 10 years or so, the DBMS Systems, in general, have added many features, to help them handle different forms of data and different search capabilities (ex: FullText search a fore mentioned, XML, Smart storage/handling of BLOBs, powerful user-defined functions, etc.) which render them more versatile, and hence a fairly ubiquitous service. Their strength remain mainly with relational data however.

Luciferin answered 19/11, 2009 at 7:44 Comment(0)
C
0

Use a database if you have data to store and query.

Technically, most things are suited for databases. Computers are made to process data and databases are made to store them.

The only thing to consider is cost. Cost of deployment, cost of maintenance, time investment, but it will usually be worth it.

If you only need to store very simple data, flat files would be an alternative (text files).

Note: you used the generic term 'database', but there are many many different types and implementations of these.

Colotomy answered 19/11, 2009 at 7:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.