Hi All,

Not really a MySQL-oriented question.  But this board's so active I decided to post my 
question here in hope I'll get some lights on my database design.

Using Amazon as an example, say if I have a table that stores user information and 
each user is assigned an unique id (field might look like "id int unsigned primary key 
").  What design should I go after?  Should I go for one big table with a definition 
that might look like

CREATE TABLE TransactionRecord (
user_id int unsigned,
book_id int unsigned
index(user_id),
index(book_id)
);

then just insert one row for each book bought by a particular user?  I was worrying 
that the user_id field might have a lot of repeated, identical value (one user has 
purchased many books).  The book_id will just be worse if a popular book is sold like 
500K copies.  I was thinking lots of identical value in one field will simply cancel 
out the use of index.

Do I have other design alternatives?  Shed me some lights if you can :)

I've got quite a few MySQL books on hand, but they focus on teaching readers what 
MySQL can do and how to get the most out of MySQL.  Would someone suggest a book 
that's more related to database design and preferably have some real-world scenarios 
as examples. 

Regards,

Jindo

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to