I'm currently starting a new project that lets the user add books to a database to create their own miniature library. I've got a rough draft design for the database and would like some opinions. I tried to think of everything with the database that way the program could be used by both an home user or by a business. Here's what I have currently:
book table
bookID - int, autoincrement, PK, FK -> user.bookID & booksCheckOut.bookID
title - varchar(100), FK - > user.title(plus number which is determined programmatically) & booksCheckedOut.title
author - varchar(50), FK -> booksCheckedOut.author
subject - int
isbn10 - varchar(10), FK -> user.isbn10 (plus number)
isbn13 - varchar(13), FK -> user.isbn13 (plus number)
quantity - int
quantityInLibrary - int
quantityCheckOut - int
summary - varchar(1000)
user table
userID - int, autoincrement, PK
name - varchar(50)
bookID1 - int, FK
bookTitle1 - varchar(100), FK
isbn10_1 - varchar(10), FK
isbn13_1 - varchar(13), FK
bookID2 - int, FK
bookTitle2 - varchar(100), FK
isbn10_2 - varchar(10), FK
isbn13_2 - varchar(13), FK
bookID_3 - int, FK
bookTitle3 - varchar(100), FK
isbn10_3 - varchar(10), FK
isbn13_3 - varchar(13), FK
booksCheckedOut table
checkedOutID - int, autoincrement, PK
userID - int, FK
name - varchar(50), FK
bookID - int, FK
title - varchar(100), FK
author - varchar(50), FK
isbn10 - varchar(10), FK
isbn13 - varchar(13), FK
Opinions?
P.S. The book information in the user table is so if someone wants to lend a book out to someone else when they view the persons information it will display the 3 most recent books removed from the library.
This post has been edited by RandomlyKnighted: 19 June 2012 - 11:42 PM

New Topic/Question
Reply




MultiQuote






|