Thanks Toma
these is really helpful criticism... much appreciated:
- you're using mixed case. It's best to use all lower case when working with database table and column names
easily fixed, and I'll certainly do that
- you prepend a part of the table name to each column in a table. This is completly unnecessary...
good, but I thought it would be needed to avoid possible confusion between Author First Name and Illustrator First Name etc.
Other problems
1. why is there a month and year in the books table? Why not replace it with a datetime field?
Because I want a book's publication date to appear as Jul 2002 or Oct 2002 and I didn't thinkt there was a datetime field that would result in this format display
- the relationship between books, reviews and magazines seems way too simple. There should probably be a couple of many-many join tables between them.
Mmm, I'll have to think and read around this one
- books.key[1-3] are extremly poorly named columns. Each column in a table should be named such that it's easy to recogize what the data in that column is used for.
Right, I was aware of this, and it was a bit of stopgap. The difficulty I have is that originally I was thinking of having separate tables for Fiction, Poetry, Picture Books etc. then thought it would be more sensible to have all books in one table, but to have a Category entry which could be used to sort them into Fiction, Poetry, etc. Trouble is, I need to sub-categorise, the Non-Fiction books into their subject matter, and Picture Books into different types, and was thinking of using the wild key columns to do that...
- books.category should be a foreign key to a category table.
This ives me a good lead, thanks
only one illustrator is allowed per book...that's bad form. fix it.
Same with author. Yes, someone else pointedd that out.
rating should be an average of user ratings for the book...not a fixed rating. Create a new rating table and have a foreign key to books in that table.
No. The rating will be the website not a user rating. So it WILL be fixed.
I could go on and on.....check out sql for smarties, or if that's too advanced (not being rude, but it is an advanced book)
Not being rude at all - you've correctly deduced that I'm feeling my way with this!