Zybook Week 2 Flashcards

1
Q

What is the entity-relationship model?

A

high level representation of data requirements, ignoring implementation details.

Three kinds of objects:
entity – person, place, product, concept or activity
relationship – a statement about two entities
attribute – a descriptive property of an entity

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

What is an ER diagram?

A

A schematic picture of entities, relationships, and attributes.

Entities are rectangles, relationships are drawn as lines
attributes (not always present) appear as additional text within an entity rectangle.

They are read in the direction of the relationship or verb.

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

What is a glossary?

A

Also known as a data dictionary or repository, this documents additional detail in text format. Includes names, syn, descriptions of entities, relationships and attributes.

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

What is an entity type?

A

A set of things.

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

What is a relationship type?

A

A statement about entity types.

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

What is an attribute type.

A

A set of values.

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

What is an entity instance?

A

An individual thing. Usually becomes a row.

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

What is a relationship instance?

A

A statement about entity instances. Usually becomes foreign key values.

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

What is an attribute instance?

A

An individual value. Usually becoems a column value.

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

What are the three phases of database design?

A

Analysis - develops an entity-relationship model, capturing data requirements while ignoring implementation details.

Logical design – coverts entity-relationship model into tables, columns and keys for a database system

Physical Design – adds indexes and specifies how tables are organized on storage media

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

What makes up a table?

A

Table - collection of data organized as columns and rows.

A column is a set of values of the same type. Each column has a different name.

A row is a set ofvalues, one for each column.
A cell is a single column of a single row.

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

What is an empty table?

A

A table without rows.

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

What is a data type?

A

Each column has a data type, which defines the format of the values.

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

What are different data types?

A

Integer, decimal, character, time, binary, spatial, document

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

What structural rules must tables obey?

A

Normalized - exactly one value exists in each cell
No duplicate column names
No duplicate rows (no two rows may have identical values in all columns)

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

What is data independence?

A

All relational databases must obey this principle, which states that rows and columns of a table have no inherent order.

17
Q

What is a null value?

A

A special value that represents missing data. Represents either ‘unknown’ or ‘inapplicable, should not replace 0s.

18
Q

What is an operator?

A

A symbol that computes a value from one or more other values, called operands.

19
Q

What is an aggregate function?

A

operates on numeric values from multiple rows, including only rows selected by the WHERE clause.

Includes: SUM, AVG, MAX, MIN

20
Q

What is a primary key?

A

A column, or group of columns, used to identify a row.

21
Q

What two rules must primary keys obey?

A

Values must be unique within the column.

Values may not be null

22
Q

What is a composite primary key?

A

Consists of multiple columns. A simple one consists of a signle column.

23
Q

What makes up a minimal primary key?

A

All columns are necessary for uniqueness.

24
Q

What three rules most composite primary keys obey?

A

Column values, when grouped must be unique
May not contain null
must be minimal

25
Q

What is a foreign key?

A

A column or a group of columns that refer to a primary key. Non-null foreign keys must match some value of the primary key.