patternMinor
Relational Model Design - Entity with one attribute
Viewed 0 times
withdesignrelationaloneattributemodelentity
Problem
I am trying to design a database relational model for an assignment. First, I design the ER diagram, and then the relational model with tables (schemas).
Here's my question: Is it possible for an entity to have only one attribute?
To put a bit more to this: is it possible or logical to come to a relation with a single attribute in the course of decomposition? If that happens, and is accepted, how should one proceed?
Here's my question: Is it possible for an entity to have only one attribute?
To put a bit more to this: is it possible or logical to come to a relation with a single attribute in the course of decomposition? If that happens, and is accepted, how should one proceed?
Solution
Yes, but.
If an entity only has one attribute, then that attribute must serve as an identifier for the entity. Typically, if only one attribute is found for an entity in the given data stream, then another attribute is "invented" for purposes of identifying. It's often called "id", it's often an integer, and it's often populated using the autonumber feature of the database system.
When you are doing analysis, it's important to distinguish between the features that were given to you in the problem statement, and the features you added in order to make sense out of the problem.
If an entity only has one attribute, then that attribute must serve as an identifier for the entity. Typically, if only one attribute is found for an entity in the given data stream, then another attribute is "invented" for purposes of identifying. It's often called "id", it's often an integer, and it's often populated using the autonumber feature of the database system.
When you are doing analysis, it's important to distinguish between the features that were given to you in the problem statement, and the features you added in order to make sense out of the problem.
Context
StackExchange Database Administrators Q#65336, answer score: 3
Revisions (0)
No revisions yet.