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. (A)</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. (D)</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 (B)</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. (C)</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 ); (D)</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 (B)</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 (B)</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. (D)</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 ); (C)</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. (D)</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. (B)</p> Signup and view all the answers

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

<p>M:N (B)</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. (C)</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. (C)</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. (B)</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. (D)</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. (C)</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. (A)</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. (D)</p> Signup and view all the answers

Flashcards

Entity Relationship Diagram (ERD)

A graphical representation of data entities, their attributes, and relationships between them.

Entity

A fundamental building block of an ERD, representing a distinct object or concept in the data model.

Attribute

A characteristic or property of an entity.

Relationship

An association between two or more entities, indicating how they are related.

Signup and view all the flashcards

Key Attribute

An attribute that uniquely identifies each instance of an entity, like a student ID number.

Signup and view all the flashcards

Multivalued Attribute

An attribute that can hold multiple values for a single instance of an entity, like a student's phone numbers.

Signup and view all the flashcards

Derived Attribute

An attribute whose value is derived from other attributes, like a student's age calculated from their birth date.

Signup and view all the flashcards

Cardinality

The possible number of occurrences of an entity in a relationship.

Signup and view all the flashcards

One-to-One Relationship

One entity can be linked to only one entity on the other side of the relationship.

Signup and view all the flashcards

One-to-Many Relationship

One entity can be linked to multiple entities on the other side of the relationship.

Signup and view all the flashcards

Many-to-One Relationship

Multiple entities can be linked to only one entity on the other side of the relationship.

Signup and view all the flashcards

Many-to-Many Relationship

Multiple entities can be linked to multiple entities on the other side of the relationship.

Signup and view all the flashcards

Database Schema

A database schema is a structured representation of data in a database. It describes the data types, relationships, and constraints of the database.

Signup and view all the flashcards

Translating Conceptual ERD

A process of translating the conceptual ERD into a relational database model using tables, rows, and columns.

Signup and view all the flashcards

Relational Database

A database model that uses tables to represent an entity and rows and columns to represent an attribute.

Signup and view all the flashcards

Relational Schema

Describes the structure and organization of a relational database, showing tables, columns, relationships, and constraints.

Signup and view all the flashcards

Primary Key

A special attribute uniquely identifying each record in a table. It helps to maintain data integrity and prevent duplicate entries.

Signup and view all the flashcards

Foreign Key

A key attribute in one table that refers to the primary key in another table. It establishes a link between related tables, enforcing data consistency.

Signup and view all the flashcards

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