If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Newbie question about design of a table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-20-04, 19:03
Guillius Guillius is offline
Registered User
 
Join Date: Jul 2004
Posts: 1
Newbie question about design of a table

I have heard that if a field is going to repeat itself multiple times in 1 table that it then should get its own table. Example:

I have been using a "book collection" as practice to understand database concepts and relationships. I have a book collection and if in one table I put the tittle, author, isbn, edition (hardcore/soft), read/unread (if I read it yet), topic (horror, fantasy etc..)

Now lets say thats all the fields I care to have on my database... am I right to think that the following should have their own tables?

Authors
Edition
Read/Unread


Or, is there more or less? Thx for any help.
Reply With Quote
  #2 (permalink)  
Old 07-20-04, 21:46
r123456 r123456 is offline
Registered User
 
Join Date: Sep 2003
Location: The extremely Royal borough of Kensington, London
Posts: 778
Hi,

In many cases yes. However, there are situations when value checking can be accomplished through other means such as a check constraint. In your case I would create a new table for 'authors' and 'edition', while enforcing that the value for 'Read/Unread' is valid through a check constraint. Ofcourse, there is nothing to stop you from having a lookup table for each such field.
__________________
Bessie Braddock: Winston, you are drunk!
Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

Last edited by r123456; 07-20-04 at 21:50.
Reply With Quote
  #3 (permalink)  
Old 07-22-04, 14:06
rguy84 rguy84 is offline
Registered User
 
Join Date: Jun 2004
Location: Seattle, WA
Posts: 601
I agree with Robert. An author table would be good, especially if you have little more detail about each Author. If not you are just thinking about just having the name, think of this...Is it easier to type (copy &paste) an author 18 times or just put a number which Acess made, or EVEN a value you defined, such as first three letters of an author's first and last name?
__________________
Ryan
My Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On