• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/22

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

22 Cards in this Set

  • Front
  • Back
What is the definition of a Relation
A relation is a named, two-dimensional table of data
What do tables consists of
Table consists of rows (records) and columns (attribute or field)
What are the Requirements for a table to qualify as a relation:
It must have a unique name
Every attribute value must be atomic (not multivalued, not composite)
Every row must be unique (can’t have two rows with exactly the same values for all their fields)
Attributes (columns) in tables must have unique names
The order of the columns must be irrelevant
The order of the rows must be irrelevant
What do Relations (tables) correspond with
Relations (tables) correspond with entity types and with many-to-many relationship types
The word relation (in relational database) is NOT the same as
the word relationship (in E-R model)
Keys are special fields that serve two main purposes:
Primary keys are unique identifiers of the relation in question. Examples include employee numbers, social security numbers, etc. This is how we can guarantee that all rows are unique

Foreign keys are identifiers that enable a dependent relation (on the many side of a relationship) to refer to its parent relation (on the one side of the relationship)
Keys usually are used as
indexes to speed up the response to user queries
Keys can be
simple (a single field) or composite (more than one field)
A primary key is
used to uniquely identify a row and a table.
What are columns in a table
attributes.
What are rows in a table
instances
What are Integrity Constraints
Domain Constraints
Allowable values for an attribute.

Entity Integrity
No primary key attribute may be null. All primary key fields MUST have data

Action Assertions
Business rules. Recall from previous lecture.
What are domain constraints
only can so many of a certain type
What are the 3 things when Mapping Regular Entities to Relations
Simple attributes: E-R attributes map directly onto the relation
Composite attributes: Use only their simple, component attributes
Multivalued Attribute–Becomes a separate relation with a foreign key taken from the superior entity
What can 2 foreign keys TOGETHER make up
primary key. Two foreign keys can be a composite to form a primary key.
what can referential integrity not do?
Can not delete a row of a parent table as long as there are dependent entities referring to it. Have to delete all the tables that are dependent on the parent table first, if you want to clean up your database.
Every attribute value is
atomic
First Normal Form is used to remove what
one to many relationships in the table
Second Normal Form is used to remove what
many to many relationships in the table
What are you trying to get in using First normal form and second normal form.
a one to one relationship in a table.
What does third normal form do.
Removes the transitive dependencies
What are Enterprise Keys
Primary keys that are unique in the whole database, not just within a single relation
Corresponds with the concept of an object ID in object-oriented systems