it 244 pro 2
College of Computing and Informatics Project Deadline: Sunday 12/5/2024 @ 23:59 [Total Mark is 14] Student Details: CRN: Name: Name: Name: ID: ID: ID: Instructions: • You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via the allocated folder. These files must not be in compressed format. • It is your responsibility to check and make sure that you have uploaded both the correct files. • Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between words, hide characters, use different character sets, convert text into image or languages other than English or any kind of manipulation). • Email submission will not be accepted. • You are advised to make your work clear and well-presented. This includes filling your information on the cover page. • You must use this template, failing which will result in zero mark. • You MUST show all your work, and text must not be converted into an image, unless specified otherwise by the question. • Late submission will result in ZERO mark. • The work should be your own, copying from students or other resources will result in ZERO mark. • Use Times New Roman font for all your answers. Project Instructions Pg. 01 Project Instructions • You can work on this project as a group (minimum 2 and maximum 3 students). Each group member must submit the project individually with all group member names mentioned on the cover page. • This project is worth 14 marks and will be distributed as the following: o Design a Conceptual Schema using ER modeling concepts, including (Entities, Relationships, Attributes, Participation (Total or Partial), and Cardinality). (3 marks) o Tables before Normalization. (2 marks) o Tables after Normalization Using mapping Algorithm. (3 marks) o Use MySQL or any other DBMS to create the normalized tables and populate your tables with at least 10 rows. (3.5 marks) o Execute the requested sample queries. (2.5 marks) • Each student must submit one report about their chosen Project via the Blackboard (Email submission will not be accepted and will be awarded ZERO marks) containing the following: a) ER Diagram. b) All schemas before normalization. c) All schemas after normalization. d) All SQL statements of: ▪ Creating tables. ▪ Inserting data in tables. e) All requested queries/results. • Screenshots from MySQL (or any other software you use) of all the tables after population and query results. • You are advised to make your work clear and well presented; marks may be reduced for poor presentation. This includes filling in your information on the cover page. Project Instructions Pg. 02 • You MUST show all your work, and text must not be converted into an image unless specified otherwise by the question. • Late submission will result in ZERO marks being awarded. • The work should be your own. Copying from students or other resources will result in ZERO marks. Project I Pg. 03 Project I Database System for a car rental company Consider the company requirements as follows: A car rental company needs a comprehensive database system to streamline its operations. The system should enable customers to rent cars from multiple locations (Riyadh, Jeddah, Makkah, Dammam, Al-Khobar, Qasim, Tabuk, ALBaha, Al-Jawf, Ha’il, Aseer, Jazan, Najran). Customers will be required to register by providing their full name, email, phone number, and date of birth. The company owns a fleet of cars, which contains important details such as the manufacturer, model, manufacturing year, license plate, and daily rental rate. Every rental transaction will involve the customer, the rented car, and the rental period (start and end dates). As the company operates in multiple cities and states, multiple rental locations are available, each with its name, street address, city, state, and postal code. Customers can rent multiple cars, and each car can be rented by multiple customers. A specific rental location will be associated with each car. Moreover, each rental transaction will be linked to a specific rental location. To maintain data integrity, constraints such as unique customer and car IDs will be enforced. Rental transactions must be associated with both a customer and a car. On the other hand, each car should be linked to a rental location. Reports on rental transactions will be generated, including customer information, location, and period. User roles will be implemented for customers and system administrators. Customers will be able to view available cars, rent cars, and access their rental history. Meanwhile, administrators will be able to manage car inventory, rental locations, and customer accounts. Project I Pg. 04 The system will ensure that cars are available for rent at specific locations and track car availability to prevent overbooking. Rental costs will be calculated based on the rental rate per day. User authentication and authorization will be implemented to protect customer data and system operations. Project I Pg. 05 a) ER Diagram b) Tables before the normalization c) Tables after the normalization d) Create the normalized tables and populate them with at least 10 rows e) Write the sample requested Quesries & Execute them 1. List the first and last names of customers who have rented a car more than two times. 2. List all cars in Jazan whose manufacturing year is greater than 2007. 3. List all cars that have been rented from Jeddah city along with customer information (First and last name, email address, and phone number) 4. List all cars rented more than three times in all cities. 5. List all cars with a rental period of more than five days, along with the customer information (First and last name, email address, and phone number). Ans A). Here’s a rough ER diagram based on the given requirements: Project I Pg. 06 b) Tables before Normalization: Before normalization, we’ll directly translate the entities and relationships into tables: Customer (Customer_ID PK, Full_Name, Email, Phone_Number, Date_of_Birth) Car (Car_ID PK, Manufacturer, Model, Manufacturing_Year, License_Plate, Daily_Rental_Rate, Rental_Location_ID FK) Rental_Transaction (Transaction_ID PK, Customer_ID FK, Car_ID FK, Rental_Location_ID FK, Start_Date, End_Date) c) Tables after Normalization: Normalization involves breaking down the tables to ensure data integrity and minimize redundancy. For example, we might separate out the Rental_Location details into its own table: Customer (Customer_ID PK, Full_Name, Email, Phone_Number, Date_of_Birth) Car (Car_ID PK, Manufacturer, Model, Manufacturing_Year, License_Plate, Daily_Rental_Rate, Rental_Location_ID FK) Rental_Location (Rental_Location_ID PK, Name, Street_Address, City, State, Postal_Code) Project I Pg. 07 Rental_Transaction (Transaction_ID PK, Customer_ID FK, Car_ID FK, Rental_Location_ID FK, Start_Date, End_Date) d) Create normalized tables and populate them with at least 10 rows: For MySQL, you would execute SQL statements to create the tables and then insert sample data into them. CREATE TABLE Customer ( Customer_ID INT AUTO_INCREMENT PRIMARY KEY, Full_Name VARCHAR(255), Email VARCHAR(255), Phone_Number VARCHAR(20), Date_of_Birth DATE ); CREATE TABLE Car ( Car_ID INT AUTO_INCREMENT PRIMARY KEY, Manufacturer VARCHAR(255), Model VARCHAR(255), Manufacturing_Year INT, License_Plate VARCHAR(20), Daily_Rental_Rate DECIMAL(10, 2), Rental_Location_ID INT, FOREIGN KEY (Rental_Location_ID) REFERENCES Rental_Location(Rental_Location_ID) ); Project I Pg. 08 CREATE TABLE Rental_Location ( Rental_Location_ID INT AUTO_INCREMENT PRIMARY KEY, Name VARCHAR(255), Street_Address VARCHAR(255), City VARCHAR(100), State VARCHAR(100), Postal_Code VARCHAR(20) ); CREATE TABLE Rental_Transaction ( Transaction_ID INT AUTO_INCREMENT PRIMARY KEY, Customer_ID INT, Car_ID INT, Rental_Location_ID INT, Start_Date DATE, End_Date DATE, FOREIGN KEY (Customer_ID) REFERENCES Customer(Customer_ID), FOREIGN KEY (Car_ID) REFERENCES Car(Car_ID), FOREIGN KEY (Rental_Location_ID) REFERENCES Rental_Location(Rental_Location_ID) ) Project I Pg. 09 Populating the tables with sample data: INSERT INTO Customer (Full_Name, Email, Phone_Number, Date_of_Birth) VALUES (‘John Doe’, ‘[email protected]’, ‘123-456-7890’, ‘1990-01-01’), (‘Jane Smith’, ‘[email protected]’, ‘987-654-3210’, ‘1985-05-15’), — Additional customer rows… INSERT INTO Car (Manufacturer, Model, Manufacturing_Year, License_Plate, Daily_Rental_Rate, Rental_Location_ID) VALUES (‘Toyota’, ‘Camry’, 2010, ‘ABC123’, 50.00, 1), (‘Honda’, ‘Accord’, 2015, ‘DEF456’, 60.00, 2), — Additional car rows… INSERT INTO Rental_Location (Name, Street_Address, City, State, Postal_Code) VALUES (‘Riyadh Branch’, ‘123 Main St’, ‘Riyadh’, ‘Riyadh Province’, ‘12345’), (‘Jeddah Branch’, ‘456 Elm St’, ‘Jeddah’, ‘Makkah Province’, ‘67890’), — Additional rental location rows… Project I Pg. 10 INSERT INTO Rental_Transaction (Customer_ID, Car_ID, Rental_Location_ID, Start_Date, End_Date) VALUES (1, 1, 1, ‘2024-04-01’, ‘2024-04-07’), (2, 2, 2, ‘2024-04-02’, ‘2024-04-10’), — Additional rental transaction rows… e) Sample requested Queries & Execution: List the first and last names of customers who have rented a car more than two times. SELECT c.Full_Name FROM Customer c JOIN Rental_Transaction rt ON c.Customer_ID = rt.Customer_ID GROUP BY c.Customer_ID HAVING COUNT(rt.Customer_ID) > 2; List all cars in Jazan whose manufacturing year is greater than 2007. SELECT * FROM Car c JOIN Rental_Location rl ON c.Rental_Location_ID = rl.Rental_Location_ID WHERE rl.City = ‘Jazan’ AND c.Manufacturing_Year > 2007; List all cars that have been rented from Jeddah city along with customer information (First and last name, email address, and phone number). SELECT cu.Full_Name, cu.Email, cu.Phone_Number FROM Customer cu JOIN Rental_Transaction rt ON cu.Customer_ID = rt.Customer_ID Project I Pg. 11 JOIN Rental_Location rl ON rt.Rental_Location_ID = rl.Rental_Location_ID WHERE rl.City = ‘Jeddah’; List all cars rented more than three times in all cities. SELECT c.*, COUNT(rt.Car_ID) AS Rental_Count FROM Car c JOIN Rental_Transaction rt ON c.Car_ID = rt.Car_ID GROUP BY c.Car_ID HAVING COUNT(rt.Car_ID) > 3; List all cars with a rental period of more than five days, along with the customer information (First and last name, email address, and phone number). SELECT cu.Full_Name, cu.Email, cu.Phone_Number, rt.Start_Date, rt.End_Date FROM Customer cu JOIN Rental_Transaction rt ON cu.Customer_ID = rt.Customer_ID WHERE DATEDIFF(rt.End_Date, rt.Start_Date) > 5;
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.