Database-Chap 6 Flashcards

Advanced data modelling

1
Q

Extended relational data model

A

Semantic data model developed in response to increasing complexity of applications
DBMS based on the ERDM often described as an object/relational DBMS
Primarily geared to business applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Entity super type

A

Generic entity type that is related to one or more entity subtypes
Contains common characteristics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Entity sub type

A

Contains unique characteristics of each entity subtype

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Specialization hierarchy rules

A

-Depicts arrangement of higher-level entity super types(parent entities) and lower-level entity subtypes(child entities)
-Subtype can exist only within context of subtype
-Every subtype can have only one super type to which it is directly related

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Specialization hierarchy provides the means to

A

1)Support attribute inheritance
-Enables an entity subtype to inherit the attributes and relationships of the super type
2)Define a special super type attribute known as the subtype discriminator
3)Define disjoint? overlapping constraints and complete/partial constraints

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Property of inheritance

A

Support attribute inheritance
-Enables an entity subtype to inherit attributes and relationships of the super type
-Subtypes can have specialized attributes in addition to inherited attributes
Sub type discriminator
-A special attribute used to determine the subtype of an entity
-Helps distinguish between different subtypes of a super type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Disjoint constraint

A

An entity can belong to only one subtype

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Overlapping constraint

A

An entity can belong to multiple sub types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Partial constraint

A

Some instances of the super type might not belong belong to any subtype

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Complete constraint

A

Every instance of the super type must belong to at least one subtype

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Inheritance

A

-Enables entity sub type to inherit attributes and relationships of a super type
-All entity subtypes inherit their primary key attribute from their super type
-All implementation level, super type and its sub types depicted in the specialization hierarchy maintain a 1:1 relationship

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Specialization

A

Top-down process of identifying lower-level ,more specific entity sub types from higher -level entity super types
Based on grouping unique characteristics and relationships of the sub types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Generalization

A

Bottom-up process of identifying higher-level ,more generic entity super types from lower-level entity sub types
Based on grouping common characteristics and relationships of the subtypes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Composition

A

-Special case of aggregation-mandatory association
-When the parent entity instance is deleted ,all child entity instances are automatically deleted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Aggregation

A

-A larger entity can be composed of smaller entities
-Optional association
-When you delete the parent entity the child entity is not deleted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Aggregation construct

A

Is used when an entity is composed of(or is formed by) a collection of other entities are independent of each other ,the relationship can be classified as a ‘has-a’ relationship type

17
Q

A composition construct

A

Is used when two entities are associated in an aggregation association with a strong identifying relationship

18
Q

Entity clustering “place holder”

A

-A “virtual” entity type used to represent multiple entities and relationships in an ERD
-Considered “virtual” or “abstract” because it is not actually an entity in final ERD
-Temporary entity used to represent multiple entities and relationships
-Eliminate undesirable consequences caused by missing information
-Avoid display of attributes when entity clusters are used

19
Q

Natural keys

A

Or natural identifier is a real-world ,generally accepted identifier used to uniquely identify real-world objects
-Data modeler uses natural identifier as primary key of entity being modeled

20
Q

Primary key

A

Is an attribute or combination of attributes that
-Uniquely identifies entity instances in an entity set-main function
-Guarantee entity integrity
-Non-intelligent :The PK should not have embedded semantic meaning
-No change over time
-Preferably single-attribute
-Preferably numeric
-Security complaint etc. using a social security number

21
Q

When to use composite keys(case 1)

A

Useful as identifiers of composite entities, where each PK combination is allowed only once in a many to many relationship
-Automatically provides benefit of ensuring that there cannot be duplicate values

22
Q

When to use composite keys(case 2)

A

Useful as identifiers of weak entities ,where weak entity has strong identifying relationship with parent entity
-Normally used to represent:
-A real-world object that is existent-dependent on another real-world object
-A real-world object that is represented in the data model as two separate entities in a strong identifying relationship

23
Q

When to use surrogate PKs

A

-A surrogate PK is a replacement for unsuitable attributes
Especially helpful when there is:
-No natural key
-Selected candidate key has embedded semantic contents
-Selected candidate key is too long/cumbersome

24
Q

Primary key guidelines

A

You should understand the function of a PK
-PKs and FKs are used to implement relationships among entities

25
Design case 1(implementing one: one relationships)
-Foreign keys work with primary keys to properly implement relationships in a relational model -In a one: many relationship you put the PK of the "one" side(parent entity) on the "many" side(dependent entity) as the foreign key 1:One side is mandatory and the other side is optional 2:Both sides are optional 3:Both sides are mandatory
26
Design case 2(maintaining history of time-variant data)
Time-variant: Refers to data whose values change over time and for which you must keep a history of data changes
27
Design case 3(Fan traps)
-Design trap occurs when relationship is improperly or incompletely identified -Most common design trap is known as fan trap -Fan trap occurs when having one entity in two 1:* relationships to other entities -Thus producing an association among other entities that is not expressed in the model
28
Design case 4(Redundant relationships)
-Redundancy is seldom a good thing in database environment -Occurs when there are multiple relationship paths between related entities -Main concern is that redundant relationships remain consistent across model
29
Case 1 action
Place the PK of the entity on the mandatory side in the entity on the optional side as a FK and make the FK mandatory
30
Case 2 action
Select the FK that causes the fewest no. of nulls or place the FK in the entity in which the relationship role is played
31
Partial(optional)
Disjointconstraint(OR) -Super type has optional subtypes -Subtype discriminator can be null -Subtype sets are unique Overlapping constraint(AND) -Sub type has optional sub types -Sub type discriminators can be null -Sub type sets are not unique
32
Total(mandatory)
Disjoint(or) -Every super type instance is a member of (at least one) subtype -Subtype discriminator cannot be null -Subtype sets are unique Overlapping(and) -Every super type instance is a member of (at least one) sub type -Subtype discriminators cannot be null -Sub type set are not unique