Exam 1 Flashcards

(59 cards)

1
Q

4 components of database system

A

Users, DB app, DBMS, DB

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

Database definition

A

self-describing collection of related records/integrated tables

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

Integrated Tables

A

Tables that store both data and the relationships among data. Thus, have metadata.

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

Tables that store both data and the relationships among data

A

Integrated Tables

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

What is a DBMS?

A

A program used to create, process, and administer a DB.

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

Difference between personal and enterprise DB systems?

A

In personal DB sys, applications and DBMS are combined from user’s perspective, while they’re separate in enterprise. Also, more powerful apps/features, usually. Personal also designed for single user/computer.

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

Personal DB Sys example?

A

Microsoft Access

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

Enterprise DB Sys examples?

A

Microsoft SQL Server, IBM DB2

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

Referential Integrity Constraint

A

Every value of a foreign key must match a value of a existing primary key in another relation

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

Every value of a foreign key must match a value of a existing primary key in another relation

A

Referential Integrity Constraint

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

Metadata

A

Data describing the structure of the DB’s data

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

Data describing the structure of the DB’s data

A

Metadata

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

Function of DB applications?

A

Create and process forms and reports, process user queries, etc.

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

Function of a DBMS?

A

Process SQL requests, create DBes/tables/relationships/keys, modify data, enforce rules and constraints, concurrency control and security, and perform backups and recovery.

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

Types of anomalies

A

Deletion, update, insertion

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

Alt names for table

A

Relation, file

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

Alt names for row

A

Record, tuple

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

Alt name for column

A

Attribute, field

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

Primary key def

A

The chosen candidate key to be main key for a relation

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

Composite key def

A

Key with 2+ attributes

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

Surrogate key def

A

Added unique, numeric key to serve as primary key

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

Foreign key def

A

Primary key from one table, placed into another table

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

Functional dependency def

A

Where attribute(s) determine the value of other attribute(s) in the same table

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

Determinant def

A

Attribute(s) that determine the value of other attribute(s) in the same table

25
Functional dependency def
Relationship where attribute(s) determine the value of other attribute(s) in the same table
26
Determinant def
Attribute(s) that determine the value of other attribute(s) in the same table
27
Attribute(s) that determine the value of other attribute(s) in the same table
Determinant
28
1NF
All tables are relation--no repeats, unique names, independent order, no multientries, same datatype cols, rows data, cols attributes
29
2NF
No non-key attributes can be determined by a subset of the key/partial dependencies. If non-composite primary key, automatically 2NF! Cand key not non-key.
30
No non-key attributes can be determined by a subset of the key. Form?
2NF
31
Partial dependency
When a non-key attribute is dependent on only part of a candidate key
32
When a non-key attribute is dependent on only part of a candidate key
Partial dependency
33
3NF
No non-key attributes can be determined by a non-key attribute/transitive dependencies.
34
No non-key attributes can be determined by a non-key attribute. Form?
3NF
35
Transitive dependency
When a non-key attribute is determined by another non-key attribute. Compound key attributes not counted as non-key.
36
When a non-key attribute is determined by another non-key attribute
Transitive dependency
37
BCNF
No attributes are determined by a non-key attribute. If no compound candidate keys, automatic from 3NF!
38
No attributes are determined by a non-key attribute. Form?
BCNF
39
Normalization steps
ID a functional dependency. If determinant isn't a candidate key, copy functional dependency to new table, keeping the determinant in the original table as a foreign key, and deleting the rest. Repeat!
40
Elements of the E-R model
Entities, relationships, attributes, identifiers
41
Weak entity
Entity that cannot logically exist without another entity
42
ID-dependent entity
Entity that cannot exist or be identified without another entity; solid line time!
43
Identifying relationship
Relationship between strong and ID-dependent weak entity
44
Relationship between strong and ID-dependent weak entity
Identifying relationship
45
Super/subtypes
The subtype is a special case of the supertype; subtype determined by the discriminator attribute. Subtypes can be inclusive (can have multiple) or exclusive. Subtype entities ID-dependent on supertype parent.
46
Attribute that determines subtype(s)?
Discriminator
47
Entity when there are attributes of a relationship between 2 or more entities
Associative entity
48
Steps from model to design?
1, entities to tables and identifiers to primary keys; 2, verify normalization; 3, specify attribute information; 4, relationships to foreign keys
49
Attribute implementation details?
Data type, null status, default values, data constraints
50
char vs varchar
char is fixed length, varchar isn't
51
Intersection table
Table created for N:M relationships, where primary key of each connected table is used as compound key. If there's additional attributes, it's an association table!
52
Table created for N:M relationships, where primary key of each connected table is used as compound key. No additional attributes.
Intersection table
53
Intersection table, but with MORE PIZZAZZ
Association table
54
Foreign keys for 1:1?
Slap PK of one into the other, doesn't matter which. Don't do both, though!
55
Parent-child relationship
1:N relationship
56
Foreign keys for 1:N?
Slap PK of parent into child as FK (not as primary key, though).
57
Foreign keys for N:M?
Make an intersection table!
58
Foreign keys for super/subtypes?
PK of supertype becomes foreign PK of subtypes.
59
Foreign keys for recursive relationships?
For 1:1, 1:N recursive, put PK as a separate FK attribute EMPLOYEE(EmployeeNum, FirstName..., Supervisor), for N:M recursive, make intersection table with compound foreign PKs USER_INTERSECTION(Follower, Following)