|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
The best way top design a database
Hi,
I must design a database with 2 tables. One is a Company table where I have cie name, address and so on. The second one is a Category table. Each company must be classified in at least one category. What's the best way to do this? Is it better to have a field in my Company table where I will store Category ID (remember I can have more than one category) or is it better to create an intermediate table where I will have a record for each couple Company-Category ? Thanks for your help. |
|
#2
|
|||
|
|||
|
RE: The best way top design a database
Hello lg,
I agree with the option of having another table with companies and catagories. There may be a time in the future that a company can have many categories so if you limit this in your company table you will have to do a re-write if you dont have enough space on the company table. Company table: companyID, name, other details, etc Categories table: catID, name, other details, etc CompCat table: companyID, catID Use the categories table to validate any new company records and then simpy add any new CompCat records when you like. HIH Good Luck |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > The best way top design a database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|