Concept explainers
produce a list of relations indicating the primary key, columns and foreign keys.
Consider the following attributes for tables in a relational model
designed to keep track of information for a moving company that
moves residential customers, usually from one home or apartment
to another:
customerID, customerName, customerCurrentAddress,
customerCurrentPhone, customerNewAddress, customerNewPhone,
pickupLocation, dropOffLocation, dateOfMove, startingTime,
estimatedWeight, estimatedCost, truck#Assigned, driverName,
driverLicNo, actualCost, amountOfDamages, truckCapacity,
costOfTolls, tax, finalAmount, invoiceNumber, amountPaid,
datePaid, checkNumber, amountDue
Assume:
- Although in most cases the pickupLocation is the customer’s old
address and the dropOffLocation is the new address, there are
exceptions, such as when furniture is moved to or from storage.
-An estimate is provided before the move using a pre-printed invoice
containing a unique invoice number. The actual cost is recorded
on the same form once the move is complete. The actual cost may
differ from the estimated cost. The final amount includes the actual
cost of the move, plus tax and tolls.
- In most cases, the customer pays the final amount immediately,
but sometimes he or she pays only part of the bill, especially if the
amount of damages is high. In those cases, there is an amount due,
which is the difference between the final amount and the amount
paid
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps
- Indicate the changes (using the shorthand representation) that you would need to make to the original KimTay Pet Supplies database design to support the following requirements. There is no relationship between customers and sales reps. When a customer places an order, any sales rep can process the order and create the invoice. On the invoice, you need to identify both the customer placing the order and the sales rep responsible for the invoice. Draw an E-R diagram for the new design.arrow_forwardGiven the relation members(mid: INTEGER, name: CHAR(30), age: INTEGER, tier: INTEGER) Write a SQL query to show the average age in each tier with more than 2 members, including how many members in each tier, for tiers above 5 in ascending order, with labels for aggregate fields shown.arrow_forwardImplement a new independent entity phone in the Sakila database. Attributes and relationships are shown in the following diagram: The diagram uses Sakila naming conventions. Follow the Sakila conventions for your table and column names: All lower case Underscore separator between root and suffix Foreign keys have the same name as referenced primary key Write CREATE TABLE and ALTER TABLE statements that: Implement the entity as a new phone table. Implement the has relationships as foreign keys in the Sakila customer, staff, and store tables. Remove the existing phone column from the Sakila address table. Step 2 requires adding a foreign key constraint to an existing table. Ex: ALTER TABLE customer ADD FOREIGN KEY (phone_id) REFERENCES phone(phone_id) ON DELETE SET NULL ON UPDATE CASCADE; Specify data types as follows: phone_id, phone_number, and country_code have data type INT. phone_type has date type VARCHAR(12) and contains strings like 'Home', 'Mobile', and 'Other'. Apply…arrow_forward
- When considering creating a join between two tables, how are we demonstrating the concept of "relational" databases? Why is it essential that we create the join by finding a common attribute that is unique in at least one table and look at situations where that attribute has the same value ( is equal ) in both tables?arrow_forwardUse a suitable example to provide a thorough description of the relational model.arrow_forwardDescribe the difference between how a 1:M unary relationship and an M:N unary relationship are implemented in a relational data model.arrow_forward
- StayWell also rents out properties on a weekly basis to students attending summer school in the Seattle area. Design a database to meet the following requirements, using the shorthand representation and a diagram of your choice. For each student renter, list his or her number, first name, middle initial, last name, address, city, state, postal code, telephone number, and e-mail address. For each property, list the office number, property address, city, state, postal code, square footage, number of bedrooms, number of floors, maximum number of persons that can sleep in the unit, and the base weekly rate. For each rental agreement, list the renter number, first name, middle initial, last name, address, city, state, postal code, telephone number, start date of the rental, end date of the rental, and the weekly rental amount. The rental period is one or more weeks.arrow_forwardEMPLOYEE Frame Minit Lname Sen Bdate Address Sex Salary Super sen Dno +444 DEPARTMENT Dname Dnumber Mor an Mgr start date DEPT LOCATIONS Dnumber Dlocation PROJECT Prame Prumber Plocation Dnum WORKS ON Ennn Pno Hoir Hours DEPENDENT Esen Dependent name Se Bdate Relationship Reforential integrity constraints displayed on the COMFWNY relational database schema. One possible database state for the COMPANY relational database schema. EMPLOYEE Fname Minit Lname John Frankin T Sex Salary 30000 333445555 5 M 40000 Jo00665555 F 25000 Joe7e54321 43000 J88Ge5556 San Bdate Address Super en Dno 123456789 1965-01-09 731 Fondren, Hounton, TX M 333445555 1955-12-08 638 Voas, Houston, TX Go0087777 1960-01-19 3321 Castle, Spring. TX 987654321 1941-06-20 291 Berry, Bellaire, TX Narayan 666884444 1962-09-15 975 Fire Oak, Humibile, TX M B Smith Wong Zelaya Wallace 5 Alicia 4 Jennifer F 38000 333445655 25000 333445555 M 25000 007654321 M 55000 NULL Ramesh English 453453453 1972-07-31 5631 Rice, Houston, TX F…arrow_forwardHow do you represent a 1:M unary relationship in a relational data model?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education