Tuesday, February 10, 2015

B5 - Grioup A - Relational Database Theory - Schwakoff

We run into databases every day in our daily lives, whether it’s using online banking, ordering something online, checking our grades, signing up for new courses, etc. (Silberschatz). However this is the first I’ve been exposed to the “under the hood” workings of databases. I had always thought of them as simply tables that contain some data such as you may see in an excel file. In a way I was correct, but it turns out that they are much more complex than that. This simplistic view of databases didn’t consider ease of accessing information. Databases can contain immense amounts of data, and for this reason there has been a lot of research going back to the 1960’s looking into the best way to structure this data and make it easily accessible. And this is where the idea of the relational database developed.

In 1970, Edgar F. Codd presented the idea that information stored in a database could be accessed without knowing how the information was structured or where it resided in the database (Boyce et al.). Until then, acquiring data from a large database was difficult and often required specialists. But what Codd proposed was letting the computer figure out where and how the information is stored and how to retrieve it (Boyce et al.). “His idea was that relationships between data items should be based on the item’s values, and not on separately specified linking or nesting,” said IBM’s Don Chamberlin.

What does this all mean though? To put it simply, data is organized into tables, where rows are new instances (tuples) of an object and columns contain information about, or attributes of, that instance. This struck me as very similar to object oriented programming, in which a class acts as a blueprint for an object and each new object created from the class can take on its own attributes while still being a member of that class. This uniformity is one of the biggest advantages of the relational model (Maier).

To elaborate a bit more, the columns are tagged according to the type of attribute they contain and each column has a distinct set of allowable values. This set is called the attribute’s domain (Maier). I immediately thought about functions in mathematics that describe the permissible values that can be input to the function. One of the column labels is the key, which contains different values for each tuple to distinguish it from all other instances. Where do the relations come in though? Wikipedia describes the relation as “the whole set of tuples that have the same attributes”. Note that the attribute values mustn’t be the same, each row must just provide information under the same column labels. To put it more simply, the relation is really just the table. The tuples and attributes do not need a specific order in the relational model. Applications retrieve data via requests using operations such as ‘select’ to identify tuples, ‘project’ to identify tuples, and ‘join’ to combine relations (Wikipedia).

The software created for these databases is known as a Relational Database Management System (Wikipedia). The most popular language used for querying is structured query language (SQL).

References

Boyce et al. “Icons of Progress: Relational Database.” IBM.

Maier, David. “The Theory of Relational Databases.” 1983

Silberschatz, Korth. Sudarshan. “Database System Concepts.” 6th Edition. 2010

Wikipedia



Comments



Stephens – I think you did a great job keeping it short and right to the point. I was having trouble conceptualizing how exactly relational databases were different than those before it and you summed that up pretty well for me. I had kind of gotten that relations and tables were synonymous from my reading but you do make a good point. I’ll have to look further into that. 




Lee – I read your blog because I became curious about SQL in doing research for relational databases. You very clearly illustrated the basics of SQL. I think I have a good overview of how SQL works just from your write up.  




Amegan – After reading your entry I think I was a bit mistaken in my comparison of relational databases to object oriented programming. I was originally under the impression that relational databases were object oriented databases but your blog has enlightened me to their differences.

No comments:

Post a Comment