Posts

Showing posts with the label database-normalization

Designing tables layout for storing books, editions, colors

Designing tables layout for storing books, editions, colors Let's say for example that I have to organize this information: books, books editions and colors of every page. Let's assume that a book can have only one edition, and since the application is written in PHP, every table will have its set of functions to read and write on them, and I'd like to keep it simple if possible. I can't decide if it's best to do: [Books] bookid author [Editions] editionid bookid title publisher isbn [PagesColors] editionid page color or trying to simplify in: [Books] bookid bookidreference author title publisher isbn [PagesColors] bookid page color and records like this: 1, 0, "Jane Austen", null, null, null 2, 1, null, "Emma", "Books Enterprise", 12231231213 3, 1, null, "Emma in Italian", "Jane Austen Italian Editions", 45345354334 "bookidreference" would be used to link books and editions in the same table. ...