Data Modeling: Names, Definitions, Rules & Models

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which characteristic is most important when defining a 'good' data name?

  • It is as short as possible to reduce storage requirements.
  • It uses technical jargons familiar to database administrators.
  • It is related to business characteristics and understandable by end-users. (correct)
  • It incorporates the physical storage location within the database.

Which of the following is a key aspect of a well-defined data definition?

  • It's iteratively refined and achieved by consensus among stakeholders. (correct)
  • It is created in isolation by the database administrator.
  • It's a lengthy and complex description to cover all possible scenarios.
  • It relies on assumption instead of specific fact-associations.

What does an entity instance represent in the context of an E-R model?

  • A specific occurrence of an entity. (correct)
  • A category of similar objects or concepts.
  • A link between different entity types.
  • The overall structure of the database.

In E-R modeling, what is the primary purpose of a relationship instance?

<p>To establish a link between related entities. (D)</p> Signup and view all the answers

When should a business rule be considered 'good'?

<p>When it's easily understood by business people and is business-oriented. (B)</p> Signup and view all the answers

What distinguishes an 'entity type' from an 'entity instance'?

<p>An entity type is a collection of entities with common properties, whereas an entity instance is a single occurrence. (A)</p> Signup and view all the answers

Which of the following should NOT be modeled as an entity?

<p>A user of the database system. (B)</p> Signup and view all the answers

How does a weak entity differ from a strong entity?

<p>A weak entity does not have a unique identifier of its own. (D)</p> Signup and view all the answers

What is the significance of an 'identifying relationship' in the context of weak entities?

<p>It links the strong entity to the weak entity, providing identification for the weak entity. (C)</p> Signup and view all the answers

How does a 'required' attribute differ from an 'optional' attribute?

<p>A required attribute must have a value for every entity instance, while an optional attribute may not. (D)</p> Signup and view all the answers

What is the key characteristic of a composite attribute?

<p>It has meaningful component parts. (C)</p> Signup and view all the answers

How do 'single-valued' and 'multivalued' attributes differ?

<p>A single-valued attribute can only have one value; a multivalued attribute can have multiple values. (B)</p> Signup and view all the answers

What is the primary characteristic of a 'derived' attribute?

<p>It's calculated from other attribute values. (C)</p> Signup and view all the answers

What makes an attribute a good 'identifier'?

<p>It uniquely identifies an entity instance. (D)</p> Signup and view all the answers

When naming attributes, which practice is considered a best practice?

<p>Following a standard format and using unique names. (B)</p> Signup and view all the answers

Regarding defining attributes, what's the importance of specifying 'required' versus 'optional'?

<p>It helps ensure data quality and completeness. (A)</p> Signup and view all the answers

What is the difference between a 'relationship type' and a 'relationship instance'?

<p>A relationship type is shown as lines between entity types, and a relationship instance is between specific entity instances. (A)</p> Signup and view all the answers

What is the degree of a relationship?

<p>The number of entity types that participate in it. (D)</p> Signup and view all the answers

What distinguishes a ternary relationship from a binary relationship?

<p>A ternary relationship involves three entities, and a binary involves two. (A)</p> Signup and view all the answers

What does 'cardinality' in relationships specify?

<p>How many of each entity type is allowed in the relationship. (B)</p> Signup and view all the answers

What is the difference between 'minimum cardinality' and 'maximum cardinality'?

<p>Minimum cardinality defines if participation is optional or mandatory, maximum cardinality sets the upper limit. (B)</p> Signup and view all the answers

Under what condition is minimum cardinality considered 'optional'?

<p>If it's zero. (A)</p> Signup and view all the answers

What does it signify if two entities have multiple relationships between them?

<p>Normal in complex data models. (D)</p> Signup and view all the answers

How can multivalued attributes be represented?

<p>As relationships. (C)</p> Signup and view all the answers

In what scenario should a relationship with attributes be replaced with an associative entity?

<p>When all relationships for the associative entity should be many. (C)</p> Signup and view all the answers

What is a primary use case for 'time-stamping' data?

<p>For modeling time-dependent data. (B)</p> Signup and view all the answers

Which of the below actions illustrates converting many-to-many relationships to associative entities?

<p>Replacing a direct relationship with two one-to-many relationships through an intermediate entity. (D)</p> Signup and view all the answers

