Data modeling best practice:\nWithin a single entity type, should each attribute name be unique (i.e., no two attributes share exactly the same name)?

Difficulty: Easy

Correct Answer: Correct

Explanation:


Introduction / Context:
Naming in data modeling is more than style; it enables unambiguous communication between analysts, designers, and developers. This question checks whether attributes within the same entity can reuse the same name or whether names must be unique to avoid confusion and technical conflict.



Given Data / Assumptions:

  • The context is logical/entity–relationship (ER) modeling that will eventually map to a relational schema.
  • We are speaking about uniqueness of attribute names within a single entity type (not across the entire model).
  • The goal is clarity, traceability, and clean forward engineering to databases.



Concept / Approach:
Each attribute in an entity should represent a distinct property. If two attributes share an identical name, stakeholders cannot reliably distinguish them in diagrams, documents, or SQL mappings. Logical uniqueness of attribute names per entity therefore avoids ambiguity, simplifies transformations to columns, and reduces errors in queries, code generators, and Object–Relational Mapping tools.



Step-by-Step Solution:
Identify the entity’s candidate attributes and their business meanings.Assign names that are semantically precise and distinct (e.g., created_on vs. updated_on).Check for collisions: no two attributes in the same entity may share the same name.Apply consistent naming conventions (prefixes/suffixes only when they add meaning).



Verification / Alternative check:
Attempt a forward-engineering step: duplicate attribute names would generate duplicate column identifiers in the same table, which relational databases disallow. Even at the logical level this would break documentation and code generation.



Why Other Options Are Wrong:
“Only required in physical SQL tables” is misleading; logical clarity should precede physical design. “Depends on the DBMS vendor” is incorrect because the principle is modeling best practice, and all relational DBMSs require unique column names per table.



Common Pitfalls:
Using the same label for different concepts (e.g., name for both legal_name and display_name). Allowing case-only differences (Name vs. name) also creates confusion.



Final Answer:
Correct

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion