Chap 04
32 Questions
2 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What are the two foundational concepts in the field of database design?

  • Object-Oriented Model and Network Model
  • Relational Database Model and Entity-Relationship (ER) Model (correct)
  • Hierarchical Model and Relational Database Model
  • Entity-Relationship (ER) Model and Hierarchical Model
  • The Relational Database Model focuses on the conceptual design of the data, while the Entity-Relationship (ER) Model focuses on the implementation and structure of data in terms of tables and relationships within those tables.

    False

    What is the standard language for interacting with relational databases?

    SQL (Structured Query Language)

    What is the purpose of primary and foreign keys in the Relational Database Model?

    <p>Primary and foreign keys establish relationships between tables.</p> Signup and view all the answers

    What is the purpose of entities and relationships in the Entity-Relationship (ER) model?

    <p>Entities represent real-world objects or concepts, and relationships represent associations between these entities.</p> Signup and view all the answers

    What is the purpose of attributes in the Entity-Relationship (ER) model?

    <p>Attributes describe properties of entities.</p> Signup and view all the answers

    What is the purpose of cardinality in the Entity-Relationship (ER) model?

    <p>Cardinality specifies how many instances of one entity are related to another.</p> Signup and view all the answers

    The Entity-Relationship (ER) Model is often used at the beginning of database design to capture requirements and relationships before moving to the Relational Database Model for implementation.

    <p>True</p> Signup and view all the answers

    Which of the following represent a type of key in a relational database?

    <p>Alternate Key</p> Signup and view all the answers

    What is the difference between a primary key and a candidate key?

    <p>Both uniquely identify items in the rows, but unique keys can have NULL value, while primary keys cannot have NULL values.</p> Signup and view all the answers

    What is the purpose of a unique key?

    <p>It prevents duplicate items in rows, but the items in the row also don't need to have a value.</p> Signup and view all the answers

    The Entity-Relationship Model (ERM) is often used to create a conceptual database, but it is not directly part of the database design process.

    <p>False</p> Signup and view all the answers

    What is the difference between entity and entity type?

    <p>Entity refers to a single occurrence of an entity type. Entity type is a category of a particular entity.</p> Signup and view all the answers

    A required attribute must have a value, while an optional attribute does not require a value and may be left empty.

    <p>True</p> Signup and view all the answers

    A composite identifier is a primary key composed of more than two attributes.

    <p>False</p> Signup and view all the answers

    A simple attribute can be subdivided to yield additional attributes.

    <p>False</p> Signup and view all the answers

    A single-valued attribute is an attribute that can take on multiple values for a single entity instance.

    <p>False</p> Signup and view all the answers

    A multivalued attribute is an attribute that can have many values for a single entity instance.

    <p>True</p> Signup and view all the answers

    A derived attribute is a value that must be manually entered and is not calculated from other attributes.

    <p>False</p> Signup and view all the answers

    A relationship is an association between entities which always operates in one direction, meaning it goes from one entity to another.

    <p>False</p> Signup and view all the answers

    A participant is an entity that participates in a relationship, with the relationship name being an active or passive verb.

    <p>True</p> Signup and view all the answers

    Connectivity in relationships describes the relationship classification.

    <p>True</p> Signup and view all the answers

    Cardinality explains the minimum and maximum number of related entity occurrences connected to one instance of another entity.

    <p>True</p> Signup and view all the answers

    A weak entity is an entity that depends on another entity for its existence, meaning it cannot exist without the other entity.

    <p>True</p> Signup and view all the answers

    The primary key of a weak entity does contain a primary key component of the parent entity.

    <p>False</p> Signup and view all the answers

    A strong relationship means that the related entity is dependent on the parent entity, and the primary key of the related entity contains a part of the key from the parent entity.

    <p>True</p> Signup and view all the answers

    Which of these are types of relationship participation?

    <p>Optional Participation</p> Signup and view all the answers

    In optional participation, an entity occurrence always requires a corresponding entity in a relationship.

    <p>False</p> Signup and view all the answers

    A unary relationship occurs between two independent entities.

    <p>False</p> Signup and view all the answers

    A ternary relationship involves the association of three independent entities.

    <p>True</p> Signup and view all the answers

    A composite entity is also known as a bridge entity, and it represents an M:N relationship between two or more entities.

    <p>True</p> Signup and view all the answers

    A composite entity has a one-to-one (1:1) relationship with parent entities.

    <p>True</p> Signup and view all the answers

    Study Notes

    Relational Database Model vs Entity-Relationship (ER) Model

    • Both are foundational database design concepts, but serve different purposes
    • Relational model: Organizes data into tables with rows and columns. Establishes relationships between tables using keys (primary and foreign keys). Emphasizes data integrity, normalization, and efficient querying. Implemented using SQL.
    • ER model: Focuses on the conceptual representation of data and relationships. Uses entities (rectangles) and relationships (diamonds) to represent real-world objects and their associations. Attributes describe entity properties. Cardinality specifies the number of entity instances related to another. Used in initial database design to capture requirements and relationships before implementation.

    Relational Database Model Components

    • Tables: Organize data into rows and columns
    • Relationships: Connections between tables using keys (primary and foreign keys)
    • Data Integrity: Ensuring accuracy and consistency of data.
    • Normalization: Process of organizing data to reduce data redundancy and improve data integrity
    • SQL (Structured Query Language): Standard language for interacting with relational databases, enabling efficient querying.

    Entity-Relationship (ER) Model Components

    • Entities: Represent real-world objects or concepts (rectangles)
    • Attributes: Describe properties of entities (within rectangle)
    • Relationships: Represent associations between entities (diamonds)
    • Cardinality: Specifies the number of instances of one entity related to another
    • ER diagrams: Visual representation of entities, attributes, and relationships in a database.

    Database Keys (Keys, Attributes)

    • Primary Key: Uniquely identifies a row in a table
    • Candidate Key: Potential primary key for a table
    • Foreign Key: A field (or set of fields) in one table that refers to the primary key in another table, creating a relationship between the tables
    • Unique Key: Uniquely identifies a row in a table, like a primary key, but allows one NULL value.
    • Super Key: A set of one or more columns which can uniquely identity rows in a table. Includes primary key and candidate key

    Attributes (cont.)

    • Required Attribute: Must have a value
    • Optional Attribute: May be omitted
    • Domain: Set of possible values for an attribute

    Data Types

    • Composite Attributes: Can be subdivided into smaller attributes
    • Simple Attributes: Cannot be further subdivided (e.g., age, marital status)
    • Single-Valued Attributes: Have only one value for each entity instance
    • Multivalued Attributes: Can have multiple values for each entity instance

    Attributes (cont.)

    • Composite Identifier (Primary Key): Primary key composed of multiple attributes.
    • Derived Attribute: Calculated from other attributes (e.g., age, based on date of birth)

    Relationships

    • Connectivity: Describes relationship classification (e.g., 1:1, 1:M, M:N).
    • Cardinality: Expresses the minimum and maximum number of entity occurrences related to another entity (e.g. (1,1), (1,N), (0,N))
    • Relationship strength: Identifying Relationships and Non-identifying (weak) relationship
    • Participation: Mandatory vs. Optional.

    Existence Dependence/Independence

    • Existence Dependence: An entity exists only when it's associated with another related entity.
    • Existence Independence: An entity can exist independently of its related entities.

    Relationship Degree

    • Unary Relationship: Relationship exists within a single entity.
    • Recursive Relationship: Relationship exists between occurrences of the same entity set
    • Binary Relationship: Relationship between two entities.
    • Ternary Relationship: Relationship between three or more entities.

    Entity Relationship Model (ERM)

    • ERD: Depicts the conceptual Database from the end user's point of view and represent the main components of the database.
    • Entities: Refers to the entity set, not the single entity occurrence.
    • Attributes: Characteristics of the entities.

    Developing an ER Diagram

    • Detailed narrative: Organization's description of operations
    • Business rules: Identify entities and relationships
    • Initial ERD: Develop initial diagram of entities, attributes, relationship
    • Revise and review: Refining the ERD as needed

    Database Design Challenges: Conflicting Goals

    • Design standards
    • Need for high processing speed vs. need for extensive info.

    Implementing 1:1 Relationships

    • Data anomalies (e.g., divorce, null values)
    • Implementations that avoid anomalies include using a composite primary key to combine the primary keys from the parent entities or creating a separate table to handle the relationships

    Associative Entities (Composite entities)

    • Represents M:N relationships between two or more entities
    • Composed of primary key attributes of each parent entity.
    • May contain additional attributes.

    Relationship Participation/ Degree

    • Optional participation: One entity doesn't need its corresponding entity to exist in a relationship.
    • Mandatory participation: One entity requires its corresponding entity to exist in a relationship.

    Studying That Suits You

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

    Quiz Team

    Related Documents

    Description

    Subject CMT221

    More Like This

    Use Quizgecko on...
    Browser
    Browser