Relationship Model Flashcards

(47 cards)

1
Q

Hierarchical Database

A

1970 IBM Information Management System

1:M relationship

A tree of linked records

child has only one parent (limitation)

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

Network Database

A

Intergrated Data Store

Child have multiple parents

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

Navigational Database

A

Move around in data via pointers or links

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

Relational Model

A

basic structure is the mathematical concept

Relation
Table
Storage

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

Relation

A

Abstract object

Heading (fixed)
Body (varies over time)

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

Table

A

Pictorial representation

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

Domain

A

Set of atomic values which specifies

name, data type and data format

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

Relation Heading

A

aka Relation schema
consist of a fixed set of attributes (R)

each attribute (column) corresponds to an underlying domain

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

Relation cardinality

A

number of tuples

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

Relation body

A

aka Relation instance

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

Relation instance

A

State of the relation at any point in time

Consist of tuples (rows)

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

Relation degree

A

no of attributes

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

Tuples in Relation

A
No duplicate
Unique
Inordered in a relation
Attributes not ordered in a tuple
Atomic (cannot be divided)
Not multivalued
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Functional Dependency

A

A set of attributes ‘A’ functionally determines an attribute ‘B’ if, and only if,
for each A value, there is exactly one value of B in the relation. It is
denoted as A → B

A determines B
B depends on A

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

Candidate key

A

Attribute or set of attributes which exhibits uniqueness at minimum (minimal superkey) - proper subset is not a superkey

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

Primary Key

A

One or more candidate key that is chosen to be a primary key (primary key or composite primary key)

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

Alternate Key

A

Remaining keys that are not the primary key

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

Composite key

A

A primary key comprising of many attributes

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

How to Select Primary Key

A

Unique

Nonintelligent

No change over time

Single attribute

Numeric

Security Compliant

20
Q

Null

21
Q

Why Null

A

Value not applicable

Value unknown

Value does not exist

Value undefined

22
Q

Relational database

A

A collection of normalised relations

23
Q

Foreign Key

A

An attribute or set of attributes in a relation that exists in the same or another relation as a Primary Key

24
Q

Referential Integrity

A

A foreign key value must either match the full primary key in a relation or be null

25
Entity integrity
a condition where each row (entity instance) in the relation has its own unique identity The primary key must be unique and not be null
26
Column/Domain integrity
All values in a given column must come from the same domain
27
Relational algebra
relational input = relation output = relation procedural operators only apply to at most two relations at a time
28
8 basic operations of relational algebra
single relation (selection, projection) cartesian product, join union intersection difference division
29
π
pi -> Project vertical selection of a relation to create a new relation only unique tuples are shown in output
30
σ
sigma -> Select horizonal selection of a relation a new relation is then created selection via content i.e. define data for the corresponding tuple
31
Union (U)
combines all rows from two relation that are union compatible excludes duplicate rows
32
Intersect (∩)
combines rows that appear in two relations must be union compatible
33
Difference (-)
rows in one relation that does not appear in another BUT Table A-Table B does not equal to Table B-Table A
34
Product (X)
yields all possible rows from two relations | cartesian product
35
Cartesian Product
No of rows in relation 1 multiply no of rows in relation 2 every tuple in one relation is paired with every tuple in another relation
36
Tuple
A table row in relational model
37
Domain
a set of attributes
38
Composite primary key
more than one primary key
39
Key
one or more attributes that determine other attributes used to establish relationships among relations determination
40
Determination
The role of a key An attributes value can be looked up/determined by another attribute value
41
Determinant
an attribute whose value determines other values in
42
Dependent
an attribute whose value is determined by another attribute
43
Key attribute
an attribute that is part of a primary key
44
Composite key
a multiple-attribute key
45
Superkey/Key
an attribute or set of attributes that can uniquely identify any row in a table
46
Full functional dependency
when an attribute is functionally dependent on an attribute and not any of its proper subset (the determinant is a composite)
47
Secondary key
for data retrieval i.e. customer wont remember their customer ID but a combination of name and telephone will retrieve customer ID no.