Databases Flashcards
Explain entity
a noun - person, place, thing or idea and used as the name of tables
Attribute
they are columns in tables and represent different characteristics of each entity
Explain relationship
represents the associations between the tables
Explain relation
a table
Explain relational database
A database full of relations (tables)
What is functional dependence?
When column B is functionally dependent on column A, it means that the values in column A determine the values of column B
What does A–>B mean?
It means that B is functionally dependent on A
Explain the term primary key
It means that there is one column or a collection of columns that can determine the rest of the columns - uniquely identifies the records of the table
Can primary key have a null value?
No
Explain the term candidate key
Candidate key is closely related to primary key - a candidate key is one of two or more columns that could function as a primary key for the table
What is an unnormalized relation?
It is a table (relation) that satisfies the criteria for a relation but may contain repeating groups
Definition of normal form
A table in normal form possesses a certain desirable collection of properties
Explain normalization
a process in which you identify the existence of potential problems, such as data duplication and redundancy, and implement ways to correct these problems.
Explain first normal form
A table is in 1NF when it does not contain a repeating group
What is concatenation?
connected columns (fields)
When is a table in second normal form?
A relation is in second normal form when it is already in first normal form and no nonkey column is dependent on only a portion of the primary key
What is a nonkey column
A nonkey column is a column that is not part of the primary key
When is the relation automatically in second normal form (2NF)?
When the primary key of a relation contains only a single column
Name the four categories of update anomalies
Updates; Inconsistent data; Additions; Deletions
Explain the term determinant
Any field (or collection of fields that determine another field is called a determinant i.e. the primary key and therefore any candidate key
When is a relation in third normal form (3NF)?
A table is in third normal form when it is in second normal form and the only determinants it contains are candidate keys
What is an entity-relationship diagram?
A diagram that shows the relationships between the entities
There are 3 ways to represent entities and relationships in an E-R diagram. Explain them
1) An arrow which represents a one-to-many relationship
2) A crow’s foot which represents a one-to-many relationship
3) Inserting a diamond-shaped figure that explains the relationship between the entities
What is a field?
A field refers to columns