redverse22
New member
- Local time
- Today, 10:21
- Joined
- May 6, 2012
- Messages
- 7
Hi
I am designing a database for a bookstore.
Customer can place and order
Customers can leave a review for a books in catalogue but can only leave 1 review per book
Books will be defined in one genre only
For this example a book will be written by one author ( I know really you would need a new table as technically it be a M:M relationship)
Books can de defined by author, genre and publisher.
All cardinality be 1:M
I have the following tables
Customer - details
Order details - customer id and book id posted as FK + details for order
Author - author details
Publisher - publisher details
Genre - details
Book Table - with Author/Publiser and Genre posted as FK + details
Review table - Book id and customer id posted as FK. + details
I think the tables are all in 3NF but I just feel from looking at it, my UML diagram is wrong. After tying myself in confusion and knots trying to figure out if it is all right.
Advice if I am correct or totally wrong be appreciated. Thanks
I am designing a database for a bookstore.
Customer can place and order
Customers can leave a review for a books in catalogue but can only leave 1 review per book
Books will be defined in one genre only
For this example a book will be written by one author ( I know really you would need a new table as technically it be a M:M relationship)
Books can de defined by author, genre and publisher.
All cardinality be 1:M
I have the following tables
Customer - details
Order details - customer id and book id posted as FK + details for order
Author - author details
Publisher - publisher details
Genre - details
Book Table - with Author/Publiser and Genre posted as FK + details
Review table - Book id and customer id posted as FK. + details
I think the tables are all in 3NF but I just feel from looking at it, my UML diagram is wrong. After tying myself in confusion and knots trying to figure out if it is all right.
Advice if I am correct or totally wrong be appreciated. Thanks