var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: DB Table Design
I am creating a small database in Access with the following tables:
I am unsure of how to link the tables, specifically Organisation and Projects.
Organisation has the following fields:
Each organisation can be involved in more than one project, so I am a bit unsure of how to create this link, do I need some extra fields?
The next question is can a project have more than one organisation involved?
Yes, each project will always have several organisations involved.
In that case you have a many-to-many relationship. Google "Association tables database"
OK cheers, In Access, when I add the relationships I only seem to be able to add one to many, am I missing something?
Did you read up on Association tables? Because if you did you should know what you are missing.
OK, let me check it out.
ok, I think I understand. I need a 3rd table. I would have Organisation and Projects, then one in the middle called something like "Org_Proj"
Cool - once read repeat back what you learned to check you got it sorted.
Ah - there you go.
Yes - in an RDBMS there is no way to create a many to many relationship. So, to allow one we create another table allowing two one-to-many relationships.
ok, I have created the new table, but I can only have one of the fields as the primary key, If I am understanding the tutorial correctly, they should be both primary key?
Nope - you can have more than one column in a primary key (or index or unique constraint). A PK with two or more columns is known as a composite key.
Highlight the two columns simultaneously and click on the key symbol.
ok, got it. Cheers. Now to populate it
Hi Again, what about in cases where the reslationship is one to one, are there special considerations in that case?
The relationship is still many-to-many. If there is only one organisation for the project and only one project for the organisation you only insert one row.