Thursday, February 9, 2017

Maissoun Ksara - B5: Weekly Post

Relational Database Theory

To understand a relational database, the following quote sums it up nicely:

“More accurately, the relational model is based on predicate logic and set theory. You have sets of statements of fact, and the underlying system can determine new sets of facts from those. For efficiency, you have to organize those facts into groups that share the same structure (names and associated type domains), and in practice your ability to draw conclusions is limited by the system's command language (SQL poorly implements predicate logic and set theory; and the database doesn't do much of your thinking for you). The real power comes from your complete control over determining new facts. All relationships between facts are explicit in the database, and the command language can use and manipulate them. The mathematics behind the model make this manipulation feasible.”

A collection of related files are the components that make up a database. These files can be related in different ways, such as the hierarchical model and the network model. In the hierarchical model, files are known as parent or child files. Child files can have a maximum of one parent file. Files in the network model are related as owners and members, where in contrast to the hierarchical model, member files can have multiple owners. Files are related by having a common characteristic. An example of a relational database is shown in Figure-1 below, given by Database Journal.


Figure-1: Relational Database Example Featuring Poems and Poets

From the figure above, these two tables are related. The code field is related to the poet table, and the poet field is related to the poem table. We can tell who wrote the poem “Wakening Night”, which is Poet 1, and we know Poet 1 is Mongane Afrika from the Poet table.

Using tables, the data can be moved around and assembled in various ways. It uses structured query language (SQL), a programming language used to manage relational databases. This can be used to update, delete, add rows of data and getting data from a database. These queries are in the form of statements. An example of such queries is shown in Figure-2, as shown in SearchSQLServer.

 

Figure-2: Example of SQL code

The syntax shown in the figure shows how statements are written to modify a database.

Relational databases have several issues, however, dealing with Big Data management. It was discussed that relational databases are not as efficient. They do not scale well to large sizes or handle data that comes in different formats. Today data can be extremely large, and relational databases don’t work well with that because they are not designed to run on multiple servers. To remedy this, expensive hardware must be purchased to be able to process the extra data, power, and memory. Another problem that was discussed is the use of SQL, and the difficulty of using several queries.

The use of NoSQL instead of SQL is a movement used to counter this issue. NoSQL is designed for large scale (TB instead of GB) and run on multiple servers. The elasticity of NoSQL is a large selling point and

Comments:

Brennan C.: I think it's very helpful how you've differentiated between databases in your first paragraph. It helps clear up some confusion and distinguish between OODB and relational databases. It seems like relational databases use more of a tabular format while OODB are object based. I didn't know that OODB don't use SQL. I'm still a bit confused about the "document" storage for OODB and wonder how that works!

Paulina G.: I like how you went over DDL and DML. I've never heard of those languages before (I'm a newbie when it comes to databases) and the overview of these languages is helpful for someone like me. The image is helpful and shows how the SQL language is structured. Knowing several terms like varchar and null is necessary for creating databases and I think it's important that you went over and explained what they meant. I'm not sure what is meant by "filtering" though, and that is something I should work on.

Ronald P.: I agree that managing databases is important in all industries, not just design ones. Data is the basis of everything, and knowing how to store the information and using it later is essential for a successful firm. I think its really helpful how you've outlined the four main components of database management and I do agree that data, hardware, software, and people make up the essence of it.

References:



2 comments:

  1. Maissoun,
    I appreciated the relational database example and the images that went along with them. I wrote my whole post on SQL, the language that interacts with relational databases, without fully knowing what a relational database was. I found myself wondering what the "relational" part of the term meant and how it was actually implemented. The simple example of poets and their works related using a numbered code allowed me to understand the term, and gave me an idea of how relational databases such as the one in the example would become complex as they scale up.

    ReplyDelete
  2. Again, like the others your images and examples were particularly helpful in explaining the Relational Database Theory. I had one question though. If they relate existing data with each other, why do you say it is not efficient? Doesn’t the fact that it can relate to other data make it more helpful?

    ReplyDelete

Note: Only a member of this blog may post a comment.