View Single Post
Old 01-05-2013, 11:17 AM   #8
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by ixtab View Post
For the technically inclined: Think of the book <-> collection relation as an n:m relation in a database. And - guess what - that's exactly what it (logically) is in the underlying SQLite database. Except that the people who implemented it might want to revisit their cs1xx course material (Introduction to Databases), because they must have been in a coma during the normalization part of the lecture. The database actually does it in the worst possible way for an n:m relation, namely using NF˛ at both ends of the relation.
Probably more robust, though, than using the technically "better" solution of a link table. Link tables are prone to getting broken if things go awry. Performance is probably also better, because you can do queries without (or with fewer) table joins. A lot of my "day job" work is with databases, and we often end up with a certain degree of denormalisation for both the reasons I've mentioned.

Last edited by HarryT; 01-05-2013 at 11:21 AM.
HarryT is offline   Reply With Quote