Database Concepts Flashcards
What is an entity?
An entity is a person, place, thing, or event that a business needs to know about. Some examples are people, customers, parts, orders, etc.
What is an attribute?
A property of an entity. i.e. if an entity is a person then an attribute may be sex, eye color, height, etc.
What is an entity set?
A collection of entities. i.e. a table of person entities.
What is an entity instance?
A single entity. i.e. a person in a table of persons.
The concept of an entity is equal to [blank] in database terminology.
table
An attribute is equal to [blank] in database terminology.
column
An instance of an entity is equal to [blank] in database terminology.
record or row.
implementing a database requires two steps. What are they?
Physical and logical.
What is involved in the logical design step of implementing a database?
It is the planning out phase before actually coding. Getting the abstract design of the database created.
What is involved in the physical design of the database?
The actual software implementation of tables and columns that are used to represent their real world counterparts.
The way to store an attribute about an entity depends on what?
The needs of the business.
What is a simple valued attribute?
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.
What is a composite valued attribute?
Multiple components make up the value. i.e. “John Wayne Smith”. If a component is missing, then you cannot determine the value.
What is a derived attribute?
Not actually stored in the table, but calculated from data in the table.
What is a single valued attribute?
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.
What is a multi-valued attribute?
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.
Multi-valued columns are bad. Why is this so?
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.
Can a value be both simple and composite at the same time?
no
Can a value be both single and multi valued at the same time?
no
Can a value be single and simple valued at the same time?
yes
Can a value be simple and multi valued at the same time?
yes, but it is bad. Don’t do it. i.e. rental number stored in customer table.
Can a value be composite and single at the same time?
Yes. i.e. date of birth.
Can a value be composite and multi valued at the same time?
Yes, but it is bad. Don’t do it. i.e. rental date stored in customers table.
What are business rules?
rules about how the business operates that dictates the database design. Should be done before design in order to implement correctly.