Found in 1 comment on Hacker News
crdb · 2015-04-25 · Original thread
As a non-CS grad coming fresh to databases, I found both the entity-relationship, and the object-oriented models confusing. Then I read Date [1] and Codd's [2] books and papers on the relational model, the one from the 1970s that is basically set and type theory applied to data, and found that to be a lot clearer and a more powerful abstraction to deal with your data model.

For example, your Relational Model introduction has a discussion of various data types. But arguably, whether your integer is implemented as BIGINT or TINYINT is an implementation decision which should be separate from the model discussion (dixit Date). In other words, that attribute has a type of integer and how that integer is stored is a separate issue, and your RDBMS ought to abstract it away (as, I think, Postgres is pretty good with, and MySQL quite annoying). The beauty of the latest RDBMS developments, particularly in Postgres world, is that the implementation has gotten so good that you don't need to really worry about it like you used to just a decade ago, at least in 95% of use cases.

Again as a non-"full time developer" it amazes me the number of "experienced" developers who are not aware of the relational model and who do not know what a foreign key is or why referential integrity might be important.

I think one can teach SQL (and the relational model) to a non-developer in about 2 hours, because it is so declarative and intuitive. One day I'll go write that tutorial, as many clients need it sorely...

[1] e.g. http://www.amazon.com/SQL-Relational-Theory-Write-Accurate/d...

[2] e.g. http://www.amazon.com/The-Relational-Model-Database-Manageme... or the original paper: http://www.seas.upenn.edu/~zives/03f/cis550/codd.pdf

edit to add: on the E/RM vs the RM: http://www.dbdebunk.com/2013/09/entity-relatonship-model-not...

Fresh book recommendations delivered straight to your inbox every Thursday.