Database Systems Chapter 3

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/45

flashcard set

Earn XP

Description and Tags

CS 4210 module 3

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

46 Terms

1
New cards

database schema

structure that describes in a formal language the association of data as a blueprint of how the database can be constructed

2
New cards

Entity type vs Entity Set

Car entity vs Car 1 Car 2 and Car 3

3
New cards

Key attribute

attribute used to uniquely identify an entity (underlined)

4
New cards

Weak entity

Entity with no key attribute. Employee can have dependents but dependents cant exist without an employee

5
New cards

Unary Relation

one to one. A person can only be married to one person

6
New cards

Binary Relationship

two entities related. A student enrolls in a course

7
New cards

one to one relationship

each takes part only one

8
New cards

Properties of relations (tables really)

-Each table in a database has a unique indentity

-Any entry has only a single value. no multi valued entries in a relation

-each row is unique

-each column has a unique name

-order of columns doesnt matter

-order of rows doesnt matter

9
New cards

candidate key

element that controls all other columns (ie is a candidate for primary key)

10
New cards

primary key

specific choice of minimal set of attributes. can be one column or composite

11
New cards

surrogate key

artificial column added when the primary key is too large. the values are meaningless but they make organization easier

12
New cards

foreign key

a column that is the primary key of a different table

13
New cards

anomalies

problems that occur in poorly planned database

14
New cards

insertion anomaly

when you want to add something to your table, but your are missing part of the information (like i dont have unit price or something)

15
New cards

deletion anomaly

when i want to delete an entry but deleting it gets rid of information i might need or want

16
New cards

normalization def

technique in database systems to organize tables and reduce redundancy and dependency. then link the tables with ERs

17
New cards

First normal form requirements

Meets criterion for relation and has a primary key

18
New cards

Second normal form requirements

Is in 1NF(is a relation and has a primary key), and all attributes/non-key columns are dependent on the primary key. Also must have single column primary key

19
New cards

Third normal form requirements

Is in 2NF, and no non-key attributes are dependent on other non-key attributes (attributes must only depend on primary key)

20
New cards

Boyce Codd form (BCNF) requirements

Is in 3NF and All determinant columns are candidate keys

21
New cards

What forms have functional dependencies

1NF, 2NF, 3NF, BCNF

22
New cards

What form solves multi valued dependencies

4NF- move each multi valued dependency to its own table

23
New cards

What forms have data constraints

5NF- make every constraint a logical consequence of candidate keys and domains

24
New cards

two properties of candidate keys

the attribute used for identification must remain the same and the value cant be null

25
New cards

relational DBMS products

store data about entities in relations, type of table

26
New cards

how to map ER to schema

create table

add primary keys

add attributes

declare primary key

declare foreign keys

27
New cards

composite attribute

attribute made of other attributes (an address is made of a street, city, county, etc)

28
New cards

multi valued attribute

can have more than one value

29
New cards

derived attribute

like how an age attribute can be derived from the DOB attribute

30
New cards

domain integrity constraint

requirement that all the values in a column are of the same kind

31
New cards

domain

grouping of data that meets specific criterion. ex: FirstName with domain Albert, James, etc…

32
New cards

4 parts of an uml diagram

class,attributes, functions, and additional components

33
New cards

codd relation in theory

rows must be unique but no primary key is required. in application though we always have a primary key

34
New cards

functional dependencies

tells how stuff is related. If cost=item*5 then item determines cost. the item is the determinant

35
New cards

composite functional dependencies

determinant that consists of more than one attribute

36
New cards

functional dependencies composition and union rule

A→(B,C) = A→B and A→C and if A→B and A→C then A→(B,C). but no rule if (A,B)→C.

37
New cards

a determinant in a relation is unique iff ____

it determines every other column. you cant find them just by looking at the unique values in one column

38
New cards

Entity integrity constraint

the primary key must has unique data in each row (and no nulls)

39
New cards

referential integrity constraint

if you have a foreign column it must already exist as primary key values, ie SKU is ODER_ITEM must already exist as SKU in SKU_DATA

40
New cards

data integrity

the data in our database will be meaningful and useful

41
New cards

update anomaly

when you update an entry in a row and it causes other parts to no longer be in date

42
New cards

process for putting a relation into BCNF

-identity functional dependencies

-identify candiate key

-if there is a dependency that has a determinant thats not candidate key turn it into a new table as the primary key

-make it a foreign key

-ref integrity constraint check

43
New cards

normalization steps

-check dependencies

-if attributes not dependent on key, make new table

-if dependencies between two non key attributes (for 3NF), make new tables for them

44
New cards

normalization achieves its most practical form in

3NF

45
New cards

multi valued dependencies def

when a determinant is matched with a particular set of values. like employee→degree employee→sibling

46
New cards

4nf solved multi valued dependencies by

putting each in their own relation