When choosing an Identifier, what consideration is most important?

<p>The identifier will not change in value. (D)</p> Signup and view all the answers

Which type of E-R model construct is best described as corresponding to fields in a table?

<p>Attributes (B)</p> Signup and view all the answers

Which definition reflects an Entity Type?

<p>A collection of entities that share common properties or characteristics. (B)</p> Signup and view all the answers

What is the purpose of Data Definitions?

<p>Provide explanations of terms and facts within the database. (A)</p> Signup and view all the answers

What is the result of not following the principles of good data modeling?

<p>Inaccurate data representation and difficulty in retrieving useful information. (A)</p> Signup and view all the answers

What happens if good names are not defined?

<p>Misunderstandings and difficulties in communicating about the data. (D)</p> Signup and view all the answers

Which of the following correctly describes the Declarative property of a good business rule?

<p>It states what the rule is, not how it should be implemented. (D)</p> Signup and view all the answers

In the design of databases, what should be avoided from being modeled as an entity?

<p>A user of the database system. (A)</p> Signup and view all the answers

What is a good substitute for long, composite keys?

<p>New, simple keys. (C)</p> Signup and view all the answers

Which characteristic applies to defining attributes?

<p>Should specify required vs. optional statuses and clarify the attribute's purpose. (D)</p> Signup and view all the answers

What is the relationship between cardinality and entities:

<p>Cardinality constraints the number of instances of one entity that can be associated with each instance of another entity. (A)</p> Signup and view all the answers

What determines when a business rule is considered 'Atomic'?

<p>When it is a single statement. (C)</p> Signup and view all the answers

Signup and view all the answers

Flashcards

What are business rules?

Statements that define or constrain some aspect of the business

What is an entity?

A person, place, object, event or concept about which the organization wishes to maintain data

What is an entity type?

Collection of entities that share common properties or characteristics

What is an entity instance?

A single occurrence of an entity type

Signup and view all the flashcards

What is a strong entity?

Exists independently of other entities and has its own unique identifier

Signup and view all the flashcards

What is a weak entity?

Dependent on a strong entity and does not have a unique identifier of its own

Signup and view all the flashcards

What are Attributes?

A property or characteristic of an entity or relationship type

Signup and view all the flashcards

What is a required attribute?

Must have a value for every entity instance

Signup and view all the flashcards

What is a optional attribute?

May or may not have a value for every entity instance

Signup and view all the flashcards

What is a composite attribute?

An attribute that can be broken down into meaningful component parts

Signup and view all the flashcards

What is a multi-valued attribute?

May take on more than one value for a given entity instance

Signup and view all the flashcards

What is a derived attribute?

Values can be calculated from related attribute values and is not physically stored

Signup and view all the flashcards

What are Identifiers (Keys)?

An attribute that uniquely identifies individual instances of an entity type

Signup and view all the flashcards

What is degree of relationship?

The number of entity types that participate in a relationship

Signup and view all the flashcards

What is a One-to-One relationship?

Each entity in the relationship will have exactly one related entity

Signup and view all the flashcards

What is a One-to-Many relationship?

An entity on one side can have many related entities, while the other side has a maximum of one.

Signup and view all the flashcards

What is Many-to-Many relationship?

Entities on both sides can have many related entities on the other side

Signup and view all the flashcards

What is Cardinality Constraints?

The number of instances of one entity that can or must be associated with another entity

Signup and view all the flashcards

What is time stamp?

A time value associated with a data value that marks when an event occurred

Signup and view all the flashcards

What is Price History?

An attribute that is both multivalued and composite and contains effective date and price

Signup and view all the flashcards

What is Associative Entities?

An entity-has attributes, and a relationship-links entities together.

Signup and view all the flashcards

Study Notes

  • Good Data Names are related to business, meaningful, unique, readable, repeatable and in standard syntax
  • Data Definitions explain a term or fact, including a term and any facts relating it to others
  • Good Data Definitions have concise descriptions, gathered with system requirements, diagrams, and refined by consensus

E-R Model Constructs:

  • Entities: Person, place, object, event or concept that corresponds to a row in a table
  • Entity Type: Collection of entities, which often corresponds to a table
  • Relationships: Link between entities, corresponding to primary key-foreign key equivalencies in related tables
  • Relationship Type: Category of relationship, linking between entity types
  • Attributes: Properties or characteristics of an entity or relationship type, corresponds to a field in a table

