Test #1 Flashcards

1
Q

CRUD

A

Create, Read, Update, Delete

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

Analysis

A

Read world data needs -> conceptual model (ER model)

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

Design

A

ER model -> logical model (relational model)

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

For implementation with a specific DBMS

A

logical model -> physical model

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

Primary key

A

Primary (naturally belongs) spot where specific data is held (ex: prof id in prof info)

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

Foreign key

A

same field in another table (ex: prof id in class info)

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

Association between records in diff tables are kept:

A

FK -> PK

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

SQL

A

Declarative language, NOT procedural

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

SQL sub languages

A

Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL)

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

Data definition language (DDL)

A

used to define database objects

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

Data manipulation langage (DML)

A

Used to support CRUD operations

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

Data Control Language (DCL)

A

used to control access to data stored in the database

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

relation

A

set of tuples

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

tuple

A

row with fields

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

Why use multiple tables?

A

reduce redundancy
store one piece of info in only one place

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

Normal Forms

A

“good” forms that can reduce redundancy in tables/relations
- first normal form (1NF)
- second normal form (2NF)
- third normal form (3NF)

17
Q

Normalization

A
  • into 1NF: split into divisible parts
  • into 3NF: split table into three narrower ones
18
Q

anomalies

A

update, insertion, and deletion

19
Q

first normal form (1NF)

A

atomic fields

20
Q

second normal form

21
Q

third normal form

A

non-key attributes intransitively depend on the key

22
Q

Cross join

A

simply generate all possible combinations, most of them are bogus though

23
Q

“joining condition”

A

goes in the where clause
usually FK = PK

24
Q

problem with joining condition

A

its mixed with normal condition

25
common mistakes in joining tables
intermediate tables not included
26
Inner join
returns rows in two tables matched in certain ways
27
Outer join
extends the result set of an inner join by adding unmatched rows in either or both of the tables
28
equijoins
FK = PK, involving two tables
29
non-equijoins
matching rows using non-equality conditions ex: BETWEEN _ & _, instead of =
30
Self-joins
two copies of the same table will be joined
31
COUNT ( )
counts all entries in a table/group
32
GROUP BY clause
normal terms listed together with aggregate terms
33
HAVING clause
may use aggregate terms and constants only
34
aggregate functions in relational algebra
use the G operator ex. Gavg
35
selection RA
WHERE clause : σ ex: σState="GA"(ΠVendorName, City, State(Vendors))
36
project RA
SELECT clause : Π ex: ΠVendorName, City, State(Vendors)
37
Cartesian Product
X ex: Vendors X Invoices
38
rename RA
ρ ex: ρV(Vendors) JOIN V.VendorID = I.VendorID ρI(Invoices
39
Assignment RA
->