4 – The Relational Data Model

Publisher Summary This chapter introduces the data models, the formal way in which data relationships are expressed to database software. The relational data model is evaluated for the first time and it is discussed what it means for a database to be relational. A relational database is a database whose logical structure is made up of nothing, but a collection of relations. It is the result of the work of one man Edgar (E. E) Codd. As far as a relational database is concerned, only three pieces of information is needed to retrieve any specific bit of data - the name of the table, the name of the column, and the primary key of the row. The item number column in the order lines relation is the same as the primary key of the item table. This indicates a one-to-many relationship between the two tables. By the same token, there is also a one-to-many relationship between the orders and order lines tables because the order number column in the order lines table is the same as the primary key of the orders table. The people responsible for developing a database schema and those who write application programs for use by technologically unsophisticated users typically have knowledge of and access to the entire schema, including direct access to the database's base tables. The relational data model therefore, includes a way to provide end users with their own window into the database, one that hides the details of the overall database design and prohibits direct access to the base tables.