Business Rules:

  • Business Rules define or constrain aspects of the business.
  • Derived from policies, procedures, events, functions.
  • Business Rules assert business structure and control business behavior
  • They are expressed in terms familiar to end users, and are automated by DMBS software

Good Business Rules:

  • A good business rule should be declarative, precise, atomic, consistent, expressible, distinct and business-oriented

Entities:

  • Entity: person, place, object, event, or idea about which an organization saves data.
  • Entity Type: collection of entities that share common properties.
  • Entity Instance: A single occurrence of an entity type.
  • Entities should be an object with multiple instances, attributes that can be modeled.
  • Entities should not be a user or an output

Strong vs. Weak Entities:

  • Strong Entity: exists independently of other entities, and has its own identifier
  • Weak Entity: depends on a strong entity, cannot exist on its own, and does not have a unique identifier. Has a partial identifier.
  • Identifying Relationship: links a strong entity to a weak entity.

Attributes:

  • Attributes are properties or characteristics of an entity or relationship type.
  • Attributes can be Required, Optional, Simple, Composite, Single-Valued, Multivalued, Stored, Derived and an Identifier

Attribute Classifications:

  • Required Attribute: must have a value for every entity instance.
  • Optional Attribute: may not have a value for every entity instance.
  • Composite Attribute: has meaningful component parts.
  • Multivalued Attribute: may take on more than one value for a given entity instance.
  • Derived Attribute: values can be calculated from related attribute values, and are not physically stored.

Keys:

  • Identifiers (Keys) are an attribute (or combo) which uniquely identifies individual instances of an entity type
  • Candidate Key: attribute that could be a key and satisfies identifier requirements.
  • Identifiers (Keys) should not change and cannot be null
  • Intelligent identifiers (e.g., locations or people that might change) should be avoided.
  • Substitute new, simple keys for long, composite keys.

Naming Attributes:

  • Attribute names should be a singular noun or noun phrase
  • Names should be unique and follow a standard formula: [Entity type name { [ Qualifier ] } ] Class
  • Similar attributes of different entity types should use the same qualifiers and classes

Defining Attributes:

  • State what an attribute is and why.
  • Make clear what is included in the attribute’s value
  • Include aliases in documentation
  • State source of values
  • Specify required vs. optional
  • State min and max occurrences allowed
  • Indicate relationships with other attributes

Relationships:

  • Relationship Types are modeled as lines between entity types. Instances exist between specific entity instances
  • Relationships can have attributes
  • Two entities can have more than one type of relationship between them

Degree of Relationships:

  • Degree of relationships is the number of entity types in it
  • Unary Relationship: one entity type
  • Binary Relationship: two entity types
  • Ternary Relationship: three entity types

Cardinality of Relationships:

  • Cardinality defines the number of instances of one entity that can or must be associated with each instance of another
  • One-to-One: Each entity has exactly one related entity
  • One-to-Many: One side can have many related entities, the other must have a maximum of one related entity
  • Many-to-Many: Entities on both sides can have many related entities on the other side
  • Cardinality Constraints include minimum cardinality and maximum cardinality
  • Minimum cardinality of zero is optional
  • Minimum cardinality of one or more is mandatory
  • Multiple relationships connect entities in ore than one way

Associative Entities:

  • Associative Entities are like a relationship with attributes, but it is also considered to be an entity in its own right.
  • Associative Entities has attributes
  • Relationships link entities together
  • Relationships with attributes should be entities if all the relationships for the associative entity are many
  • Associative Entity could have meaning independent of the other entities
  • Associative entity should have unique identifier and other attributes
  • Associative entity may participate in relationships other than associated relationships
  • Ternary relationships should be converted to associative entities.

Time Stamps:

  • A time stamp is a time value linked to a data value
  • Indicates events affecting the data value
  • Time stamps are used for time-dependent data, e.g, HIPAA and Sarbanes-Oxley.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Entity Relationship Model Quiz
39 questions
Database Conceptual Data Model Example
18 questions
Bases de Datos: Diseño y Modelo E-R
22 questions
Use Quizgecko on...
Browser
Browser