chapter 6 Flashcards
what is a simple UID
A UID that is a single attribute is a simple UID
what is a composite UID
If the UID is a combination of attributes, it is called composite UID
what is a UID
It is the value or combination of values that enables the user to find that one unique item among all the rest.
What are artificial UID
- -> dont occur in the natural world but are created for purposes of identification in a system
- -> people are not born with numbers, but a lot of systems assign unique numbers to identify people
A UID can be both _____ and ______
artificial and composite
Sometimes the UID is a combination of both _________ and a _________
attribute and a relationship
what can be used instead of a barred relationship to the originating entities
Intersection entity
What is a candidate entity
- -> sometimes 2 or more UIDs exist
- -> these are both candidate UIDs
- -> only one of the candidate UIDs is chosen as the actual UID which is called primary UID
- -> the other UIDs are called secondary UID
example of candidate UID
student ID and badge number
- -> student ID is the primary UID
- -> badge number is a secondary UID
what does a primary key allow you to do
access a specific record in teh database
There is not limit to the number of attributes that can make up a UID
True
do you need the barred relationship if you have an artificial UID
no barred relationships required
what is the normalisation process
Database normalisation is a database schema design technique, by which an existing schema is modified to minimise redundancy and dependency of data.
Normalization splits a large table into smaller tables and defines relationships between them to increase the clarity in organizing data.
what is the first normal form
- -> the first normal form requires that no multi-valued attributes exist
- -> to check for 1NF, validate that each attribute has a single value for each instance of the entity
how to convert into first normal form
if an attribute is multi valued, create an additional entity and relate it to the original entity with a 1:M relationship
what is the goal of a database designer
store information in one place only and in the best possible way
this can be achieved by applying the rules of normalization
what is the second normal form
the second normal form requires that any non-UID attribute be functionally dependent on all parts of the UID
*dont write 👇 (extra info)
however non-key columns can still be functionally dependent on other non key columns
give an example where third normal form can help solve the problem
if you have several friends who go to the same school, and you enter the school’s street address along with each of them, you would not only be duplicating the data but cause potential problems such as for instance if the school moved and changed its address, you would have to go back and change it everywhere.
what does the third normal form state
- -> no non-UID attribute can be dependent on another non-UID attribute
- -> third normal form prevents transitive dependencies
- -> a transitive dependency exists when any attribute in an entity is dependent on any other non-uid in that attribute
give an example where the second normal form can help solve a problem
if you store a friend’s address in the recipe box you may not find it until you look up that recipe
what is a prime attribute
An attribute, which is a part of the candidate-
key, is known as a prime attribute
what is a non prime attribute
An attribute, which is not a part of the
prime-key, is said to be a non-prime attribute
if we follow second normal form then ______________
If we follow second normal form, then every non-prime attribute
should be fully functionally dependent on prime key attribute.
what is a transitive dependency
A transitive dependency exists when any attribute in an entity is dependent on any other non-UID attribute in that entity.
what is another way of stating the third normal form
A non UID attribute cannot have attributes of their own
what is a. superkey
it is a set of columns such that the value of that set of columns is unique across various rows