Designing a schema for an entity with 40 attributesSchema designing for handling multiple payment...
How to substitute values from a list into a function?
I can't die. Who am I?
Is divide-by-zero a security vulnerability?
Are there any other Chaos-worshipping races?
If a set is open, does that imply that it has no boundary points?
Non-Italian European mafias in USA?
Test pad's ESD protection
Inverse of the covariance matrix of a multivariate normal distribution
Plagiarism of code by other PhD student
What is the difference between a forward slip and a side slip?
Traversing Africa: A Cryptic Journey
What type of investment is best suited for a 1-year investment on a down payment?
Did Amazon pay $0 in taxes last year?
Is there a legal poaching?
What are the issues with an additional (limited) concentration slot instead of Bladesong?
For a 1-action spell, do I need to take a turn to ready the spell before I can cast it, or can I cast it immediately?
Is it possible to convert a suspension fork to rigid by drilling it?
Citing contemporaneous (interlaced?) preprints
Skis versus snow shoes - when to choose which for travelling the backcountry?
In Adventurer's League, is it possible to keep the Ring of Winter if you manage to acquire it in the Tomb of Annihilation adventure?
Make me a metasequence
Why is it "take a leak?"
Achieving MPPT of a solar panel with LM2596
Graphing random points on the XY-plane
Designing a schema for an entity with 40 attributes
Schema designing for handling multiple payment gatewaysProduct Attribute List Design PatternDatabase Design Regarding a Relationship for Patient VisitUsers' physical characteristics - designSchema design for products with multiple variants/attributes?Designing table for document annotation with future columnsHow to know the best paradigm to use for a database with complex unique elements?Is a database that only contains composite and foreign keys already in second normal form (2NF)?How to maintain customer addresses for Orders?SQL Database structure to store calculations
I am having a doubt on designing a schema for my current project in MySQL.
It is mainly because there is an entity that I made and has 40 attributes.
The table/entity X contain of fields like: collection of personal information, physical attributes (such as hair color, eye color, height, etc) mostly a varchar with less than 10 chars.
The question is:
Should I break the attributes into another table or let it stays in one table X with all those 40 attributes with it?
mysql database-design eav
bumped to the homepage by Community♦ 1 min ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am having a doubt on designing a schema for my current project in MySQL.
It is mainly because there is an entity that I made and has 40 attributes.
The table/entity X contain of fields like: collection of personal information, physical attributes (such as hair color, eye color, height, etc) mostly a varchar with less than 10 chars.
The question is:
Should I break the attributes into another table or let it stays in one table X with all those 40 attributes with it?
mysql database-design eav
bumped to the homepage by Community♦ 1 min ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am having a doubt on designing a schema for my current project in MySQL.
It is mainly because there is an entity that I made and has 40 attributes.
The table/entity X contain of fields like: collection of personal information, physical attributes (such as hair color, eye color, height, etc) mostly a varchar with less than 10 chars.
The question is:
Should I break the attributes into another table or let it stays in one table X with all those 40 attributes with it?
mysql database-design eav
I am having a doubt on designing a schema for my current project in MySQL.
It is mainly because there is an entity that I made and has 40 attributes.
The table/entity X contain of fields like: collection of personal information, physical attributes (such as hair color, eye color, height, etc) mostly a varchar with less than 10 chars.
The question is:
Should I break the attributes into another table or let it stays in one table X with all those 40 attributes with it?
mysql database-design eav
mysql database-design eav
edited Jan 24 '17 at 22:17
a_horse_with_no_name
40.3k777112
40.3k777112
asked Jan 24 '17 at 12:57
PragmaticoderPragmaticoder
11
11
bumped to the homepage by Community♦ 1 min ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 1 min ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Having a table with 40 columns is not an issue. Issue raises only how these attributes are getting updated provided there is no concurrent updates of the Attributes. Otherwise there will be an issue with locking.
add a comment |
Designing : functional dependency should be a guide to be sure that all 40 attributes are i the same entity :
- your entity must have an identifier
- (all attributes must be atomics)
- all other attributes must be functionally dependent of the identifier
in other terms : for a unique value (occurrence) of the identifier, you must get one unique value of each of the other attributes.
If not, you should break your entity.
20 years ago, I had the same probleme with products and their caractéristics (100 or more). Below is the solution I used :
- Product (idp, ...important/frequent attributes) (idp) PK
- Caracteristic (idc, title, type of data) : (idc) PK
- ProductCaracteristics (idp, idc, numeric value, string value), (idp, idc) PK, (idp) FK to Product, (idc) FK to Caracteristics
It is evolutive but needs more data space.
add a comment |
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
});
}
});
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%2f162063%2fdesigning-a-schema-for-an-entity-with-40-attributes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Having a table with 40 columns is not an issue. Issue raises only how these attributes are getting updated provided there is no concurrent updates of the Attributes. Otherwise there will be an issue with locking.
add a comment |
Having a table with 40 columns is not an issue. Issue raises only how these attributes are getting updated provided there is no concurrent updates of the Attributes. Otherwise there will be an issue with locking.
add a comment |
Having a table with 40 columns is not an issue. Issue raises only how these attributes are getting updated provided there is no concurrent updates of the Attributes. Otherwise there will be an issue with locking.
Having a table with 40 columns is not an issue. Issue raises only how these attributes are getting updated provided there is no concurrent updates of the Attributes. Otherwise there will be an issue with locking.
answered Jan 24 '17 at 13:59
SQL.RKSQL.RK
1313
1313
add a comment |
add a comment |
Designing : functional dependency should be a guide to be sure that all 40 attributes are i the same entity :
- your entity must have an identifier
- (all attributes must be atomics)
- all other attributes must be functionally dependent of the identifier
in other terms : for a unique value (occurrence) of the identifier, you must get one unique value of each of the other attributes.
If not, you should break your entity.
20 years ago, I had the same probleme with products and their caractéristics (100 or more). Below is the solution I used :
- Product (idp, ...important/frequent attributes) (idp) PK
- Caracteristic (idc, title, type of data) : (idc) PK
- ProductCaracteristics (idp, idc, numeric value, string value), (idp, idc) PK, (idp) FK to Product, (idc) FK to Caracteristics
It is evolutive but needs more data space.
add a comment |
Designing : functional dependency should be a guide to be sure that all 40 attributes are i the same entity :
- your entity must have an identifier
- (all attributes must be atomics)
- all other attributes must be functionally dependent of the identifier
in other terms : for a unique value (occurrence) of the identifier, you must get one unique value of each of the other attributes.
If not, you should break your entity.
20 years ago, I had the same probleme with products and their caractéristics (100 or more). Below is the solution I used :
- Product (idp, ...important/frequent attributes) (idp) PK
- Caracteristic (idc, title, type of data) : (idc) PK
- ProductCaracteristics (idp, idc, numeric value, string value), (idp, idc) PK, (idp) FK to Product, (idc) FK to Caracteristics
It is evolutive but needs more data space.
add a comment |
Designing : functional dependency should be a guide to be sure that all 40 attributes are i the same entity :
- your entity must have an identifier
- (all attributes must be atomics)
- all other attributes must be functionally dependent of the identifier
in other terms : for a unique value (occurrence) of the identifier, you must get one unique value of each of the other attributes.
If not, you should break your entity.
20 years ago, I had the same probleme with products and their caractéristics (100 or more). Below is the solution I used :
- Product (idp, ...important/frequent attributes) (idp) PK
- Caracteristic (idc, title, type of data) : (idc) PK
- ProductCaracteristics (idp, idc, numeric value, string value), (idp, idc) PK, (idp) FK to Product, (idc) FK to Caracteristics
It is evolutive but needs more data space.
Designing : functional dependency should be a guide to be sure that all 40 attributes are i the same entity :
- your entity must have an identifier
- (all attributes must be atomics)
- all other attributes must be functionally dependent of the identifier
in other terms : for a unique value (occurrence) of the identifier, you must get one unique value of each of the other attributes.
If not, you should break your entity.
20 years ago, I had the same probleme with products and their caractéristics (100 or more). Below is the solution I used :
- Product (idp, ...important/frequent attributes) (idp) PK
- Caracteristic (idc, title, type of data) : (idc) PK
- ProductCaracteristics (idp, idc, numeric value, string value), (idp, idc) PK, (idp) FK to Product, (idc) FK to Caracteristics
It is evolutive but needs more data space.
edited Jan 24 '17 at 22:03
answered Jan 24 '17 at 17:17
Patrick DezecachePatrick Dezecache
11316
11316
add a comment |
add a comment |
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%2f162063%2fdesigning-a-schema-for-an-entity-with-40-attributes%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