Database Design Flashcards
Database design begins with blank for the database.
verbal or written requirements
Requirements are formalized as a blank and then implemented in SQL.
an entity-relationship model
An entity-relationship model is a high-level representation of blank, ignoring implementation details.
Data requirements
An entity-relationship model guides blank in a particular database system, such as MySQL.
Implementation
An entity-relationship model includes what three kinds of objects:
Entity
Relationship
Attribute
An blank is a person, place, product, concept, or activity.
Entity
A blank is a statement about two entities.
Relationship
An blank is a descriptive property of an entity.
Attribute
A relationship is usually a statement about two different entities, but the two entities may be the same. A blank relates an entity to itself.
Reflexive relationship
When the model is implemented in SQL, entities typically become blank. Relationships and attributes typically become blank and blank, respectively.
Tables
Foreign keys
Columns
some relationships and attributes become tables. Since the conversion is indirect, requirements are documented as blank, blank, and blank rather than tables, keys, and columns.
entities, relationships, and attributes
Attribute is used in both entity-relationship and relational models. In the relational model, attribute is a formal term for blank
Column
An blank commonly called an ER diagram, is a schematic picture of entities, relationships, and attributes.
entity-relationship diagram
Entities are drawn as blank
Rectabgles
Relationships are drawn as blank connecting rectangles
Lines
Attributes appear as blank within an entity rectangle, under the entity name.
Additional text
Blank and blank always appear in ER diagrams. Blank are optional and only appear when additional detail is needed.
Entities and relationships
Attributes
A blank, also known as a data dictionary or repository, documents additional detail in text format.
Glossary
A glossary includes blank, blank, and blank of entities, relationships, and attributes.
names, synonyms, and descriptions
The ER diagram and glossary are complementary and, together, completely describe an blank
entity-relationship model.
In entity-relationship modeling, a blank is a set:
Type
An blank is a set of things. Ex: All employees in a company.
Entity type
A blank is a set of related things. Ex: Employee-Manages-Department is a set of (employee, department) pairs, where the employee manages the department.
Relationship type
An blank is a set of values. Ex: All employee salaries.
Attribute set
Entity, relationship, and attribute types usually become blank, blank, and blank , respectively.
tables, foreign keys, and columns, respectively.
An blank is an element of a set:
Instance
An blank is an individual thing. Ex: The employee Sam Snead.
Entity instance
A blank is a statement about entity instances. Ex: “Maria Rodriguez manages Sales.”
Relationship instance
An blank is an individual value. Ex: The salary $35,000.
Attribute instance
Complex databases are developed in three phases. Name them
Analysis
Logical design
Physical design
Blank develops an entity-relationship model, capturing data requirements while ignoring implementation details.
Analysis
Blank converts the entity-relationship model into tables, columns, and keys for a particular database system.
Logical design
Blank adds indexes and specifies how tables are organized on storage media.
Physical design
Execution of database design is not always blank. Often an early step is revisited after a later step is completed.
Sequential
Blank is dependent on specific index and table structures, which vary greatly across relational databases.
Physical design
Name the four analysis steps
- Discover entities, relationships, and attributes
2 Determine cardinality
3 Distinguish strong and weak entities
4 Create supertype and subtype entities
Name the four logical design steps
5 Implement entities
6 Implement relationships
7 Implement attributes
8 Apply normal form
Entities, relationships, and attributes are blank in interviews with database users and managers.
Discovered
In addition to interviews, blank are a good source of data requirements.
Written documents
In interviews and documents, entities, relationships, and attributes surface as blank and blank
Nouns and verbs
Entities usually appear as blank, but not all blank are entities. Designers should ignore nouns that denote specific data or are not relevant to the database.
Nouns
Relationships are often expressed as blank. Designers should ignore statements that are not about entities, not relevant to the database, or redundant to other relationships. Designers should look for relationships that are not explicitly stated, since users may overlook important information.
Verbs
Attributes are usually blank that denote specific data, such as names, dates, quantities, and monetary values
Nouns
Entity names are a blank noun. Ex: Employee rather than Employees. The best names are commonly used and easily understood by database users.
Singular
Relationships names have the form blank, such as Division-Contains-Department.
Entity-Verb-Entity
When the related entities are blank, in ER diagrams or informal conversation, Verb is sufficient and entity names can be omitted.
Obvious
The verb should be blank rather than passive
Active
Occasionally, the same verb relates blank. Ex: Order-Contains-LineItem and Division-Contains-Department.
Different entity pairs
Attribute names have the form blank, such as EmployeeFirstName:
EntityQualifierType
Blank is the name of the entity that the attribute describes. When the entity is obvious, in ER diagrams or informal conversation, blank is sufficient and the entity name can be omitted.
Entity
QualifierType
Qualifier describes the blank of the attribute. Ex: First, Last, and Alternate. Sometimes a qualifier is unnecessary and can be omitted. Ex: StudentNumber.
Meaning
Blank is chosen from a list of standard attribute types such as Name, Number, and Count. Attribute types are not identical to SQL data types. Ex: “Amount” might be an attribute type representing monetary values, implemented as the MONEY data type in SQL. “Count” might be an attribute type representing quantity, implemented as NUMBER in SQL.
Type
Often, entity, relationship, and attribute names have blank
Synonyms
Synonyms are common in informal communications. To avoid confusion, one official name is selected for each entity, relationship, and attribute. Other names are blank as synonyms.
Documented as synonyms
In the first step of the logical design phase, each entity becomes a blank and each attribute becomes a blank.
Table
Column
As tables and columns are specified, blank are selected.
primary keys
Primary keys must be blank and not blank, and thus correspond to unique and required attributes
unique
null
Name three things primary keys should be (outside of unique and null)
Stable.
Simple
Meaningless.
Primary key values should not blank
change
When a primary key value changes, statements that blank the old value must also change. Furthermore, the new primary key value must blank to matching foreign keys.
specify
cascade
Primary key values should be easy to blank and blank. Small values are easy to specify in an blank clause and speed up query processing.
Type and store
SQL WHERE
Primary keys should not contain blank. Blank occasionally changes, so primary keys containing blank are unstable.
Descriptive information
Stable, simple, and meaningless primary keys are blank but not blank. Depending on database standards, these guidelines may be violated in some cases.
desired
required
On table diagrams, blank denote primary key columns.
solid bullets (●)
A strong entity becomes a blank.
strong table
Blank primary keys are best, but if no such column exists, a blank may have the required properties
Single-column
composite primary key