DATA MODELLING
22 Questions
1 Views

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 of the following statements accurately describes an entity in an entity relationship diagram (ERD)?

  • It is defined by its relationships with other entities.
  • It does not require a primary key.
  • It can exist independently of other entities. (correct)
  • It is always represented as a double rectangle.
  • What distinguishes a weak entity from a strong entity?

  • A weak entity is always a composite attribute.
  • A weak entity depends on a strong entity. (correct)
  • A weak entity has a primary key.
  • A weak entity cannot have relationships.
  • Which type of attribute can have multiple values associated with it?

  • Multivalued Attribute (correct)
  • Key Attribute
  • Derived Attribute
  • Composite Attribute
  • Which of the following correctly defines a composite attribute?

    <p>An attribute that can be broken down into smaller sub-attributes.</p> Signup and view all the answers

    In the context of attributes, what does a foreign key represent?

    <p>It references a primary key in another table.</p> Signup and view all the answers

    What type of attribute would 'Age' be classified as if it is derived from 'BornDate'?

    <p>Derived Attribute</p> Signup and view all the answers

    Which of the following best describes a primary key in a relational database?

    <p>An attribute that uniquely identifies each record in a table.</p> Signup and view all the answers

    Which of the following correctly represents a one-many relationship in a relational database schema?

    <p>CREATE TABLE Student (StudentID, Name, Age, Email, PhoneNum ); CREATE TABLE Subject (SubjectID, Subject_name, Subject_time, StudentID );</p> Signup and view all the answers

    What is the primary key in the following schema: CREATE TABLE Student (StudentID, Name, Age, Email, PhoneNum );

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

    In a many-one relationship schema, which table would contain the foreign key referencing the other?

    <p>Assign table referencing the Group table</p> Signup and view all the answers

    In the context of a relational database schema, what does the syntax 'CREATE TABLE Table_name (list of Attribute);' signify?

    <p>It defines a structure for the entities to be stored.</p> Signup and view all the answers

    Which of the following configurations would represent a many-many relationship in a relational database?

    <p>CREATE TABLE Student (StudentID, Name); CREATE TABLE Subject (SubjectID, Subject_name, Subject_time ); CREATE TABLE Enrollment (StudentID, SubjectID );</p> Signup and view all the answers

    What describes a one-to-many relationship?

    <p>One element of an entity is linked to many elements of another entity.</p> Signup and view all the answers

    Which of the following best exemplifies a many-to-many relationship?

    <p>A student enrolled in multiple subjects.</p> Signup and view all the answers

    What is the cardinality of the relationship between students and assignments?

    <p>M:N</p> Signup and view all the answers

    In which scenario would a one-to-one relationship be applicable?

    <p>An employee receiving a salary once a month.</p> Signup and view all the answers

    What does a many-to-one relationship indicate?

    <p>Several elements of one entity relate to a single element of another entity.</p> Signup and view all the answers

    Which phrase accurately defines cardinality in the context of relationships?

    <p>The specific number of relationships that one entity can have.</p> Signup and view all the answers

    Which of these examples does NOT illustrate a many-to-many relationship?

    <p>A child having one parent.</p> Signup and view all the answers

    What best represents a one-to-one relationship in a real-world scenario?

    <p>A traveler using one passport.</p> Signup and view all the answers

    Which of the following statements is true regarding a one-to-many relationship?

    <p>One lecturer can teach multiple students.</p> Signup and view all the answers

    Which statement best describes the concept of relationships in relational databases?

    <p>Relationships dictate the structure of data stored within a database.</p> Signup and view all the answers

    Study Notes

    Data Modeling Introduction

    • Data is represented using Entity-Relationship Diagrams (ERD).
    • Common data manipulation language includes CRUD (create, read, update, delete).
    • ERDs are frequently used in relational databases.

    Entity-Relationship Diagram (ERD)

    • Entity: An object or component of data (represented in rectangles). Entities are independent and complete in themselves, not dependent on other entities. They have a primary key.
    • Attributes: Characteristics of the entity or relationship (represented in ellipses/ovals).
    • Relationships: Associations between two or more entities.

    Entity Types

    • Strong Entity: Represented in a rectangle. Independent and complete. Holds its own primary key.
    • Weak Entity: Represented in a double rectangle. Dependent on another (strong) entity for its identity. Does not have a primary key.

    Attributes Types

    • Key Attribute: Uniquely identifies an individual record (data pointer). Includes primary keys (underlined) and foreign keys (dash underlined), which refer to primary keys in other tables.
    • Multivalued Attribute: Relates to foreign keys, can hold multiple values.
    • Derived Attribute: Value derived from another attribute (e.g., age derived from birthdate).
    • Composite Attribute: A combination of multiple attributes (e.g., full name composed of first name and last name).

    Relationships (Cardinality)

    • Relationship Types:
      • One-to-one (1:1): One element of an entity is linked to only one element of another entity (e.g., student to transport, one capital per nation).
      • One-to-many (1:N): One element links to more than one element of another entity. (e.g., student to subject).
      • Many-to-one (N:1): Many elements of an entity are linked to only one element of another entity (e.g., student to group).
      • Many-to-many (M:N): Many elements in one entity are linked to many elements in another entity (e.g., student to assignments).

    Relational Database Schema

    • Conceptual ERDs need conversion into relational schema for database systems.
    • Syntax for creating relational tables using SQL is provided (CREATE TABLE).

    Studying That Suits You

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

    Quiz Team

    Related Documents

    Data Modeling PDF
    Use Quizgecko on...
    Browser
    Browser