Database Concepts Flashcards

1
Q

What is an entity?

A

An entity is a person, place, thing, or event that a business needs to know about. Some examples are people, customers, parts, orders, etc.

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

What is an attribute?

A

A property of an entity. i.e. if an entity is a person then an attribute may be sex, eye color, height, etc.

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

What is an entity set?

A

A collection of entities. i.e. a table of person entities.

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

What is an entity instance?

A

A single entity. i.e. a person in a table of persons.

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

The concept of an entity is equal to [blank] in database terminology.

A

table

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

An attribute is equal to [blank] in database terminology.

A

column

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

An instance of an entity is equal to [blank] in database terminology.

A

record or row.

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

implementing a database requires two steps. What are they?

A

Physical and logical.

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

What is involved in the logical design step of implementing a database?

A

It is the planning out phase before actually coding. Getting the abstract design of the database created.

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

What is involved in the physical design of the database?

A

The actual software implementation of tables and columns that are used to represent their real world counterparts.

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

The way to store an attribute about an entity depends on what?

A

The needs of the business.

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

What is a simple valued attribute?

A

Only one component makes up the value. It is the simplest breakdown of the data. i.e. John or “sue ann” for first name field.

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

What is a composite valued attribute?

A

Multiple components make up the value. i.e. “John Wayne Smith”. If a component is missing, then you cannot determine the value.

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

What is a derived attribute?

A

Not actually stored in the table, but calculated from data in the table.

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

What is a single valued attribute?

A

A column/row intersection in a table where only one value can be stored. i.e. a person entity instance can only have one birth date.

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

What is a multi-valued attribute?

A

A column/row intersection in a table where there may be many values. A single employee can have many dates on when they were paid.

17
Q

Multi-valued columns are bad. Why is this so?

A

It cannot be easily implemented in a relational database. Causes storage and retrevial problems. When one customer has many rentals, storing the multiple rentals in a single cell can be problematic. Relationships need to be established to reference this information instead.

18
Q

Can a value be both simple and composite at the same time?

A

no

19
Q

Can a value be both single and multi valued at the same time?

A

no

20
Q

Can a value be single and simple valued at the same time?

A

yes

21
Q

Can a value be simple and multi valued at the same time?

A

yes, but it is bad. Don’t do it. i.e. rental number stored in customer table.

22
Q

Can a value be composite and single at the same time?

A

Yes. i.e. date of birth.

23
Q

Can a value be composite and multi valued at the same time?

A

Yes, but it is bad. Don’t do it. i.e. rental date stored in customers table.

24
Q

What are business rules?

A

rules about how the business operates that dictates the database design. Should be done before design in order to implement correctly.

25
Q

What are the different key types in a database?

A

Primary, Foreign, Candidate, Secondary

26
Q

What is a primary key?

A

A unique attribute(s) about an entity that does not change that can be used to uniquely identify an entity instance.

27
Q

Can two records in a table have the same primary key?

A

No.

28
Q

What is a candidate key?

A

An attribute that could be used as a primary key.

29
Q

Can a primary key be more than one column?

A

Yes. It can be, provided both columns are unique to that record.

30
Q

What is an artificial key?

A

A key that is generated by the business, made up. It could be an auto generated number.

31
Q

What is a secondary key?

A

They candidate keys that are left over after a primary key has been selected.

32
Q

What is a foreign key?

A

A primary key in one table that is added to another table to establish a relationship between the records. There can be any number of foreign keys in a table.