Database Design and ER Flashcards

1
Q

T or F. In a total generalisation, every occurrence of the parent entity is always a occurrence of one of the child entities.

A

True.

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

T or F. Logical design and conceptual design should be carried out simultaneously (at the same time) when designing a database.

A

False.

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

T or F. Natural join is equivalent to where clause join of TableA.Attribute=TableB.Attribute

A

False.

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

T or F. The SQL statement DELETE FROM A removes table A from the database schema.

A

False.

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

T or F. If the cardinality of an attribute is equal to (0,1), the cardinality can be omitted in the Entity Relationship Diagram.

A

False.

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

T or F. If the cardinality of an attribute is equal to (1,1), the cardinality can be omitted in the Entity-Relationship diagram.

A

False.

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

T or F. During logical design, every redundancy in the input ER schema must be removed before the translation to a relational schema.

A

False.

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

T or F. An attribute with a cardinality of [0,1] cannot be used as part of an identifier.

A

True.

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

T or F. Not all entities must have explicit cardinalities for each of their relationships.

A

False.

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

What is database design?

A

Database design is the process of defining the structure, characteristics, and contents of a database according to specified requirements.

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

Name 6 stages of DB design.

A

Feasibility study
Collection & analysis of requirements
Design
Implementation
Validation & Testing
Operation

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

What are the three phases of the DB design process?

A

Conceptual design
Logical design
Physical design

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

Define entity-relationship model.

A

The Entity Relationship Model is a conceptual data model which provides a set of constructs capable of describing the data requirements of an application in a way that is easy to understand and independent of the criteria for the management and organisation of data on the system.

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

What do the following represent in the ER model?
(a) Rectangle
(b) Diamond
(c) line with circle on one end
(d) ______
( )
______

A

(a) Entity
(b) Relationship
(c) Attribute
(d) Composite attribute

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

What do the following represent in the ER model?
(a) Attribute with circle coloured in black within entity.
(b) Attribute with circle coloured in black to a relationship.
(c) Arrow with black top

A

(a) Internal identifier (primary key)
(b) External identifier (foreign key, can also be primary key that uses attribute from other entity)
(c) Generalisation

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

What are entities?

A

Entities represent classes of objects that have properties in common and an autonomous existence.

17
Q

What are relationships?

A

Relationships represent logical links between two or more entities.

18
Q

What is a recursive and ternary relationship?

A

Recursive relationship with itself
Ternary relationship involves three entities.

19
Q

What are attributes?

A

Attributes describe the elementary properties of entities or relationships.

20
Q

What are composite attributes?

A

Attributes with closely connected meanings or uses.

21
Q

What cardinality can be omitted in the ER diagram?

A

(1,1)

22
Q

T or F. An idenitfier can have cardinality (0, 1)

A

False.

23
Q

T or F. An entity can have more than one identifier in ER diagram.

A

True.

24
Q

T or F. Each entity must have at least one (internal or external) identifier.

A

True

25
Q

T or F. An external identifier can not involve an entity that is in its turn identified externally.

A

False.

26
Q

T or F. Cycles of external identifiers are allowed.

A

False.

27
Q

What is a generalisation?

A

A generalisation represents a logical link between an entity E (parent), and one or more (child) entities E1, E2, …, En called child entities, of which E is a more general version.

28
Q

Distinguish between total and partial generalisation. How are they distinguished on ER diagram?

A

A generalisation is total if every occurrence of the parent entity is also an occurrence of one of the child entities, otherwise it is partial.

A fully coloured in arrow vs partial which only has top coloured in.

29
Q

Further classify partial generalisation into exclusive and overlapping. Formally and informally.

A

Exclusive: If every occurence of the parent entity is an occurence of at most one of the child entities.
Overlapping otherwise.

E.g. In an exclusive generalisation all the possible child entities are accounted for.

30
Q

Downsides of ER schema. Name three.

A

Names of concepts may be insufficient to convey their meaning.
It may be difficult to represent all attributes of every entity and relationship.
Some data properties and constraints are difficult to be represented.

31
Q

Name 5 steps of conceptual design.

A

Standardise sentence structure.
Avoid complex phrases.
Identify synonyms and homonyms, and standardise terms.
Make cross-references explicit.
Construct a glossary of terms.

32
Q

Name four properties of a good conceptual schema.

A

Correctness
Completeness
Readability
Minimality

33
Q

Name the two steps of logical design.

A

Restructuring of the ER schema
Translation into the logical model

34
Q

Name four steps of the restructuring step.

A

Analysis of redundancies
Removing generalisations
Partitioning/merging of entities and relationships
Selection of primary identifiers.

35
Q

What is a redundancy?

A

Corresponds to a piece of information that can be derived from other data.

36
Q

Give one advantage or disadvantage of redundancies.

A

D: Redundancies can help reduce data access costs.
A: Redundancies can increase storage requirements and require additional operations to maintain data consistency.

37
Q

T or F. Some generalisations can be left in during logical design.

A

False.

38
Q

How may generalisations be removed from data?

A

By merging the child entities with the parent entity and introducing a new attribute to represent type.

39
Q

T or F. A primary identifier is better to be an external one rather than an internal one.

A

False.