What is a relational database? [closed]

I'm mostly a system administrator and I don't directly work with databases other than installing them, setting up accounts, granting privileges, and so on. I realized that if The Boss walked up to me and asked, "What is a relational database?" I probably couldn't give a satisfactory answer... I'd maybe mumble something about data being stored and organized by categories which you can query with a special programing language (i.e., SQL).

So could someone give a good "Boss Answer" for what a relational database is? And maybe how its different than just storing data on a file server? Bonus points for clever but accessible analogies and explaining tables, columns, records and fields. I'd define a "Boss Answer" as a quick one (maybe two) paragraph explanation for non-technical folks... mostly your Boss, on those rare occasions they actually ask you what it is you do all day.


Solution 1:

A relational database doesn't just store data: it stores relationships between data, and makes it easy (well, easier) to use those relationships. In the early days of relational database terminology, tables were called "relations" because they stored related bits of data (fields, now columns), along with the relationships between that relation and other relations.

Normalization is the act of un-complicating relations: "Make everything as simple as possible, but no simpler." (Alan Perlis) Sometimes "...but no simpler" means we don't store things fully normalized, because "simpler" ends up being more complex. (You can derive the state from the zip code, but why bother?)

Solution 2:

A relational database is a method of structuring data so a single fact is stored in a single place. So if John and Jane Doe both work for the same company, you would only store details unique to the company in one place(table). You would store data unique to John and Jane in another place, and you would store both John and Jane's relationship to the company in a third place. In the ideal world this should mean I only have to modify a single field/row if the company fax number changed.

Please understand that not all databases hosted in a RDBMS are properly normalized. Compromizes are made for performance and other reasons.

See the article on database normalization. http://en.wikipedia.org/wiki/Database_normalization

Solution 3:

There are two major concepts to distinguish relation database systems. The first is that relations between items are stored. That's the table model of data, explained via the spreadsheet analogy. RDBMSs get more complex than spreadsheets, because its easier and common practice to have many references between tables or worksheets (depending on which side of the analogy you're using).

The second is that RDBMSs implement the idea of a transaction, the ACID properties of

  • atomicity,
  • consistency,
  • isolation, and
  • durability

The relational model allows many complex relationships to be included, queried for, sorted on, grouped by, and so on. The transactional model makes sure that transactions happen completely or not at all, keeping the relationship model consistent and accurate. Well, at least making it possible for correct programming to keep it so.