CS364 Test 1

Home > Preview

The flashcards below were created by user Anonymous on FreezingBlue Flashcards.

  1. What is a key constraint?
    A statement that a certain minimal subset of the fields of a relation is a unique identifier for a tuple.
  2. What is a candidate key (or simply key)?
    A set of fields that uniquely identifies a tuple according to a key constraint.
  3. What is a superkey?
    A set of fields that contains a key.

    * Since a relation is a set of tuples, the set of all fields is always a superkey.
  4. Two parts to definition of a key:
    • 1: Two distinct tuples in a legal instance cannot have identical values in all of the fields of a key.
    • 2: No subset of the set of fields in a key is a unique identifier for a tuple.
  5. Data definition language for creating a relation called Students with columns sid, name, login, age and gpa.
    • CREATE TABLE Students(
    • sid CHAR(20),
    • name CHAR(30),
    • login CHAR(20),
    • age INTEGER,
    • gpa REAL)
  6. Data Definition Language command to insert a tuple into the Students relation with columns for sid, name, login, age, and gpa.
    • INSERT
    • INTO Students (sid, name, login, age, gpa)
    • VALUES (53688, 'Smith', 'smith@ee', 18, 3.2)
  7. Data Definition Language command to delete a tuple from relation Students where name is Smith.
    • DELETE
    • FROM Students S
    • WHERE S.name = 'Smith'

Card Set Information

CS364 Test 1
2010-02-18 02:41:04
Database Management class

Database Systems chapters 1-3
Show Answers:

What would you like to do?

Home > Flashcards > Print Preview