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 > Can one table become 1-1 2 or 3 tables???

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-05-06, 16:06
archVille archVille is offline
Registered User
 
Join Date: Nov 2005
Posts: 40
Can one table become 1-1 2 or 3 tables???

I have one table : country (name , population,capital,capital_stat1 , area , second_name , bla , bla , bla ... )

can this table become 2 tables 1-1 like :
country ( name , population , area , second_name , .... bla bla )
capitals ( name , capital_stat1 , other_referring_capital )

If this is right , is possible the 2 tables become just one again or is one of these ways wrong ??? Does the effieciency counts more in the 1st or 2nd???

Thanx
Reply With Quote
  #2 (permalink)  
Old 01-05-06, 16:51
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Splitting one table into 2 or more tables is perfectly valid - it is called "vertical partioning". Whether it confers any benefits depends on your specific DBMS and needs. If there are 200 columns but you only want some 5 of them most of the time, then it may be more efficient to break them out into a separate table. But then again, you'll have to join those 2 tables back together for some queries, which may be less efficient. You'll have to try it out to see what works best for you.
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old 01-06-06, 10:50
urquel urquel is offline
Registered User
 
Join Date: Aug 2004
Posts: 330
You will also want to consider cardinality. Can a country have more than one capital? (South Africa has 3 - Bloemfontein, Cape Town, and Pretoria)
Reply With Quote
  #4 (permalink)  
Old 01-07-06, 06:02
archVille archVille is offline
Registered User
 
Join Date: Nov 2005
Posts: 40
checked

Yes , off course i have checked that because if i have 1 country with more than one capital then i would have a 1-N relationship.
What if i have two 1-1 tables country(....) and capitals(...)
and country has 50 records and capitals only 20 records??? This is the same if i had country with these 20 records having their capital and all the other would have capital = null ????
Is it correct???
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