Data Management Quiz 2

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

1/53

encourage image

There's no tags or description

Looks like no tags are added yet.

54 Terms

1
New cards

What is a relation?

A table.

2
New cards

What is an attribute?

A column in a table.

3
New cards

What is a tuple?

A row in a table.

4
New cards

What does a schema describe?

A table’s name and columns.

5
New cards

What is a primary key (PK)?

The candidate key selected to identify each row. Its complete value must be unique, and none of its components can be NULL.

6
New cards

Why can CustomerID not repeat in Customers?

CustomerID is the primary key, so each customer must have a unique identifier.

7
New cards

What is a foreign key (FK)?

One or more columns that reference a primary key or another eligible unique key in another (or the same) table.

8
New cards

Why can CustomerID repeat in Orders?

Many orders may belong to the same customer, so Orders.CustomerID can repeat as a foreign key.

9
New cards

What is a candidate key?

A key that identifies a row with no unnecessary field.

10
New cards

What is a superkey?

A set of attributes that identifies a row; it may contain extra, unnecessary attributes.

11
New cards

What is a composite key?

A key containing two or more columns, such as OrderID + LineNo.

12
New cards

What is a prime attribute?

An attribute that belongs to at least one candidate key.

13
New cards

What is a non-prime attribute?

An attribute that belongs to no candidate key.

14
New cards

What is entity integrity?

The primary key must be unique and non-NULL; every record has an identity.

15
New cards

What is referential integrity?

A non-NULL foreign key must match an existing referenced key.

16
New cards

What is a domain constraint?

A rule limiting a column to allowed values, such as a data type, range, or approved category.

17
New cards

What is NULL?

A marker for a missing or inapplicable value; it is not zero and is not an empty text string.

18
New cards

When might NULL be appropriate?

When information is unknown, not yet recorded, or optional under the design, such as an unshipped order’s ShippedDate.

19
New cards

What does NOT NULL mean?

The field is required and cannot contain NULL.

20
New cards

What is normalization?

Organizing tables using relationships between columns to reduce undesirable redundancy and dependencies.

21
New cards

Why normalize a database?

To reduce redundancy and help prevent update, insertion, and deletion anomalies; it also improves consistency and maintainability.

22
New cards

Does normalization guarantee faster queries?

No. The guide says normalization does not guarantee that every query runs faster.

23
New cards

What is a lossless split?

A table decomposition whose joins can rebuild the original rows without losing facts or inventing new combinations.

24
New cards

What is a functional dependency (FD)?

X → Y means any two legal rows with the same X values must have the same Y values.

25
New cards

In X → Y, what is the determinant?

X; it is the attribute or set of attributes that determines Y.

26
New cards

What does CustomerID → CustomerName mean?

A given CustomerID fixes one current CustomerName. It does not mean names are unique.

27
New cards

Does a functional dependency imply causation or describe a join?

No. It states a rule about values; it does not imply causation or describe a table join.

28
New cards

What is the correct order of normal forms?

1NF → 2NF → 3NF → BCNF.

29
New cards

What is First Normal Form (1NF)?

Each cell contains one intended scalar value, not a list, and there are no numbered repeating groups such as Item1 and Item2.

30
New cards

Do repeated scalar values in different rows violate 1NF?

No. Repeated scalar names across rows do not by themselves violate 1NF.

31
New cards

What is Second Normal Form (2NF)?

The table is in 1NF, and every non-prime attribute depends on the whole of every candidate key, not just a proper subset.

32
New cards

What is a partial dependency?

A non-prime attribute depends on only a proper subset of a candidate key rather than the whole key.

33
New cards

Give the guide’s example of a partial dependency.

With key {OrderID, ProductID}, OrderID → OrderDate is partial; keep order dates in Orders and pair-specific quantities in OrderLines.

34
New cards

What is Third Normal Form (3NF)?

The table is in 2NF and has no disallowed transitive dependency. For every non-trivial FD X → A, X must be a superkey or A must be prime.

35
New cards

What is a transitive dependency in the guide’s example?

OrderID → CustomerID → CustomerName; if CustomerID does not identify an order, store CustomerName in Customers rather than repeating it in Orders.

36
New cards

What is Boyce–Codd Normal Form (BCNF)?

For every non-trivial functional dependency, the determinant must be a superkey.

37
New cards

How is BCNF stricter than 3NF?

BCNF removes the 3NF prime-attribute exception: every non-trivial FD’s determinant must be a superkey.

38
New cards

What does non-trivial mean for an FD?

The arrow determines a field that is not already included on its left side.

39
New cards

What is a proper subset of a key?

A subset that omits at least one field from the full key.

40
New cards

Why must you check every candidate key when testing 2NF?

An alternate composite candidate key can have a partial dependency even if the chosen primary key is single-column.

41
New cards

What is data redundancy?

Unnecessary repetition of the same fact. Repeating identifiers to link tables is useful; copying a customer’s current phone number onto every order is avoidable redundancy.

42
New cards

What is an update anomaly?

One change requires updating several copies of a fact; missing one copy can leave conflicting values.

43
New cards

What is an insertion anomaly?

A new fact cannot be recorded without also supplying an unrelated fact, such as needing an OrderID to add a customer who has no order.

44
New cards

What is a deletion anomaly?

Deleting one record unintentionally removes another fact, such as deleting a customer’s last order and losing the only stored phone number.

45
New cards

How does the guide repair the OrderContact redundancy problem?

Separate Customers(CustomerID, CurrentPhone) from Orders(OrderID, CustomerID). CustomerID is the customer PK and an order FK.

46
New cards

What are the six SDLC phases in order?

Requirements gathering → Design → Implementation → Testing → Deployment → Maintenance.

47
New cards

What happens during requirements gathering?

Learn what users need and document business rules: what data is stored, who uses it, and what must be unique.

48
New cards

What happens during database design?

Create the conceptual ER model, then plan tables, keys, constraints, and normalization.

49
New cards

What does ER mean?

Entity–relationship: a model of business objects and how they relate.

50
New cards

What happens during implementation?

Build the database structures and application, then load or migrate the required data.

51
New cards

What happens during testing?

Check that functions, data rules, and performance meet requirements; test invalid as well as valid inputs.

52
New cards

What happens during deployment?

Release the working system for real use and prepare users and support staff.

53
New cards

What happens during maintenance?

Fix defects, adapt to changing needs, and keep the system reliable.

54
New cards

Why is maintenance typically the longest SDLC phase?

It continues throughout the system’s operational life.