lec 2 Flashcards

1
Q

database schema

A

the set of all schema for a given database

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

Relational database naming properties

A
  • tables get names distinct from other names in database’s schema
  • within a table each attribute has distinct name
  • across tables, same attribute names should refer to the same thing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Relational database ordering properties

A

tables not indexed arrays

  • ordering of attributes has no significance
  • ordering or records has no significance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

R. database content properties

A
  • each record distnct(could never get to duplicate records)
  • each cell of a table has exactly one atomic value
  • the values of an attribute must all be from the same domain and of the same data type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

key

A

attribute or set of attributes that uniquely identifies records within a table

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

candidate key

A

a key such that no proper subset is a key within the table

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

primary key

A

attribute or set of attributes that is selected to identify records uniquely within a table

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

alternate key

A

a candidate key that has not been selected as the primary key

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

foreign key

A

an attribute or set of attributes within one table that matches the candidate key of some relation

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

Nulls

A

represent a value for the record that is currently unknown or not applicable to this record, different from 0 or space

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

entity integrity

A

no part of a primary key can be null

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

referential integrity

A

foreign key must match a candidate key in it’s home table or all parts of the foreign key value must be null

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

enterprise constraints

A

are additional rules specified by the user’s or database administrators of a database

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

view

A

virtual record(derived from one or more records)

  • may limit access to only part of a record
  • may combine data from multiple related records
  • may combine and limit access to data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

views that can update a database

A

those that are limited to individual records in a single table,
- not for views combining multiple records from one or more tables

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

1:1 relationship

A

each employee has personal information, organizational information

  • all data must be combined into a single database record
  • multiple views can be used for subsets of the record
17
Q

1:n relationships

A

an attribute having multiple values

each value needs it’s own line

18
Q

n:1

A

multiple records have the same attribute(multiple sales slips for the same customer)
- use the customer record’s key as a foreign key in the sales slip record

19
Q

typical way of dealing with n:n

A

replace them with n:1 and 1:n relationships without introducing redundant data
create a view using the keys of both records