The union results to the following results
Student |
Year if Study |
Lecturer |
Mark |
2 |
M. Taylor |
Lorrain |
3 |
K. Heel |
Peter |
3 |
J. Brown |
Linda |
1 |
S. Green |
John |
2 |
B. White |
Lorrain |
3 |
K. Heel |
Linda |
1 |
O. Roberts |
Peter |
1 |
S. Green |
John |
2 |
L. Young |
Lorrain |
3 |
L. Young |
Peter |
3 |
R. Fisher |
The union of table results to the results shown in the table above which consists of all records of R1 and all records of R2. Thus the result was achieved by adding up records of R2 to R1 but for distinct values thus eliminating duplicates.
Intersection of table R1 and R2 gets the rows of R1 and R2 that are identical. Based on the data in table R1 and R2 intersection will result to the following data.
Student |
Year if Study |
Lecturer |
Mark |
2 |
M. Taylor |
Lorrain |
3 |
K. Heel |
Linda |
1 |
S. Green |
Difference R1 and R2
This operation will return all rows in R1 that are not in R2. Based on the data on the two tables the following is the result of R1 DIFFERENCE R2.
Student |
Year if Study |
Lecturer |
Peter |
3 |
J. Brown |
John |
2 |
B. White |
This operation will return all rows of R2 that are not in R1. Based on the data on the two tables R2 DIFFERENCE R1 will return the following results.
Student |
Year if Study |
Lecturer |
John |
2 |
B. White |
Lorrain |
3 |
K. Heel |
Linda |
1 |
O. Roberts |
Peter |
1 |
S. Green |
John |
2 |
L. Young |
Lorrain |
3 |
L. Young |
Peter |
3 |
R. Fisher |
Prodcut operator returns all the attributes of table A followed by each attribute of table B thus each record of table A pairs with each record of B. Considering table A and table B shown below
A PRODUCT B will result to;
A1 |
A2 |
A3 |
B1 |
B2 |
B3 |
5 |
7 |
8 |
2 |
4 |
5 |
5 |
7 |
8 |
1 |
6 |
9 |
5 |
7 |
8 |
7 |
2 |
8 |
4 |
3 |
9 |
2 |
4 |
5 |
4 |
3 |
9 |
1 |
6 |
9 |
4 |
3 |
9 |
7 |
2 |
8 |
Based on this table;
Thhe following functional dependencies exist in the relation.
Item_Codeàitem_description, building_ID, building_name, Room, Builiding_manager
Item_codeàdescription (transitive dependency)
Building_IDàbuiliding_name,room, builidngManager
Item_code,RoomàBuilidngID (partial dependency)
The entities above are in 3NF because all partial and transitive dependencies have been eliminated. The relational schema below shows more details of each table.
Table |
Attributes |
Constraint |
Item |
Item_code |
Primary key |
Item_Description |
||
Room_No |
Foreign key references Room (Room_No) |
|
Room |
Room_NO |
Primary key |
Building_ID |
Foreign key references Building (Building_ID) |
|
Building |
Building_ID |
Primary key |
Building_Name |
||
Building_Manager |
The ERD is modelled based on the following assumptions
The ERD is modeled based on the following characteristics;
Table |
Attributes |
Constraint |
Guide |
GuideNum |
Primary key |
lastName |
||
firstName |
||
Address |
||
city |
||
State |
||
PostalCode |
||
PhoneNum |
||
HireDate |
||
Trip |
TripID |
Primary key |
TripName |
||
StartLocation |
||
State |
||
Distance |
||
MaxGrpSize |
||
Type |
||
Season |
||
Trip_Guide |
TripID |
Primary key, Foreign key references Trip (TripID) |
GuideNum |
Primary key, Foreign key references Guide (GuideNum) |
|
Reservation |
reservationID |
Primary key |
TripID |
Foreign key references Trip (TripID) |
|
TripDate |
||
NumPersons |
||
TripPrice |
||
OtherFees |
||
CustomerNum |
Foreign key references customer (CustomerNum) |
The relation model is in 3NF because the following conditions hold;
àFirst normal form but not in second normal form
Considering table trip_guides, the table can be added more attributes to demonstrate a table that is in 1NF and not in 2NF.
Trip_guides (TripID, GuideNum, hireDate)
Based on the table above, the following functional dependencies exist;
TripID,GuideNumàHireDate
GuideNumàHireDate (partial dependency)
This table is in 1NF because it does not contain any repeating groups but the relation is in not in 2NF because it contains a partial dependency. The partial dependency exists because hireDate is dependent on a part of the composite primary key and not the whole key thus it’s not in 2NF.
To normalize the table the partial dependency is eliminated leaving the table in 2NF. This will result to the following tables
Trip_Guides( TripID, GuideNum)
Guide( GuideNum, HireDate
àSecond Normal Form and not in in third normal form
A relation is 3NF if its in 2NF and contains no transitive dependency thus considering the guide relation and assuming that each trip has only one guide, the following relation is in 2NF.
Guide (guideNum, firstName, lastName,TripID, TripDate)
The following dependencies exist in the relation;
GuideNum,àFirstname, lastName, TripID, TripDate
TripIDàTripDate (transitive dependency)
To normalize the relation to 3NF, the transitive dependency is eliminated resulting to the following tables;
Guide (GuideNum, firstName, lastName)
Trip (TripID, TripDate, GuideNum)
Trip (TripID, TripName, stateAbbreviation, StateName, (GuideNum, GuideLastName, GuideFirstName)
(GuideNum, GuidelastName, GuideFirstName) is a repeating group.
TripIDàTripName, stateAbbreviation, StateName, GuideNum, GuideLastName, GuideFirstName)
GuideNumàGuideLastName, GuideFirstName (transitive dependency)
To convert the table to 3NF the transitive dependency is eliminated thus resulting to the following relations;
Trip (tripID, TripName, stateAbbreviation, StateName, GuideNum)
Guide (GuideNum, GuideLastName, GuideFirstName)
Considering the Trip table;
Trip( TripID, TripName, startLocation, State, Distance, MaxGrpSize, Type, Season)
Considering the trip can be held in more than one season, this creates a repeating group for the season attribute thus to normalize the repeating group is eliminated.
Trip (TripID, TripName, StartLocation, State, Distance, MaxGrpSiz, Type)
Trip_Seasons (TripID, Season)
This is based on the following assumptions;
According to the changes proposed for the expanded database design, the following relations are as a result of implementing the changes;
The updated relational model is shown in the table below;
Table |
Attributes |
Constraint |
Guide |
GuideNum |
Primary key |
lastName |
||
firstName |
||
Address |
||
city |
||
State |
||
PostalCode |
||
PhoneNum |
||
HireDate |
||
Trip |
TripID |
Primary key |
TripName |
||
StartLocation |
||
State |
||
Distance |
||
MaxGrpSize |
||
Type |
||
Season |
||
TripPrice |
||
OtherFees |
||
Trip_Guide |
TripID |
Primary key, Foreign key references Trip (TripID) |
GuideNum |
Primary key, Foreign key references Guide (GuideNum) |
|
Reservation |
reservationID |
Primary key |
TripID |
Foreign key references Trip (TripID) |
|
TripDate |
||
CustomerNum |
Foreign key references customer (CustomerNum) |
|
agentNumber |
Foreign key references agent (agentNumber) |
|
Agent |
AgentNumber |
Primary key |
firstName |
||
lastName |
The proposed changes have been implemented based on the following assumptions;
Table |
Attributes |
Data Type |
Constraint |
Assumptions made |
Guide |
GuideNum |
Char(5) |
Primary key |
Every guide number is unique and should consist a mixture of numbers and characters |
lastName |
Varchar(50) |
This is the lastname of the guide |
||
firstName |
Varchar(50) |
This holds the first name of the guide |
||
Address |
Varchar(50) |
This holds the address of the guide |
||
city |
Varchar(50) |
This holds the city that the guide resides in |
||
State |
Varchar(50) |
This holds the state that the guide resides in |
||
PostalCode |
Integer |
This holds the postal code of the guide |
||
PhoneNum |
Varchar(30) |
This holds the phone number of the guide |
||
HireDate |
Date |
This holds the date that guide was hired |
||
Trip |
TripID |
Integer |
Primary key |
This will be a auto incremented integer |
TripName |
Varchar(50) |
This will hold the name of the trip |
||
StartLocation |
Varchar(50) |
This will hold the starting location of the trip |
||
State |
Varchar(50) |
This will hold the state that the trip will take place in |
||
Distance |
Decimal |
This is the total distance of the trip |
||
MaxGrpSize |
Integer |
This is the maximum number of persons that the trip can accommodate |
||
Type |
Varchar(30) |
This will hold the type of the trip |
||
Season |
Varchar(10) |
This is the season that the trip takes place in |
||
TripPrice |
Decimal |
This is the price charged for a trip |
||
OtherFees |
Decimal |
This is are the other fees expected to be paid for the trip |
||
Trip_Guide |
TripID |
Integer |
Primary key, Foreign key references Trip (TripID) |
This relates to a unique trip ID |
GuideNum |
Char(5) |
Primary key, Foreign key references Guide (GuideNum) |
This relates to unique guide number |
|
Reservation |
reservationID |
Integer |
Primary key |
This will be an auto incremented integer |
TripID |
Integer |
Foreign key references Trip (TripID) |
This relates to a unique trip id |
|
TripDate |
Date |
This is the actual date that the trip will take place |
||
CustomerNum |
Integer |
Foreign key references customer (CustomerNum) |
This relates to a unique customer number |
|
agentNumber |
Integer |
Foreign key references agent (agentNumber) |
This relates to a unique agent number |
|
Agent |
agentNumber |
integer |
Primary key |
This will be an auto incremented integer |
Firstname |
Varchar(50) |
This is the first name of the agent |
||
lastName |
Varchar(50) |
This is the last name of the agent |
Table |
Primary key |
Unique, Not null index (on candidate key) |
Explanation |
Guide |
GuideNum |
Unique Not null |
Unique key containing a mixture of both integers and characters limited to only 5 characters |
Trip |
TripID |
Unique not null |
Unique auto incremented integer |
Trip_Guide |
TripID |
Not null Index |
Part of the composite primary key |
GuideNum |
Not null Index |
Part of the composite primary key |
|
Reservation |
reservationID |
Unique, Not null |
Unique key which will be automatically auto incremented |
agent |
AgentNumber |
Unique not null |
Unique key which will be automatically incremented of each record |
To accommodate changes for the database to accept reservations for groups the existing database can be modified by implementing the following changes;
The following will be the new structure of the database;
This is based on the following assumptions
Johnson, E., & Jones, J. (2008). A Developer’s Guide to Data Modeling for SQL Server. Addison-Wesley.
Ramakrishnan, R., & Gehrke, J. (2003). Database Management Systems (3rd Edition ed.). New York: McGraw-Hill Education.
We provide professional writing services to help you score straight A’s by submitting custom written assignments that mirror your guidelines.
Get result-oriented writing and never worry about grades anymore. We follow the highest quality standards to make sure that you get perfect assignments.
Our writers have experience in dealing with papers of every educational level. You can surely rely on the expertise of our qualified professionals.
Your deadline is our threshold for success and we take it very seriously. We make sure you receive your papers before your predefined time.
Someone from our customer support team is always here to respond to your questions. So, hit us up if you have got any ambiguity or concern.
Sit back and relax while we help you out with writing your papers. We have an ultimate policy for keeping your personal and order-related details a secret.
We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.
Still reluctant about placing an order? Our 100% Moneyback Guarantee backs you up on rare occasions where you aren’t satisfied with the writing.
You don’t have to wait for an update for hours; you can track the progress of your order any time you want. We share the status after each step.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
From brainstorming your paper's outline to perfecting its grammar, we perform every step carefully to make your paper worthy of A grade.
Hire your preferred writer anytime. Simply specify if you want your preferred expert to write your paper and we’ll make that happen.
Get an elaborate and authentic grammar check report with your work to have the grammar goodness sealed in your document.
You can purchase this feature if you want our writers to sum up your paper in the form of a concise and well-articulated summary.
You don’t have to worry about plagiarism anymore. Get a plagiarism report to certify the uniqueness of your work.
Join us for the best experience while seeking writing assistance in your college life. A good grade is all you need to boost up your academic excellence and we are all about it.
We create perfect papers according to the guidelines.
We seamlessly edit out errors from your papers.
We thoroughly read your final draft to identify errors.
Work with ultimate peace of mind because we ensure that your academic work is our responsibility and your grades are a top concern for us!
Dedication. Quality. Commitment. Punctuality
Here is what we have achieved so far. These numbers are evidence that we go the extra mile to make your college journey successful.
We have the most intuitive and minimalistic process so that you can easily place an order. Just follow a few steps to unlock success.
We understand your guidelines first before delivering any writing service. You can discuss your writing needs and we will have them evaluated by our dedicated team.
We write your papers in a standardized way. We complete your work in such a way that it turns out to be a perfect description of your guidelines.
We promise you excellent grades and academic excellence that you always longed for. Our writers stay in touch with you via email.