Shared Flashcard Set

Details

Quiz 2: Chapter 5
Review Questions from Chapter 5
18
Computer Science
Undergraduate 3
10/26/2012

Additional Computer Science Flashcards

 


 

Cards

Term

Define entity.


Give an example of an entity, other than the one presented in this book.

Definition

An entity is something that users want to track

 

Example: FUTURAMA (TV show)

 

[image]

Term
Explain the difference between an entity class and an entity instance
Definition

An entity class is a collection of entities of a given type (TV shows), 

 

Whereas an entity instance is a partial occurence of an entity ('Character' Farnsworth, 'Travels' forward in time)

 

 

Term

Define attribute


Give an example attribute for the entity you made previously.

Definition

An attribute is a column of relation

(A property of an entity, in other words) 

 

 

EXAMPLE: Of the entity FUTURAMA, "CharacterName," could be an attribute.

Term

Define identifier


Give an example identifier for the entity you made previously.

Definition

An identifier is an an attribute that identifies an entity (usually a primary key).

 

EXAMPLE: The FUTURAMA instance can be identified by 'EpisodeNumber', or 'SeasonNumber'.

Term
Give an example of a composite identifier
Definition

composite identifier is an identifier consisting of 2 or more attributes.

 

EXAMPLE: ('SeasonNumber', 'EpisodeNumber')

Term

Explain the difference between an entity and a table.

 

Why is this difference important?

Definition

"The principle difference between an entity and a table is that you can express a relationship between entities without using foreign keys.

 

In the ER model, you can specify a relationship just by drawing a line connecting two entities....

 

This is important because it makes entities easier to work with than tables, especially early in the project when entities and relationships are fluid and uncertain. You can show relationships between entities before you even know what the identifiers are." ~p.148

Term

Define the terms:


- Maximum Cardinality


- Minimum Cardinality

Definition

Maximum Cardinality is the maximum number of entity-instances that can participate in a relationship.

 

Minimum Cardinality is the minimum number of entity-instances that can participate in a relationship.

Term

What is an ID-dependent entity?

 

Give an example of an ID-dependent entity other than the one presented in the book.

Definition

An ID-dependent entity is an entity whose identifier includes the identifier of another entity.

 

EXAMPLE: ('ApartmentNumber, 'BuildingName') 

Term

What rules exist when creating an instance of an ID-dependent entity?

 

What rules exist when deleting the parent of an ID-dependent entity?

Definition

-When creating an instance of an ID-dependent entity, the minimum cardinality from the ID-dependent entity to the parent must always be 1.

 

-When deleting the parent row of an ID-dependent entity, all child rows must be deleted as well.

Term

What is a weak entity

 

How do weak entities relate to ID-dependent entities?

 

Definition

A weak entity is an entity whose existence depends on the presence of another entity.

 

Weak entities relate to ID-dependent entities in that all ID-dependent entities are weak; an ID-dependent entity is an entity whose identifier includes the identifier of another.

 

EXAMPLE: The Entity

  • PLANET_EXPRESS_SHIP (Creator, Model, Description, DarkMatterLevel, EngineType, RepairPrice) 

is a weak entity that depends entirely on the entity

  • SPACESHIP (CreatorModel, DateMade, Color, Size, LengthsOfWire)
Term
What is the most important reason for using subtypes in a data model?
Definition

subtype is an entity that is a sub-category of a higher level type (super type).

 

EXAMPLE (not Futurama related): STUDENT is a super-type, whereas FRESHMAN, SOPHOMORE, JUNIOR, SENIOR are the sub types.

 

The most important reason for creating subtypes in a data model is to avoid value-inappropriate nulls.

 

EXAMPLE: Undergraduate students take the SAT exam and report that score, whereas graduate students take the GMAT and report that score. Thus, the SAT score would be NULL in all STUDENT entities for graduates, and the GMAT score would be NULL for all undergraduates. Such nulls values can be avoided by creating subtypes. 

Term

Explain why the following form (Figure 5-15) and report indicate that the underlying relationship is 1:1


[image]

Definition
There is exactly 1 Locker assigned to each Member. 1 Locker for 1 Member means that the relationship is 1:1.
Term

Why does the form below (Figure 5-17) not indicate that the underlying relationship is 1:N?


What additional information is required to make that assertion?


[image]

Definition
The company has many departments, so the maximum cardinality from COMPANY to DEPARTMENT is N. If we assume that multiple companies are not sharing the same department, then the relationship must be 1:N.
Term

How can you assess minimum cardinality for the following form (Figure 5-17):


[image]

Definition
We know that a department must have a company, but we cannot know from the diagram if a company has to have departments. To get that information, we must ask the user.
Term

Explain why the form and report below (Figure 5-19) indicate that the underlying relationship is N:M


[image]

(my bad! Forgot to include the report! Just look to the book for this one picture)

Definition
In 5-19(a), we see that that each supplier can be related to many parts. In 5-19(b), we see that that each part can be related to many suppliers. Hence the relationship is N:M.
Term

Explain how the association pattern differs from the N:M strong entity pattern.


What characteristics of the report below (Figure 5-21) indicates that an association pattern is needed?


[image]

Definition

An association pattern differs from the N:M strong entity pattern because it has attributes of a combination of the two entities.

 

In figure 5-21, the Price attribute (which belongs to a combination of part and company) indicates that an association pattern in needed.

Term
In general terms, explain how to differentiate an N:M strong entity pattern from an association pattern
Definition
An N:M strong entity pattern only has attributes that belong to either entity, whereas an  association pattern also has attributes that belong to a combination of the two entities.
Term

What are all of the Cardinalities?

 

(Symbol and Meaning on flip-side of this card)

Definition
[image]
Supporting users have an ad free experience!