Prelims Flashcards

(47 cards)

1
Q

Enumeration

The purpose of a database

A

To store data
To provide an organizational structure for data
To provide a mechanism for querying, creating, modifying, and deleting data

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

Enumeration

Main problems with list

A
  1. Redundancy (the same information may be entered several times)
  2. Multiple themes (each row may contain more than one business concept)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Enumeration

Redundancy and Multiple themes create modification problems:

A

Deletion problems
Update problems
Insertion problems

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

Identification

is an international standard language for creating, processing and querying databases and their tables

A

Structured Query Language (SQL)

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

Identification

This ensures that the values of a column in one table are valid based on the values in another table

A

Referential Integrity constraints

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

Identification

is one or more columns of a relation whose values are used to identify a row

A

Key

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

Identification

Composed of two or more attributes

A

Composite Key

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

Identification

It has the potential to become the primary key

A

Candidate key

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

Identification

A candidate key chosen to be the main for the relation

A

Primary key

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

Identification

A unique, numeric value, that is added to a relation to serve as the primary key

A

Surrogate key

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

Identification

A primary key from one table that is placed into another table

A

Foreign key

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

Identification

states that every value of a foreign key must match the value of an existing primary key

A

Referential integrity

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

Identification

A relationship between attributes in which one attribute (or a group of attributes) determines the value of another attribute in the same table

A

Functional Dependency

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

Identification

The attribute (or attributes) that we use as the starting point (the varibale on the left side of the equation) is called a

A

Determinant

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

Identification

  • A process of analyzing a relation to ensure that it is well-formed
  • Involves decomposing relations with anomalies to produce smaller, well-structured relations
  • When we apply this to a relation, rows can be inserted, deleted, or modified without creating anomalies
A

Normalization

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

Define

1NF

A

Remove multivalued attributes

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

Define

2NF

A

Remove partial dependencies

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

Define

3NF

A

Remove transitive dependencies

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

Identification

Candidate key
Composite key
Primary key
Surrogate key

A

Unique keys

Dan’s Topology of Db keys

20
Q

Foreign key

21
Q

Enumeration

Unique keys

A

Candidate key
Composite key
Primary key
Surrogate key

22
Q

Non-unique key

23
Q

Enumeration

SQL is comprised of

24
Q

Enumeration

DDL
DML
DCL

A

Data Definition Language
Data Manipulation Language
Data Control Language

25
# Identification Used to define and manage data structures
Data Definition Language
26
# Identification * Data definition and updating * Data retrieval
Data Manipulation Language
27
# Identification For creating user accounts, managing permissions etc.
Data Control Language
28
# Identification used to specify that when a row is deleted from the parent table, all rows in the child table that reference the deleted row should also be deleted
ON DELETE CASCADE
29
# Identification used to specify that when a row is updated from the parent table, all rows in the child table that reference the updated row should also be updated
ON UPDATE CASCADE
30
# Which normalization phase is being described? every non-key attribute is fully functionally dependent on the entire primary key not just part of it
2NF
31
# Which normalization phase is being described? Every value is atomic
1NF
32
# Which normalization phase is being described? no transitive dependencies ## Footnote transitive dependencies = functional dependencies on non-primary-key attributes
3NF
33
# Identification is a type of dependency that occurs when a non-key attribute depends on another non-key attribute
Transitive Dependency
34
# Identification a type of dependency that occurs when a non-key attribute depends on only one part of a composite primary key
Partial Dependency
35
# Identification * are used to specify rules for the data in a table * are used to limit the type of data that can go into a table
Constraints
36
# Identification this constraint specifies that the constrained columns' values must uniquely identify each row
Primary Key (Pk) constraint
37
# Identification this constraint ensures that only valid data can be inserted into the related column, as the value must exist in the referenced table
Foreign Key (Fk) constraint
38
# Sql Syntax Creating Table with PK constraints
``` CREATE TABLE Employee ( empID Integer NOT NULL, empName Char(25) NOT NULL, CONSTRAINT PRIMARY KEY (empID) ); ```
39
# Sql Syntax Creating Table with PK and FK constraints
`CREATE TABLE` EmployeeSkill ( empID `Integer` NOT NULL, skillId `Integer` NOT NULL, skilllevel `Integer` NULL, `CONSTRAINT PRIMARY KEY` (empId, skillId), `CONSTRAINT FOREIGN KEY` (empID) `REFERENCES` employee(empID), `CONSTRAINT FOREIGN KEY` (skillId) `REFERENCES` Skill (skillid) );
40
# Sql Syntax Create Table with update and delete cascades
`CREATE TABLE` Employeeskill ( empID `integer` NOT NULL, skillId `integer` NOT NULL, skilllevel `integer` NULL, `CONSTRAINT PRIMARY KEY` (empId, skillId), `CONSTRAINT FOREIGN KEY` (empId) `REFERENCES` employee (empId) `ON DELETE CASCADE`, `CONSTRAINT FOREIGN KEY` (skillId) `REFERENCES` Skill (skillId) `ON UPDATE CASCADE` );
41
# Identification the same information may entered several times
Redundancy
42
# Identification each row may contain more than one business concept
Multiple themes
43
# Identification stores information in tables Each business concept is stored in its own table
Relational Database
44
# Uniqueness of keys Data value is unique for each row Consequently, the key will uniquely identify a row
Unique Key
45
# Uniqueness of keys Data value may be shared among several rows Consequently, they key will identify a set of rows
Non-unique key
46
# Identification adds, deletes, modifies, renames the attributes of the relation
ALTER
47
# Identification modifies the values of the records in the relations
UPDATE