Build the database using capabilities

Assignment Help PL-SQL Programming
Reference no: EM132314898

Data Modelling Assignment

General Specification

(a) Derive relations from the supplied Entity-Relationship Diagram given below into a logical model representation in terms of the relational data model. Identify a primary key for each relation and subsequently all foreign keys.

You need to use the database description language (DBDL) as described in Chapter 17 of the textbook, for example

You also need to justify the reasoning behind the derivation (e.g. why does it contain a foreign key, can the foreign key be NULL, why has a particular ON UPDATE been chosen, etc.), for example:

(b) Translate your answer to (a) into SQL (in a file .sql) and build the database using capabilities of SQLite. Include the relevant DROP statements and specify ALL primary and foreign keys. If want to demonstrate ISO SQL that is not available in SQLite than include as a comment, but ensure that you have correct, runnable SQLite database as well. You also need to populate your database (INSERT INTO ...) with some sample data and perform some simple queries to ensure it works correctly.

The required submission for Part II of the assignment is:

Submit part (a) on FLO as a PDF containing the description of the derived relations and your reasoning behind the derivation of the relation.

Submit part (b) on FLO as a SQLite .sql file that can be executed on SQLite ver 3.x. You will be penalised heavily if the file does not execute without errors.

You may also submit an assumption and clarification document to assist in interpreting your derivations and implementation.

Specifications
PLEASE base the design on the description i.e. treat the description like requirements. Failure to adhere to the description is very poor professional practice. (If you really believe the description is invalid, please discuss it with me as soon as possible.) I am quite happy, in consulting, to explain any part of the description that is problematic. Also keep up to date on FLO for any clarifications.

Wheels-4-U
The car hire firm Wheels-4-U, requires a database system to manage their fleet of hire vehicles. Each vehicle in the fleet has a unique fleet membership number (N 3). Also recorded is the vehicle's registration number (S 7), colour (S 20), and make (S 8) and model (S 8). Along with the make and model combination, also recorded is the number of doors (N 1), body style (hatch, sedan, SUV, or coupe), and trim level (standard, sport, luxury).

Each Wheels-4-U depot has an identification code (N 2). Also recorded is the depot's address (A), 1 to 4 phone numbers (S 14), and a fax number (S 14). The current location (depot) of vehicles available for hire is recorded.

Wheels-4-U has several different types of daily hire tariffs, for example, depending on the type of driver (e.g. under 21) or varied driving locations (city or country). For each type, an identification code (S 2) is recorded only with a description of the conditions under which it applies (S 50). For each make/model of car, the daily rental tariff ($ 3) is recorded for each of the tariff types.

When a vehicle is hired, the depot from which it is hired, the hire time and date (D) are recorded. The intended drop off depot also recorded. The hirer (client) involved is recorded along with the type (S 2) and number (S 20) of the credit card to be used to pay for that hire. (For security reasons neither cash nor cheques are accepted by Wheels-4-U.) There will be one person recorded as being the nominated driver of the hired vehicle (this does not have to be the hirer). A vehicle's kilometreage (N 5) (distance travelled) is recorded when it is hired. At any one time only one vehicle is on hire to a customer. Also recorded is the applicable tariff type and the number of hire days (N 2). Optional insurance maybe taken for each hire. An insurance policy number (N 5), policy type (excess reduction, excess removal, or full cover) and cost ($ 3) is recorded.

A make and model of vehicle may also be booked for a future hiring, in which case, the nominated pick-up depot, the starting time and date for the booking (D), and the intended number of hire days (N2) are recorded. An optional preferred colour (S 12) may be recorded.

A client may make any number of bookings.
Wheels-4-U records the individual details of any client the first time that the person or the company has business with the company. A client's name (C), address (A) and one or two contact phone numbers (S 14) are recorded along with a generated unique client identifier. This identifier is used for all subsequent references to that client. If the client is a company, they must have a (single) nominated person also recorded as their representative. The details of such representatives are recorded as though they were person clients. A (person) client's driver's license number (S 12) is recorded the first time that they hire a vehicle or are a nominated driver.

For each vehicle, a service history is kept. It contains for each past service, (scheduled or repair service), the date (D), the cost ($ 4), a service description (S 50) and the identification of the depot where the servicing was done. A vehicle may have had none or several past services. For all vehicles, the next scheduled service has the associated kilometrage (N 5), date-to-be-done-by (D) and the depot to do the servicing recorded.

Only after the vehicle is returned an invoice is generated for the vehicle hired (with a unique invoice ID (N 10) that contains the details or the hirer (and company if applicable), the vehicle hired, the return depot, an indication that the vehicle passed a quality check (a ‘Yes' or ‘No') and the final cost ($ 5) based on the number of days and the daily rental tariff. The date paid (D) is also recorded and if it has not been recorded the invoice is considered unpaid.

Operations and Questions
The "Operations and Questions" are here to help verify/validate you design. You do not need to provide answers to questions for the assignment.
• Add a new hire
• Add a new vehicle to the fleet
• List all hires for the last month
• Which make of vehicle has had the most hires?
• Which make of car is the most/least popular?
• Which depot has the most vehicles available for hire?
• Which depot is the most popular based on hires?
• List all the hires with a the number of hire days more than X.
• List all the vehicles that have a scheduled service soon (in the next month).
• List all vehicles that do not currently have a future hire booked
• List all invoices that have not been currently paid.
• What are the different daily rental tariffs for tariff ID "C1" for each of the make/models?

5. Scope Creep!

The customer loves the design that was create and, as always, the customer now has some more ideas for you to include - otherwise known as "scope creep". We usually try to avoid this but there are a few good ideas that we will include:
• Drivers have the same information stored as if they were clients
• Multiple drivers for a single hire
• The Insurance Policy Types should also have the individual Insurance Policy Number that its generated and given to the Client.

Attachment:- Data Modelling.rar

Reference no: EM132314898

Questions Cloud

How can using a crm support business operations : Consider whether you are for or against the following statement in the electronic age: Customer relationships are more important than ever, and Zappos provides.
Create an annotated bibliography using given details : As you work to gather information about your research topic, a helpful tool to create/use is an annotated bibliography. An annotated bibliography can help your.
Calculate the sales price variance : Northern Company's budgeted and actual sales for 2009 were as follows. Calculate the sales volume variance. Calculate the sales price variance.
Explain security or master plan and countermeasures : For this assignment, you are the information security manager for the county of Rockdale. The county just elected a new sheriff. He does not have a keen.
Build the database using capabilities : COMP1711 - Database Modelling and Knowledge Engineering - Flinders University - logical model representation in terms of the relational data model
What are the challenges for the audit profession : The traditional way to study accounting assumes that businesses receive and make payments by check and retail business is conducted using cash.
Discussing the development of a risk management plan : This week we are discussing the development of a risk management plan. Since risk management planning is quite similar to project management.
Find the amount should dayden company report : Find the amount should Dayden Company report as interest expense for the year ended December 31, Year 1? Find the pension expense using the following amounts.
What do simplicity mean within context of policy modeling : Policy Making and Modelling in a Complex World Wander Jager and Bruce Edmonds from Text book: Policy Practice and Digital Science, Integrating Complex Systems.

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd