10.2.1 Tables, records, and fields

Cards (30)

  • In relational databases, tables are used to store and organize related data
  • Records in a table are also referred to as rows.
  • A field in a table represents a specific attribute
  • Match the key type with its definition:
    Primary Key ↔️ Uniquely identifies records in a table
    Foreign Key ↔️ Connects to primary key in another table
  • What is a primary key used for in a relational database?
    Ensuring record uniqueness
  • A table in a relational database is organized into rows and columns.
  • A single row in a table is called a record
  • What does a record in a relational database table represent?
    A single entity
  • Each field in a record represents a specific attribute
  • Fields in a relational database table can store different types of data, such as text, numbers, or dates.
  • Match the key type with its purpose:
    Primary Key ↔️ Ensures each record is distinct
    Foreign Key ↔️ Establishes relationships between tables
  • A primary key in a table cannot contain null values.
  • What does the data type of a field define in a relational database?
    Type of data stored
  • A field with the integer data type can store whole numbers without decimals
  • In relational databases, data types define the type of data that can be stored in a field
  • What type of data stores whole numbers without decimals?
    Integer
  • What type of data stores numbers with decimals?
    Float
  • The Text data type stores strings of characters.
  • In the students table, the ID field is an integer
  • Match the database term with its definition:
    Table ↔️ A collection of related data in rows and columns
    Record ↔️ A single row containing data for one entity
    Field ↔️ A column representing a specific attribute
  • A table is a collection of related data in rows and columns
  • What does a record in a relational database table represent?
    A single entity
  • Fields define the structure of a table in relational databases.
  • What is the primary purpose of a primary key in a table?
    Uniquely identify records
  • A foreign key is a field in one table that references the primary key of another table
  • In the students table, which field is the primary key?
    ID
  • In the enrollments table, which field is the foreign key linking to the students table?
    StudentID
  • Order the three main types of relationships in relational databases based on their complexity:
    1️⃣ One-to-One
    2️⃣ One-to-Many
    3️⃣ Many-to-Many
  • In a one-to-many relationship, one record in table A can be related to multiple records in table B
  • Which type of relationship requires a linking table with composite foreign keys?
    Many-to-Many