Logical Data Modeling - Relational Model and Normalization

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 45

flashcard set

Earn XP

Description and Tags

Midterm

46 Terms

1

What was the relational model commonly adopted to build?

Both logical and internal data models

New cards
2

Ordered list of attribute values. This is the row of the table

Tuple

New cards
3

How is a relational schema denoted?

Name(Attribute1, Attribute2, …AttributeN)

New cards
4

A set S of relation schemas that belong to the same database

Relational Database Scheme

New cards
5

T/F: All values in a tuple are considered atomic

True

New cards
6

Where must each value in a tuple be from?

The domain of the attribute for that column

New cards
7

What are the four types of constraints in the relational model?

Domain

Key

Entity Integrity

Referential Integrity

New cards
8

When are integrity constraints specified

When relations are designed and created in DBMS

New cards
9

When are integrity constraints checked by the DBMS?

When relation status is changed

New cards
10

Constraint where every value in a tuple must be from the domain of its attribute

Domain Constraint

New cards
11

What is a key constraint

Each row(tuple) has a key that uniquely identifies that tuple in the table

New cards
12

Set of attributes of a relation where no two tuples will have the same value for the set of attributes

Superkey

New cards
13

A ______ is a minimal superkey

key

New cards
14

What does a key being a “minimal” superkey mean

No two tuples of R have the same value for this set of attributes

If any attribute is removed from this set then it won’t be a superkey

New cards
15

T/F: not every key is also a superkey

False, any key is also a superkey but not every superkey is a key

New cards
16

Any set of attributes that ______ a key is a ________

contains, superkey

New cards
17

If a relation has several cadidate keys, one is chose to be the ________

Primary key

New cards
18

Constraint where the primary key attributes of each relation cannot have null values in any tuple

Entity integrity constraint

New cards
19

Constraint used to specify a relationship among tuples. All foreign key constraints are enforced

Referential Integrity Constraint

New cards
20

In a referential integrity constraint, what must the value in the foreign key be?

Either a value existing in the corresponding primary key or a null

New cards
21

How do you map a multivalued attribute to the relational schema?

It becomes a separate relation with a foreign key taken from the superior entity

New cards
22

virtual table in a relational database that presents data from one or more underlying tables

View

New cards
23

Underlying table whose value is really stored in the database

Base table

New cards
24

T/F: Views store data

False

New cards
25

What do views display

Only necessary information

New cards
26

What are the benefits of using views

Data abstraction: hides complexity of base tables and simplifies data access

Security: restricts access to sensitive data by allowing specific users to see it

Simplified queries: enables reuse of complex queries

Logical data independence: allows changes to database schema without affecting how others access the data

New cards
27

What is the goal of relational schema design

Avoid redundancy and anomalies

New cards
28

What are the four problems when relations are not well structured?

Redundant storage: some information stored repeatedly

Update Anomalies: if one copy of repeated data is updated, inconsistency occurs unless all copies are updated

Insertion Anomalies: adding new rows forces user to create duplicate data

Delete Anomalies: deleting rows can cause loss of data that would be needed for future rows

New cards
29

Relation that contains a minimal amount of redundancy, and allows users to insert, delete, and update tuples in a relation without errors or inconsistency

Well-structured relation

New cards
30

An effect where updating a value of an attribute, like its name, does not update anywhere else. This causes inconsistencies.

Anomaly

New cards
31

The value of one attribute determines the value of another attribute

Functional Dependency

New cards
32

When is a functional dependency a fully functional dependency

If removal of any attribute from X means that the dependency won’t hold anymore

New cards
33

 If X, A -> Y, and you remove A, X still determines Y.

Partial dependency

New cards
34

 If A -> B, and B -> C, then A -> C

Transitive dependency

New cards
35

What is the main technique for schema refinement

Decomposition

New cards
36

Systematic process of decomposing relations with anomalies to produce smaller, well-structured relations

Normalization

New cards
37

What is normalization used for?

Used for evaluating and correcting relational schemas to minimize data redundancies

New cards
38

State of a particular relation determined based on functional dependencies

Normalization form

New cards
39

What are the normalization forms

1NF: First normal form

2NF: Second normal form

3NF: Third normal form

BCNF: Boyce-Codd normal form

4NF: Fourth normal form

New cards
40

What are the conditions for 1NF?

Every attribute is atomic and single

The relation has a relation name

New cards
41

What are the conditions for 2NF?

It is in 1NF

It includes no partial dependencies

New cards
42

T/F: it isn’t possible to exhibit transitive dependencies in 2NF

False

New cards
43

What do we have to do if the relation is not in 2NF

Decompose and set up new relation for each partial key together with its dependent attribute types

Keep a relation with the original primary key and any attributes that are fully functionally dependent on it

New cards
44

What are the steps for the normalization process to 2NF

  1. Write each key component on a separate line

  2. Create a relation per each key component and assign corresponding dependent attributes

New cards
45

What are the conditions for 3NF

it is a 2NF

it contains no transitive dependencies

New cards
46

What are the steps for the normalization process to 3NF

  1. Identify each new determinant

  2. Identify the dependent attributes and add them in a new table

  3. Remove the dependent attributes of the transitive dependencies from the original table. All that should be left is the foreign key

New cards

Explore top notes

note Note
studied byStudied by 344 people
752 days ago
5.0(2)
note Note
studied byStudied by 5 people
815 days ago
5.0(1)
note Note
studied byStudied by 138 people
970 days ago
5.0(1)
note Note
studied byStudied by 16 people
691 days ago
5.0(2)
note Note
studied byStudied by 35 people
861 days ago
5.0(1)
note Note
studied byStudied by 16 people
720 days ago
5.0(1)
note Note
studied byStudied by 31 people
521 days ago
5.0(1)
note Note
studied byStudied by 15 people
741 days ago
5.0(2)

Explore top flashcards

flashcards Flashcard (33)
studied byStudied by 9 people
757 days ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 4 people
543 days ago
5.0(3)
flashcards Flashcard (22)
studied byStudied by 57 people
708 days ago
4.5(2)
flashcards Flashcard (50)
studied byStudied by 5 people
554 days ago
5.0(1)
flashcards Flashcard (42)
studied byStudied by 12 people
485 days ago
5.0(1)
flashcards Flashcard (33)
studied byStudied by 1 person
694 days ago
5.0(1)
flashcards Flashcard (31)
studied byStudied by 23 people
780 days ago
5.0(1)
flashcards Flashcard (54)
studied byStudied by 18568 people
709 days ago
4.5(362)
robot