| | |
Database Design Question
Please support our Database Design advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Apr 2009
Posts: 13
Reputation:
Solved Threads: 1
Hello everyone,
I have a fairly simple question about database design. I have a database for county voting equipment. Each county has multiple pieces of voting equipment. I currently have two tables, one with counties and one with voting equipment. Is there any reason to have a relational table between them or is it sufficient to have a county ID field in the equipment table and link them that way. Is there any pro to having a intermediate table between counties and equipment? Any drawback with linking them directly?
Thanks in advance.
I have a fairly simple question about database design. I have a database for county voting equipment. Each county has multiple pieces of voting equipment. I currently have two tables, one with counties and one with voting equipment. Is there any reason to have a relational table between them or is it sufficient to have a county ID field in the equipment table and link them that way. Is there any pro to having a intermediate table between counties and equipment? Any drawback with linking them directly?
Thanks in advance.
Since the relationship between the tables is a one-to-many relationship, you do not need an intermediate table. You only need to have the following structure:
County: ID (PK), Name, etc.
Voting Equipment: ID (PK), County ID (FK), type, etc.
If counties shared machines so that a machine can be used by more than one county, then you would need an intermediate table. The reason is because you would then have a many-to-many relationship, which requires a independent table showing how the two entities are related.
County: ID (PK), Name, etc.
Voting Equipment: ID (PK), County ID (FK), type, etc.
If counties shared machines so that a machine can be used by more than one county, then you would need an intermediate table. The reason is because you would then have a many-to-many relationship, which requires a independent table showing how the two entities are related.
![]() |
Similar Threads
- database design for question system (Database Design)
- Relational Database design question... (Database Design)
- newbie question about database design (Computer Science)
- Database Design (Computer Science)
- Database Design Question (Database Design)
- Database Design Question (Database Design)
- your ideas on database design??? (Database Design)
- Cities and Districts DataBase - Basic Question (Database Design)
Other Threads in the Database Design Forum
- Previous Thread: Ternary relationship? ER model for search engine
- Next Thread: Best Free Web-based Database
| Thread Tools | Search this Thread |






