Home /
Expert Answers /
Other /
diagram-similar-like-this-other-things-you-need-to-use-mysql-1-create-a-relational-model-to-manage-t
(Answered): Diagram similar like this:Other things you need to use MySQL 1) Create a relational model to manage ...
Diagram similar like this:
Other things you need to use MySQL
1) Create a relational model to manage the database for a car dealer. The main two departments in the dealership are sales and purchase. The dealership also has a car repair/service department. The dealer buys new and used cars from auto manufacturers such as GM, Toyota, Ford, Honda, etc. It also buys cars from other dealers and individual sellers. It sells cars to other dealers and individual customers. The dealership provides repair service to other dealers and individual customers. It employs four different categories of employees: managers, office assistants, mechanics and sales agents. Individual assistants, agents and mechanics work under managers. Sales agents get a certain percentage of commission for each sale. You have freedom to make necessary assumptions about relations and attributes to create a realistic model. 2) Make sure you define primary and foreign key constraints properly. Give descriptive names to relations and attributes. 3) Design the database schema in LucidChart following the conventions used in the textbook. For each relation schema, provide justifications for your choice of the primary and foreign keys. 4) Use SQL commands to create the schema of your database. Also use SQL commands to enter at least 5 dummy tuples in each relation. 5) Create examples of SQL query employing each of the SQL clauses: a. Union - 1 example b. Aggregate + Group by - 2 examples C. Nested query-2 examples For each example, include the query in natural language and corresponding SQL statements. Add additional tuples if required to run your queries successfully. For each query, provide the screenshot of the output of the query on MySQL server. Submit one pdf document that will contain: a. Database schema drawn using Lucidchart b. Justifications for integrity constraints C. SQL statements to create the schema and to insert dummy tuples into relations d. Five Query statements in natural language and SQL. e. Screenshots of the outputs of the queries on MySQL server takes student ID course id sec id semester Near grade ID name depr_name for_cred section course course id sec id semester year building room number time_slot_id course_id title dept_name credits department dept name building budget advisor sid Iid time_slot time_slot id day start_time end_time instructor classroom building room number capacity prereq course id preregid ID name depr_name salary teaches ID course id sec_id semester year