Question
Imagine your company asks you to organize a relational database containing employee information. A database has entries represented by rows and fields represented by columns.
Imagine your company asks you to organize a relational database containing employee information. A database has entriesrepresented by rows and fields represented by columns. An entry corresponds to each employee, and each employee has various characteristics depicted by each field. In this database, you will store information for the following six fields for each employee: firstName, lastName, SS#, age, yearsAtCompany, and phoneNumber. Complete the following:
In general, entries in a relational database can be represented as a set of n-tuples, where n is the number of fields. Provide 3 sample entries from 3 employees in the company. Feel free to devise their personal information in each field. Write out this information as a set of 3 6-tuples.
Since the database has 6 fields and is represented as a set of 6-tuples, it is considered an n-ary relation where n=6. Let us focus in on two fields of our database: firstName and lastName. Given these two fields, we can define a binary relation, represented by the set of 2-tuples, which includes all entries in our database of these two fields. Note: The first entries in the 2-tuples represent elements from the domain, and the second entries in the 2-tuples represent elements from the range. Assume you have populated this database with all employee information. Do you believe this binary relation would be symmetric, transitive, and/or reflexive? Justify your answers. Feel free to use examples to help justify.
In general, a function is a specific type of relation such that each element in the domain is related to exactly one element of the range. Given the binary relation composed by the fields firstName and lastName, is this relation a function? Justify your answer.
In the context of databases, a key is a field in the database with the particular characteristic that each value in this field is related to only 1 entry (row) in the database. It is a unique identifier. Given this database, which field would be the best key? Justify your answer.
Using 2 of the fields from this database, describe a binary relation such that the relation is a function. Define the domain and the range of this function. Describe this function onto (surjective), one-to-one, (injective), or both (bijective). Justify your answer. Feel free to use an illustration to aid in explanation.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started