Q: Is using association tables for One-to-Many relationships common practice?ER Modeling; multiplicity basics...
Is there a way to pause a running process on Linux systems and resume later?
How can guns be countered by melee combat without raw-ability or exceptional explanations?
Is Screenshot Time-tracking Common?
Why do single electrical receptacles exist?
Cryptic cross... with words
Does the double-bladed scimitar's special attack let you use your ability modifier for the damage of the attack?
Exploding Numbers
Coworker asking me to not bring cakes due to self control issue. What should I do?
Badly designed reimbursement form. What does that say about the company?
Excluding or including by awk
When distributing a Linux kernel driver as source code, what's the difference between Proprietary and GPL license?
SQL Server 2017 crashes when backing up because filepath is wrong
Why does this quiz question say that protons and electrons do not combine to form neutrons?
How can I give a Ranger advantage on a check due to Favored Enemy without spoiling the story for the player?
Spells that would be effective against a Modern Day army but would NOT destroy a fantasy one
How can I handle players killing my NPC outside of combat?
Why are 'and/or' operations in this Python statement behaving unexpectedly?
Can a Hydra make multiple opportunity attacks at once?
PostGIS function to move a polygon to centre over new point coordinates
Do the speed limit reductions due to pollution also apply to electric cars in France?
Can you say "leftside right"?
Including proofs of known theorems in master's thesis
Was the Soviet N1 really capable of sending 9.6 GB/s of telemetry?
Is it possible to detect 100% of SQLi with a simple regex?
Q: Is using association tables for One-to-Many relationships common practice?
ER Modeling; multiplicity basics - one to many or many to many?Nested one to many relationships?Many one-to-many relationships between two tablesIs this acceptable practice for a many to many?Table Relationship - One to Few (Many)Conditional relationships? One-to-many relationship using a pivot table for only a type of entityStoring historical records and extracting data from a given periodMultiple one to many relationships between tablesWhat is the best approach to write a lot of many to many relationships?A question about foreign keys and many to many relationships
I'm currently running into a conceptual disagreement with some database architects at work. My education in this field is purely from the UofGoogle so I'm sure they're right, but can't find supporting evidence online for their side.
The part of the database that we're discussing has to do with pieces of manufacturing equipment within different areas.
There is a table containing all unique AREA_CD's. Each area can contain multiple pieces of equipment (EQUIP_CD), but a single piece of equipment cannot be in multiple areas. I.e. this is a 1(AREA_CD) to many(EQUIP_CD) relationship.
My understanding of db design is that we should have a table for the equipment directly related to the area table where:
AREA_CD= PK & FK to area table
EQUIP_CD= PK
(The combined PK is because there are some pieces of equipment that share the same code name, but are not the same. This is an unfortunate reality from the legacy system we are trying to upgrade).
The architects are saying that it is best practice to have the area table and equipment table joined via an association table, which I thought was specifically for many-to-many relationships.
This would make sense to me if an EQUIP_CD referred to a specific type of equipment (with attributes we're interested in storing) of which multiple could exist in different areas. However that would be a man-to-many relationship which isn't the case here. We have some shared code names that refer to different types of equipment, and the attributes depend on which area they are in.
Their justifications for the use of an association table are the following:
- Data protection. The association table is protected by the code tables.. but I don't think this adds any value in this case. There are other tables which are connected to the EQUIP_CD which will protect it.
- Future flexibility. This is understandable to me.
- Best practice. Is it though??
So my question.. Is the use of an association table for a 1-to-many relationship best practice? Are there any other justifications for this design beyond the three above?
I'm not looking to challenge my colleagues, just further my learning. Thank you in advanced!
database-design oracle-10g relational-theory
New contributor
add a comment |
I'm currently running into a conceptual disagreement with some database architects at work. My education in this field is purely from the UofGoogle so I'm sure they're right, but can't find supporting evidence online for their side.
The part of the database that we're discussing has to do with pieces of manufacturing equipment within different areas.
There is a table containing all unique AREA_CD's. Each area can contain multiple pieces of equipment (EQUIP_CD), but a single piece of equipment cannot be in multiple areas. I.e. this is a 1(AREA_CD) to many(EQUIP_CD) relationship.
My understanding of db design is that we should have a table for the equipment directly related to the area table where:
AREA_CD= PK & FK to area table
EQUIP_CD= PK
(The combined PK is because there are some pieces of equipment that share the same code name, but are not the same. This is an unfortunate reality from the legacy system we are trying to upgrade).
The architects are saying that it is best practice to have the area table and equipment table joined via an association table, which I thought was specifically for many-to-many relationships.
This would make sense to me if an EQUIP_CD referred to a specific type of equipment (with attributes we're interested in storing) of which multiple could exist in different areas. However that would be a man-to-many relationship which isn't the case here. We have some shared code names that refer to different types of equipment, and the attributes depend on which area they are in.
Their justifications for the use of an association table are the following:
- Data protection. The association table is protected by the code tables.. but I don't think this adds any value in this case. There are other tables which are connected to the EQUIP_CD which will protect it.
- Future flexibility. This is understandable to me.
- Best practice. Is it though??
So my question.. Is the use of an association table for a 1-to-many relationship best practice? Are there any other justifications for this design beyond the three above?
I'm not looking to challenge my colleagues, just further my learning. Thank you in advanced!
database-design oracle-10g relational-theory
New contributor
add a comment |
I'm currently running into a conceptual disagreement with some database architects at work. My education in this field is purely from the UofGoogle so I'm sure they're right, but can't find supporting evidence online for their side.
The part of the database that we're discussing has to do with pieces of manufacturing equipment within different areas.
There is a table containing all unique AREA_CD's. Each area can contain multiple pieces of equipment (EQUIP_CD), but a single piece of equipment cannot be in multiple areas. I.e. this is a 1(AREA_CD) to many(EQUIP_CD) relationship.
My understanding of db design is that we should have a table for the equipment directly related to the area table where:
AREA_CD= PK & FK to area table
EQUIP_CD= PK
(The combined PK is because there are some pieces of equipment that share the same code name, but are not the same. This is an unfortunate reality from the legacy system we are trying to upgrade).
The architects are saying that it is best practice to have the area table and equipment table joined via an association table, which I thought was specifically for many-to-many relationships.
This would make sense to me if an EQUIP_CD referred to a specific type of equipment (with attributes we're interested in storing) of which multiple could exist in different areas. However that would be a man-to-many relationship which isn't the case here. We have some shared code names that refer to different types of equipment, and the attributes depend on which area they are in.
Their justifications for the use of an association table are the following:
- Data protection. The association table is protected by the code tables.. but I don't think this adds any value in this case. There are other tables which are connected to the EQUIP_CD which will protect it.
- Future flexibility. This is understandable to me.
- Best practice. Is it though??
So my question.. Is the use of an association table for a 1-to-many relationship best practice? Are there any other justifications for this design beyond the three above?
I'm not looking to challenge my colleagues, just further my learning. Thank you in advanced!
database-design oracle-10g relational-theory
New contributor
I'm currently running into a conceptual disagreement with some database architects at work. My education in this field is purely from the UofGoogle so I'm sure they're right, but can't find supporting evidence online for their side.
The part of the database that we're discussing has to do with pieces of manufacturing equipment within different areas.
There is a table containing all unique AREA_CD's. Each area can contain multiple pieces of equipment (EQUIP_CD), but a single piece of equipment cannot be in multiple areas. I.e. this is a 1(AREA_CD) to many(EQUIP_CD) relationship.
My understanding of db design is that we should have a table for the equipment directly related to the area table where:
AREA_CD= PK & FK to area table
EQUIP_CD= PK
(The combined PK is because there are some pieces of equipment that share the same code name, but are not the same. This is an unfortunate reality from the legacy system we are trying to upgrade).
The architects are saying that it is best practice to have the area table and equipment table joined via an association table, which I thought was specifically for many-to-many relationships.
This would make sense to me if an EQUIP_CD referred to a specific type of equipment (with attributes we're interested in storing) of which multiple could exist in different areas. However that would be a man-to-many relationship which isn't the case here. We have some shared code names that refer to different types of equipment, and the attributes depend on which area they are in.
Their justifications for the use of an association table are the following:
- Data protection. The association table is protected by the code tables.. but I don't think this adds any value in this case. There are other tables which are connected to the EQUIP_CD which will protect it.
- Future flexibility. This is understandable to me.
- Best practice. Is it though??
So my question.. Is the use of an association table for a 1-to-many relationship best practice? Are there any other justifications for this design beyond the three above?
I'm not looking to challenge my colleagues, just further my learning. Thank you in advanced!
database-design oracle-10g relational-theory
database-design oracle-10g relational-theory
New contributor
New contributor
New contributor
asked 3 mins ago
DavidNDavidN
106
106
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
DavidN is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230488%2fq-is-using-association-tables-for-one-to-many-relationships-common-practice%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
DavidN is a new contributor. Be nice, and check out our Code of Conduct.
DavidN is a new contributor. Be nice, and check out our Code of Conduct.
DavidN is a new contributor. Be nice, and check out our Code of Conduct.
DavidN is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230488%2fq-is-using-association-tables-for-one-to-many-relationships-common-practice%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown