• 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/45

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;

45 Cards in this Set

  • Front
  • Back

What is the main goal of database design?

Produce a set of tables that can store the data required by an enterprise.

What can database tables represent?

Entities and relationships between entities.

What are the five main steps in database design?

1) Requirements analysis.


2) Conceptual Database Design.


3) Logical Database Design (schema refinement).


4) Physical Database Design.


5) Security Design.

What questions are involved in requirements analysis?

1) What data are to be stored?


2) What applications are required to work with the database?


3) Which are the most frequent, and the most important operations?

Describe five steps taken during conceptual database design.

1) User the ER model to develop a high level description of the data.


2) Identify the entities and relationships in the enterprise.


3) Identify what information about these entities and relationships is to be stored in the database.


4) Identify the integrity constraints that apply to the entities and relationships.


5) Check with the client that the ER model that has been developed is correct.

What are three steps taken during logical database design?

1) Determine which data model should be used to implement the database.


2) Determine which DBMS to use.


3) Map, or translate, the conceptual schema to a database schema of the chosen model.

What are two major problems to avoid in database design?

1) Redundancy.


2) Incompleteness.

What are the four main components of the ER model?

1) Entities.


2) Attributes.


3) Relationships.


4) Constraints.

What is an entity?

A distinguishable object.

What is an entity set?

A collection of entities of the same type.

What is an attribute?

An entity is described by a set of attributes.

How do you represent an entity and its attributes in an ER diagram?


What are four types of attributes?

1) Single valued.


2) Composite.


3) Multi valued.


4) Derived.

What is a composite attribute?

They group related attributes together. They should be replaced with their sub-parts on the ERD.




eg. Address = City, Street, Number

What is a multi valued attribute?

Multiple attributes of the same type. They should be replaced by an entity set and a relationship between the two sets.




eg. Phone numbers or cars.

What is a derived attribute? How do you display it on an ERD?

It an an attribute derived from other values.




It is displayed as an oval with a dotted line as the border.




Note that derived attributes do not need to be stored in the database; they are presumed to be calculated when needed.





What is a key?

A set of attributes whose values uniquely identify an entity in an entity set.

What are the three types of keys? Briefly describe each.

1) Super key: any set of attributes whose values uniquely identify an entity in an entity set.


2) Candidate key: a minimal super key, that is a super key with no extraneous attributes. (a relation can have more than one candidate key)


3) Primary key: the candidate key designated by the database designer to refer to rows in the table. (they are underlined in an ERD)

What is a relationship?

An association between two or more entities.

What is a relationship set?

A set of relationships of the same type.

What can relationship sets contain? What is the limitation?

Descriptive attributes that cannot be part of a relationship set's primary key.

How do you represent a relationship set on an ERD?

What are mapping cardinalities?

They specify how many entities may be related to entities they are related to.




ie. one-to-one, one-to-many, many-to-one, many-to-many.

How are mapping cardinalities represented on an ERD?

Directed and undirected lines.




Arrows points from an entity set to the relationship set.




ie. An employee can work in only one branch. A branch can have many employees working in it.

What are the attributes of a relationship set?

1) The attributes that comprise the primary keys of the participating entity sets. (and)


2) Any descriptive attributes of the relationship set.

What does the primary key of a relationship depend on?

The key constraints in the relationship.




eg.




many-to-many: all the non descriptive attributes of the relationship set.


one-to-many: the primary key for the many entity.


one-to-one: the primary key of either entity.

What are the attributes of works_in? 


What is the primary key of works_in?


Why?

What are the attributes of works_in?




What is the primary key of works_in?




Why?

1) sin and branchName.




2) sin.




Each employee can only work in one branch, so can appear in works_in only once. Therefore we can uniquely identify the relationship with just sin.

What is a participation constraint?

Each entity in an entity set must be involved in at least one relationship.

What are two types of participation constraints? Define them.

1) Total: there is a constraint.




2) Partial: no constraint.

How do you indicate a total participation constraint on an ERD?

A double line from the relationship to the entity (or a thick line).

A double line from the relationship to the entity (or a thick line).

What is a ternary relationship?

A relationship between a set of three entities.

What is a weak entity set?

A weak entity cannot be identified by its own attributes alone. They are identified by combining its partial key with the primary key of another entity set (owner entity set).

When are weak entity sets permitted?

1) The owner and weak entity set participate in a one-to-many identifying relationship set and



2) The weak entity set has total participation in the identifying relationship.



Draw an example of a weak entity set between a House and a Room.



What is a class hierarchy? What can be said about the attributes?

Sub-classing of entities where each entity in a subclass is also an entity in the superclass.




The attributes of the superclass are inherited by the subclass entities.



The subclass relationship is sometimes referred to as an ________ relationship.

is-a

What is specialization?

Superclass --> Subclass through new attributes.

What is generalization?

Subclass --> Superclass through common attributes.

What do subclass entities also inherit?

Participation in superclass relationship sets.

Draw an ERD for the subclasses of RentalProperty and HeritageBuilding with the superclass of Building.

What is the difference between condition-defined and user-defined participation of entities in a subclass?

1) Must meet some condition (eg. type = savings only for SavingsAccount).




2) Entity assigned to subclass by database user (employees assigned to Manager subclass).

What is aggregation?

Indicates that a relationship set participates in another relationship set. This is basically an abstraction of a relationship set.

When should aggregation be used?

1) When there is a relationship between an entity set and another relationship.




2) Aggregation is often used with non-binary relationships.

Draw an aggregation of the Branch buys Part from Supplier ERD.

Name four ER design principles.

1) Faithfulness.


2) Avoid redundancy.


3) Simplicity.


4) Specify as many constraints as possible.