BMGT402 Database Design Considerations Flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/94

encourage image

There's no tags or description

Looks like no tags are added yet.

95 Terms

1
New cards
2
New cards
3
New cards
4
New cards
5
New cards
What is the goal of a good database design? (Slide 3)
Meet all logical requirements and design conventions.
6
New cards
Why can a logically good database design still fail? (Slide 3)
It may fail practical needs such as performance, speed, security, or information generation.
7
New cards
Why do database designers make design compromises? (Slide 3)
Because design goals can conflict.
8
New cards
How can high processing speed affect database design? (Slide 3)
It may limit relationship complexity or require derived attributes.
9
New cards
What can maximum information generation sacrifice? (Slide 3)
Clean design structures and high transaction speed.
10
New cards
What four other areas may require design compromise? (Slide 4)
Performance, security, shared access, and data integrity.
11
New cards
What is a primary key? (Slide 10)
A single attribute or combination of attributes that uniquely identifies each entity instance.
12
New cards
What three functions does a primary key serve? (Slide 10)
Uniquely identifies instances, guarantees entity integrity, and works with foreign keys to implement relationships.
13
New cards
What is a natural key or natural identifier? (Slide 11)
A generally accepted real-world identifier familiar to end users.
14
New cards
How does a natural key relate to business vocabulary? (Slide 11)
It is familiar to end users and used in day-to-day business vocabulary.
15
New cards
What are the six desirable primary key characteristics? (Slide 12)
Unique values; nonintelligent; no change over time; preferably single-attribute; preferably numeric; security-compliant.
16
New cards
Why must primary key values be unique? (Slide 12)
Each entity instance must be uniquely identified; nulls are not allowed.
17
New cards
What does nonintelligent mean for a primary key? (Slide 12)
The key should have no embedded semantic meaning beyond identification.
18
New cards
Why should a primary key not change over time? (Slide 12)
Changing it requires updating referring foreign keys and increases workload.
19
New cards
Why are single-attribute primary keys preferred? (Slide 12)
They simplify foreign keys and avoid cumbersome multi-attribute keys.
20
New cards
Why are numeric primary keys preferred? (Slide 12)
DBMS counters can generate unique numbers automatically.
21
New cards
What DBMS constructs can support incrementing keys? (Slide 12)
IDENTITY or SEQUENCE.
22
New cards
What does security-compliant mean for a primary key? (Slide 12)
It must not use attributes that pose security risks, such as SSNs.
23
New cards
In what two cases are composite keys useful? (Slide 13)
Identifying composite entities in M:N relationships and weak entities.
24
New cards
What is the benefit of a composite key in an M:N relationship? (Slide 13)
It ensures each permitted combination of parent keys occurs only once.
25
New cards
How can a composite key identify a weak entity? (Slide 13)
Combine the parent key with a distinguishing attribute of the weak entity.
26
New cards
What is a surrogate key? (Slide 15)
A system-assigned primary key, generally numeric and auto-incremented.
27
New cards
When is a surrogate key especially helpful? (Slide 15)
No natural key; candidate key has semantic meaning; or candidate key is too long or cumbersome.
28
New cards
What are the four special flexible design cases? (Slide 18)
Placement of foreign keys, time-variant history, fan traps, and redundant relationships.
29
New cards
Where is a foreign key normally placed in a 1:M relationship? (Slide 19)
On the many side, referencing the primary key on the one side.
30
New cards
Why should a 1:1 relationship not have foreign keys in both entities? (Slide 19)
The slide advises choosing one FK placement to avoid unnecessary complexity and redundancy.
31
New cards
For 1:1 with one mandatory and one optional side, where does the FK go? (Slide 19)
Place the mandatory-side entity PK as an FK in the optional-side entity; make the FK NOT NULL.
32
New cards
For 1:1 with both sides optional, how is FK placement chosen? (Slide 19)
Choose the placement with the fewest nulls or the entity where the relationship role is played.
33
New cards
For 1:1 with both sides mandatory, what should be considered? (Slide 19)
Choose as in the both-optional case or reconsider whether the entities should be combined.
34
New cards
What is time-variant data? (Slide 21)
Data whose values are a function of time.
35
New cards
What normally happens to old attribute values without history tracking? (Slide 21)
They are replaced by new values without preserving previous values.
36
New cards
How can a database preserve time-variant history? (Slide 21)
Create a new history entity in a 1:M relationship with the original entity.
37
New cards
What should a history entity contain? (Slide 21)
The value, date of change, and other pertinent attributes.
38
New cards
What is a design trap? (Slide 23)
A relationship improperly or incompletely identified and inconsistent with the real world.
39
New cards
What is a fan trap? (Slide 23)
One entity is the one side of two 1:M relationships, creating an improperly designed model.
40
New cards
What is a redundant relationship? (Slide 26)
Multiple relationship paths between related entities.
41
New cards
What can redundant relationships cause? (Slide 26)
Data redundancies and anomalies.
42
New cards
Can redundant relationships ever be used? (Slide 26)
Yes; some designs use them to simplify the design, though they risk anomalies.
43
New cards
What must be done with business rules? (Slide 30)
Document and verify them with end users; make them precise, clear, and simple.
44
New cards
What four modeling elements should business rules identify? (Slide 30)
Entities, attributes, relationships, and constraints.
45
New cards
What documentation should accompany business rules? (Slide 30)
Source, justification, date, and approving authority sign-off.
46
New cards
How should entity names be written? (Slide 31)
Short, meaningful, unique business nouns; document abbreviations, synonyms, and aliases.
47
New cards
How should attribute names be written? (Slide 31)
Unique within entity, descriptive, entity-prefix when appropriate, no reserved words or spaces/special characters.
48
New cards
What suffixes are recommended for primary key attribute names? (Slide 31)
_ID, _NUM, or _CODE.
49
New cards
How should relationship names be written? (Slide 31)
Active or passive verbs that clearly indicate the relationship.
50
New cards
What should each entity represent? (Slide 32)
One subject and a set of distinguishable instances.
51
New cards
What normal form should entities meet? (Slide 32)
3NF or higher; anything below 3NF should be justified.
52
New cards
What is required for entity granularity and keys? (Slide 32)
Define the granularity clearly and choose a PK supporting it.
53
New cards
How should attributes be structured? (Slide 33)
Simple and single-valued (atomic).
54
New cards
What attribute metadata should be documented? (Slide 33)
Default values, constraints, synonyms, and aliases.
55
New cards
What should be documented for derived attributes? (Slide 33)
Clearly identify them and include their source(s).
56
New cards
When might redundant attributes be justified? (Slide 33)
Transaction accuracy, performance, or maintaining history.
57
New cards
What dependency must nonkey attributes have? (Slide 33)
They must be fully dependent on the primary key.
58
New cards
What should relationship documentation specify? (Slide 34)
Participants, participation, connectivity, and cardinality.
59
New cards
What operations should an ER model be validated against? (Slide 35)
Inserts, updates, and deletions.
60
New cards
Why should data redundancy be minimized? (Slide 35)
To ensure single-place updates.
61
New cards
What is the minimal data rule? (Slide 35)
All that is needed is there, and all that is there is needed.
62
New cards
Scenario (Slide 5): EMPLOYEE_V1 stores EMP_SPOUSE in every employee row, including employees not married to coworkers. What design problem occurs?
Unnecessary NULL values.
63
New cards
Scenario (Slide 5): James and Louise each store the other as EMP_SPOUSE. They divorce. What must be updated?
Both employee rows must be updated consistently or contradictory spouse data may remain.
64
New cards
Scenario (Slide 6): EMPLOYEE and MARRIED_V1 are separate tables. MARRIED_V1 lists (345,347) and (347,345). What is redundant?
The same marriage is recorded twice, allowing inconsistent updates.
65
New cards
Scenario (Slide 6): MARRIED_V1 uses EMP_NUM and EMP_SPOUSE to refer to employee IDs. What naming issue does the slide identify?
Synonyms are used for the same data.
66
New cards
Scenario (Slide 6): MARRIED_V1 lists James (346) married to Anne (349), while Anne (349) is listed with James (346) in the figure? What should be checked?
Ensure each marriage is represented consistently and not duplicated; the slide specifically asks about James’s marriage.
67
New cards
Scenario (Slide 7): MARRIAGE, MARRPART, and EMPLOYEE tables represent marriages. What is the purpose of MARRPART?
It links employees to a marriage through MAR_NUM and EMP_NUM.
68
New cards
Scenario (Slide 7): MARRIAGE stores MAR_DATE. The organization no longer needs marriage dates. What should the designer reconsider?
Whether a separate MARRIAGE entity is still needed for the required business information.
69
New cards
Scenario (Slide 7): A MARRIAGE-to-MARRPART model allows multiple participants per marriage. What business rule must be verified?
How many people may participate in one marriage.
70
New cards
Scenario (Slide 12): STUDENT_ID 650973 and student name John Q. Smith are candidate identifiers. Which is preferable and why?
STUDENT_ID; it has less semantic meaning and is less likely to change.
71
New cards
Scenario (Slide 12): An employee changes their name and EMP_NAME is the PK. What happens to referencing rows?
Referring foreign keys may need updates, increasing database workload.
72
New cards
Scenario (Slide 12): EMPLOYEE uses SSN as PK. Which desirable PK characteristic is violated?
Security-compliant.
73
New cards
Scenario (Slide 14): STUDENT and CLASS have an M:N relationship resolved by ENROLL. Which fields form the ENROLL composite PK?
STU_NUM and CLASS_CODE (as shown in the diagram).
74
New cards
Scenario (Slide 14): ENROLL contains STU_NUM, CLASS_CODE, and ENROLL_GRADE. Which attribute is not part of the composite PK?
ENROLL_GRADE.
75
New cards
Scenario (Slide 14): ENROLL uses (STU_NUM, CLASS_CODE) as PK. Can the same student/class pair occur twice?
No; the composite PK makes each combination unique.
76
New cards
Scenario (Slide 15): EVENT rows contain DATE, TIME_START, TIME_END, ROOM, EVENT_NAME, and PARTY_OF. Why consider a surrogate PK?
A natural composite key could be long and cumbersome.
77
New cards
Scenario (Slide 15): Two events occur on June 17 at 11 AM in different rooms. Is DATE + TIME_START alone unique?
No; ROOM or another distinguishing field would be needed.
78
New cards
Scenario (Slide 20): An EMPLOYEE manages zero or one DEPARTMENT; each DEPARTMENT has exactly one manager. Where is the FK?
DEPARTMENT.EMP_NUM references EMPLOYEE.EMP_NUM.
79
New cards
Scenario (Slide 20): Each DEPARTMENT must have one manager, but an EMPLOYEE need not manage any. Can DEPARTMENT.EMP_NUM be NULL?
No; it is a mandatory FK.
80
New cards
Scenario (Slide 22): EMPLOYEE stores current JOB_CODE and EMP_SALARY; JOB_HIST stores EMP_NUM, DEPT_ID, DATE_ASSIGN, JOB_CODE, EMP_SALARY. Why create JOB_HIST?
To preserve historical assignments, job codes, and salaries.
81
New cards
Scenario (Slide 22): JOB_HIST uses EMP_NUM, DEPT_ID, DATE_ASSIGN as key fields. Why include DATE_ASSIGN?
To distinguish assignment records across time.
82
New cards
Scenario (Slide 24): DIVISION has many TEAMs and many PLAYERs, but no TEAM–PLAYER relationship. What design trap exists?
Fan trap.
83
New cards
Scenario (Slide 24): DIVISION connects independently to TEAM and PLAYER. What question cannot be answered?
Which player belongs to which team.
84
New cards
Scenario (Slide 25): DIVISION → TEAM → PLAYER is used instead. How do you determine a player’s division?
Follow PLAYER to TEAM and TEAM to DIVISION.
85
New cards
Scenario (Slide 25): TEAM has DIV_ID and PLAYER has TEAM_CODE. Which relationship fixes the fan trap?
TEAM 1:M PLAYER.
86
New cards
Scenario (Slide 27): DIVISION → TEAM → PLAYER exists, and DIVISION → PLAYER is also drawn. Which relationship is redundant?
The direct DIVISION–PLAYER relationship.
87
New cards
Scenario (Slide 27): PLAYER stores TEAM_CODE and DIV_ID, while TEAM stores DIV_ID. What risk is introduced?
Conflicting division values and update anomalies.
88
New cards
Scenario (Slide 37): The Smith School has several offices; each office has a unique number, location, floor, square feet, and cubes; staff request sole use of one cube. What entities are needed?
OFFICE, CUBE, and STAFF.
89
New cards
Scenario (Slide 37): Each office has a unique number, location, floor number, and square feet. What are OFFICE attributes?
OFFICE_NUM (PK), LOCATION, FLOOR_NUM, SQUARE_FEET.
90
New cards
Scenario (Slide 37): All offices have cubes marked A, B, C, etc. What key can uniquely identify each CUBE?
Composite key (OFFICE_NUM, CUBE_LETTER), assuming letters repeat across offices.
91
New cards
Scenario (Slide 37): Each office has cubes. What is the OFFICE–CUBE relationship?
1:M; one OFFICE has multiple CUBEs and each CUBE belongs to one OFFICE.
92
New cards
Scenario (Slide 37): Staff members must request sole use of a single cube, and cubes are not shared. What is STAFF–CUBE connectivity?
1:1 assignment (a staff member uses one cube; a cube is used by at most one staff member).
93
New cards
Scenario (Slide 37): Staff have unique number, name, and phone. What are STAFF attributes?
STAFF_NUM (PK), STAFF_NAME, STAFF_PHONE.
94
New cards
Scenario (Slide 37): Each staff member requests one cube, but the slide does not explicitly say every cube is occupied. Is cube occupancy mandatory?
Not necessarily; unused cubes may exist. Confirm this assumption with users.
95
New cards
Scenario (Slide 37): CUBE letters A, B, C may recur in different offices. Why is CUBE_LETTER alone a weak PK?
It may not uniquely identify a cube across all offices.