Jul 12


Today I am continuing a series of posts in which I will be reviewing some of the books which are related to the development of quality software. They may be specific to a certain technology or a software development methodology.



I’ve chosen to continue this series with Database in Depth: Relational Theory for Practitioners (amazon affiliate link) by C. J. Date. The target audience of this book is experienced database practitioners, not novices. If you’ve been involved with writing lots of SQL and DDL, then I believe the book is aimed at you. It explains the basic principles of relational theory in depth. The book is completely independent of any particular products and the SQL standard. One of the fascinating aspects of the book is the revelation of how few (if any) commercial database products truly implement the relational theory.

The author C. J. Date, worked closely with the E.F. Codd (inventor of the relational model), strongly influenced the development of database technology, and is considered to be a master in the field. For such an theoretical book, I found his writing style to be very lucid.

Theory discussed includes relations, types, tuples, relational variables, relational algebra and database design theory. One of the most applicable sections is the discussion of normalization. Another principle that I have taken to heart is the prohibitions of nulls. What is a method of implementing this principle? Well here is one. First suppose you have the following situation:

User
id username hair
1 user1 black
2 user2 NULL

To avoid the NULL in the table, you can design the schema to be like the following:

Table 1:

User
id username
1 user1
2 user2

Table 2:

User Hair Color
user_id hair
1 black

By breaking up the original table into two tables we have avoided the use of NULLS. Complimenting this approach to database design is the use of OUTER JOINs in SQL.

If you want to become a better developer, I recommend reading Database in Depth: Relational Theory for Practitioners (amazon affiliate link).

Related Posts

Leave a Reply

preload preload preload