The Relational Database Model

Cards (62)

  • Introduced by E. F. Codd in 1970, is based on predicate logic and set theory.
    Relational Model
  • Is used extensively in mathematics to provide a framework in which an assertion (statement of fact) can be verified as either true or false.
    Predicate Logic
  • A student with a student ID of 324452 is named Mark Reyes is an example of?
    Predicate Logic
  • A part of mathematical science that deals with sets, or groups of things.
    Set Theory
  • Used as the basis for data manipulation in the relational model.
    Set Theory
  • Set A contains 15, 23, and 52 while Set B contains 41, 52, 70, 12 is an example of?
    Set Theory
  • The relational model has three (3) components:
    1. A logical data structure represented by relations
    2. A set of integrity rules to enforce that the data is consistent and remains consistent over time
    3. A set of operations that defines how data is manipulated
  • Is as a two-dimensional structure composed of rows and columns.
    Table (relation)
  • Represents data about an entity.
    Each table row (tuple)
  • Each table column represents an attribute, and each column has a distinct name.
  • Each intersection of a row and column represents a single data value.
  • All values in a column must conform to the same data format.
  • Specific range of values.
    Attribute Domain
  • Is an attribute or group of attributes that determines the values of other attributes.
    Key
  • Invoice number is an example of a key.
  • The value of one or more attributes determines the value of one or more other attributes.
    Functional dependence
  • The attribute whose value determines another.
    Determinant
  • The attribute whose value is determined by the other attribute.
    Dependent
  • The standard notation for representing the relationship between attributes is: ATT_A → ATT_B.
    ATT_A is the determinant and ATT_B is the dependent.
  • Involves a determinant that comprises multiple attributes. For example, STU_NUM → (STU_LNAME, STU_FNAME, STU_MI, STU_SECT)
    Functional Dependence
  • A key that is composed of more than one attribute.
    Composite Key
  • An attribute that is a part of a key.
    Key Attribute
  • 5 Types of Keys
    1. Superkey
    2. Candidate Key
    3. Primary Key
    4. Foreign Key
    5. Secondary Key
  • ATT_A → ATT_B is the Standard Notation.
  • An attribute or combination of attributes that uniquely identifies any row in the table.
    Superkey
  • A superkey without any unnecessary attributes.
    Candidate Key
  • Cannot contain null entries.

    Primary Key
  • A candidate key selected to uniquely identify all other attribute values in any given row.
    Primary Key
  • Values must either match the primary key in another table or be null.
    Foreign Key
  • Used strictly for data retrieval purposes.
    Secondary Key
  • Is the condition in which each row in a table has its own unique identity.
    Entity Integrity
  • Every reference to an entity instance by another entity instance is valid.
    Referential Integrity
  • These are rules that are followed to maintain a good database design.
    Integrity Rules
  • All primary key entries are unique.
    No part of a primary key may be null.

    Requirement (Entity Integrity)
  • Each row will have a unique identity
    Foreign key values can properly reference primary key values.
    Purpose (Entity Integrity)
  • No invoice can have a duplicate number, nor can it be null; in short, all invoices are uniquely identified by their invoice number.
    Example (Entity Integrity)
    • A foreign key may have either a null entry, as long as it is not a part of its table’s primary key, or an entry that matches the primary key value in a table to which it is related.
    • Every non-null foreign key value must reference an existing primary key value.
    Requirement (Referential Integrity)
    • It is possible for an attribute not to have a corresponding value, but it will be impossible to have an invalid entry.
    • The enforcement of the referential integrity rule makes it impossible to delete a row in one table whose primary key has mandatory matching foreign key values in another table.
    Purpose (Referential Integrity)
  • A customer might not yet have an assigned sales representative (number), but it will be impossible to have an invalid sales representative (number).
    Example (Referential Integrity)
  • Used to indicate the absence of some value.
    Flags