Database alternatives?

11,555

Solution 1

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.

Solution 2

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.

Solution 3

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.

Share:
11,555
prafulfillment
Author by

prafulfillment

Interested in building tech companies.

Updated on June 16, 2022

Comments

  • prafulfillment
    prafulfillment about 2 years

    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.