Logical Database Design Flashcards
___________ is a named, two-dimensional table of data.
RELATION
Tables consists of rows (__________) and columns (_____________)
records and attribute or field
Requirements for a table to qualify as a relation
[1] It must have a unique name
[2] Every attribute value must be atomic
[3] Every row must be unique
[4] Attributes in tables must have unique names
[5] The order of the columns must be relevant
[6] The order of the rows must be irrelevant
All relations are in _______________________.
1st Normal Form
_____________ (tables) correspond with entity types and with many-to-many relationship types.
RELATIONS
_________________ correspond with entity instances and with many-to-many relationship instances
ROWS
______________correspond with attributes
COLUMNS
The word relation (in relational database) is the same as the word relationship in (E-R model)
True or False?
FALSE
These are unique identifiers of relation in question
PRIMARY KEYS
What are some examples of foreign keys?
(1) employee numbers
(2) social security numbers
_________________ are how we can guarantee that all rows are unique
PRIMARY 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)
FOREIGN KEYS
Keys can be simple but not composite
FALSE. Simple or Composite.
________ usually are used as indexes to speed up the response to user queries
KEYS
List three integrity constraints.
- Domain constraints
- Entity integrity
- Action assertions
This is an integrity constraint the comprises the allowable values for an attribute.
DOMAIN CONSTRAINT
This is a integrity constraint wherein no primary key attribute may be null. All primary key fields must have data.
ENTITY INTEGRITY
This integrity constraint is best described as business rules.
ACTION ASSERTIONS
This is an integrity constraint that states that any foreign key value (on the relation of the many side) must match a primary key value in the relations of the one side
REFERENTIAL INTEGRITY
An example of an integrity constraint is “Delete Rules.” This is comprised of three rules, these being:
- Restrict
- Cascade
- Set-to-Null
This “Delete Rule” does not allow the delete of the “parent” side if related rows exist in “dependent side.”
RESTRICT
This “Delete Rule” automatically deletes “dependent” side rows that correspond with the “parent” side row to be deleted.
CASCADE
This “Delete Rule” sets the foreign key in the dependent side to null if deleting from the parent side.
SET-TO-NULL
Set-to-Null is preferably used in weak entities.
FALSE. Set-to-Null is not allowed for weak entities
Referential integrity constraints are drawn via ____________ from dependent to parent table.
ARROWS
Referential constraints are implemented with foreign key to primary key references.
True or False?
TRUE
[Mapping Regular Entities to Relations]
How do we map simple attributes?
E-R attributes are mapped directly onto the relation. These are just copied.
[Mapping Regular Entities to Relations]
How do we map composite attributes?
Use only their simple, component attributes
[Mapping Regular Entities to Relations]
How do we map multivalued attributes?
Multivalued attributes become a separate relation with foreign key taken from the superior entity.
________________ enforce domain integrity constraints
DOMAIN DEFINITIONS