Ch4 Flashcards

1
Q

compoennts of relational model

A

data strcutue

data manipulation

data integrity

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

data strcurue

A

tables & keys

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

data manipulation

A

what are the sql operations to retrieve or modofy data

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

data integirty

A

mechanisms for implementing business rules that maintain integrity of data

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

whaat is a relation

A

named 2D data!

rows (Records) columns(Attributes/fields)

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

domain constraints

A

constrain allowable value for an attribute

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

entity integ constraitns

A

all PK not Null and unique

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

referential integrity constirans

A

rules that maintian consitency between the rows of 2 related tables

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

what is referential integirty

A

if a FK is not null, then the insance it poitns to MUST exist

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

3 approaches to ref integ

A

1, restrict: dont allow parent side if related drows exist inn dep side
2. cascade: auto delete dep that corespon with parent to be deleted
3. set to null: set fk to null if parent side deleted

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

how ar eref integrity constraints dwan?

A

via arrows forom DEPENDANT TO PARENT TABLE

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

Binary relations mapping
1:M
1:1
M:N

A

1:M: pk on one side becomes fk on nany side

1:1 pk on mandatory becomes fk on optional

m:n: create a new relation with pk of 2 ents as pk

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

associate ents mapping
- id not assigned
- id assigned

A

not assigned: Def PK for the association relation is pk of 2 ents

assigned: natural and pfamiliar to end users

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

Unary relationships
1:M
M:M

A

1:M- recursive fk in the same relation

M:M one for ent type on eofor associative relation in which the PK has 2 attributes

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

mpaping ternanry

A

associate ent has a fk to each ent in relatioship

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

mapping generlaizaiton/specializaiton

supertype/subtype to realitons

A

take the pk of the highest ent and then use the first letter and then create unique ids

17
Q

what is data nromalizaiton

A

tool to validate and improve logical design TO AVOID DUPLICATION! AN DBE WELL STRUCTURED

18
Q

What is a well structured relations

A
  • min data redundancy, allow users to insert, delete and update rows w/o causing data inconsistenciesg
19
Q

goal of well structured relations: avid anomalies (3 types)

A

insertion: adding new rows forces user to crate duplicate data

deletion: deleting rows may cause a loss of data

modificaiton: changing data forces changes oto ther rows because of duplciation

20
Q

tabble w/mv attribute
–remvoe MV
first normal form
– remove partial depend
second normal form
– remove transitive dpeend
third nomal form
– remove remainng anomalies from multiple cand kess
boyce-codd
– remove mv depend
fourht normal form
– remove any left anomalies
fifth normal for

A


multivalues
partial depend
transitive depend
remaiing anomalies
multive depend
remaining anomalies

mptrmr

mp trudeau ran more runs

21
Q

what is a functional dependncy

A

value of one attirbute determines the value of another attirbute

22
Q

what is a candidate key

A

unieuq identifier (a candidate to be the PK!)

each non ey field is functionally dependant on every can key!

23
Q

no transitive depends

A

no functional depeds on no pk attirbutes! the pk is a determinant for another attribute whic in tur determinant for a 3rd

24
Q

The attribute on the left-hand side of the arrow in a functional dependency is the:

A

DETERMINANT!!!

DETERMINANT –> DEPENDANT

25
Q

A functional dependency in which one or more nonkey attributes are functionally dependent on part, but not all, of the primary key is called a ________ dependency.
Question

A

PARTIAL FUCNITONAL

26
Q

A functional dependency between two or more nonkey attributes is called a:

A

TRANSITIVE

27
Q

When a regular entity type contains a multivalued attribute, one must:

A

2 new relation, one contaiining mv

28
Q

customer ID in the customer table??

A

candidate

29
Q

first nf: all mv attirbutes are out

SECOND ND: NO mv, non key attirbutes solely dpeend on PK but contains transitive depends!

fourth nf: MV DEPENDANCIES ARE DEALT

boycodd: removes remaining func depends

A
30
Q

A relation that contains no multivalued attributes and has nonkey attributes solely dependent on the primary key but contains transitive dependencies is in which normal form?

SECONDD

A
31
Q

Which of the following is NOT a reason to create an instance of a relational schema with sample data?

SAMPLE DATA CAN REVESRSE DB ERRORS

A
32
Q

CONSTRAINT B/W 2 ATTIRBUTES IS CALELD A FUNCTIONAL DEPENDANCY

A
33
Q

ALT NAME FOR ATTRIRBUE

A

ALIAS

34
Q

COMPOSNENT QUESTION

A

COMP IS ALWAYS USED IN ONLY ONE ITEM

35
Q

A domain definition consists of all of the following components EXCEPT:

A

INTEGRITY CONSTRIANTS

36
Q

A functional dependency between two or more nonkey attributes is called a:

A

TRIANSSITIVE

37
Q
A