HOMERESUMEWIRELESSCHESSJAYSONSTARNIXLINUXLINUXPREVIOUS
 » Relational Database Management Systems

Here's a quick test of your database knowledge for fun, the answers are below:
1) Is a flat file flat?
2) How is a relational database relational?
3) If it's not a relational database...what is it?
4) Can you have an RDB without the MS?
5) What is a foreign key?

There, that should have gotten you into the proper analytical mode for this section. It's interesting to note how many people think a database is synonomous with a relational database. After all, if it's not a relational database...what is it? Let's cover a short history, to make sure that we are all on the same footing.

Long ago when the Cro-magnons battled the Neanderthals for programming supremecy, they kept data in files...just like a sheet of paper. They called these data containers flat files. The reasons why this is called a flat file as opposed to a file like it is or a database like it is are sketchy at best. There is absolutely nothing wrong with this type of database for small uses and it continues to exist and flourish. I would argue that it is the most common of all databases today and that it will remain so for many years if ever being displaced. But I would probably bore you.

Databases migrated from the simple file system into hierarchical databases. This is a simple way of creating a parent and going down the tree to the children which contain the record you are looking for. For example, President->VP->AVP->Sales_Figures. This creates a one way relationship with the data...as long as you start at the top then you have no problem finding the data. Soon it was discovered that if there were multiple levels on the hierachy, say AVP and Region (President->VP->AVP||Region->Sales_Figures) that you would experience great pain when someone asked for the Sales Figures from a Region where the AVP names are [yada, yada, yada]. This multiple hierarchy created many headaches, the solution to which is the network database.

Network databases traverse these n-dimensional hierarchical trees very quickly. So quickly that many large corporations use them today and don't even bother to look at the shiny, new RDBMS's that are becoming a standard among the people. Relational databases were created more out of a demand for simplicity and mass market appeal more than a need for speed. Relational databases success truly came out concurrently with the advent of the new language for data access called SQL. Are RDBMS's better? Well, they are certainly better marketed than any other database, but they are also certainly not the last step in the evolution for primary model for data access. To push us completely into the present, we need to discuss OODS or Object-oriented databases.

Database terminology can be confusing, here are some translations:

  • Tables = File
  • Row = Record
  • Field = Column
  • Trigger = Event

    Answers to the question 1) Who knows...email me if you think you have the answer. Typically, flat data is data that is stripped of all odd characteristics and tags. To be truly flat, a flat file would have to eliminate all carriage returns and line feeds.
    2) It isn't. Well, not in the normal sense, the relations only exist in a mathematical sense in that a relation is an unordered set. That's it. Any relations created between the data are usually done with a JOIN command using SQL. SQL, although great for use with databases, is independent of a database. To nitpick, the tables in an "RDB" are actually ordered in some way and this eliminates them from the mathematical definition of "relation", too.
    3) Look above.
    4) Still a pet question of mine.
    5) It's a field (column) that creates a nice easy way for you to JOIN tables.