0% found this document useful (0 votes)
40 views

Practical 8 MySQL

The document provides instructions for designing a MySQL database to model an HR system. It describes creating tables for employees, departments, jobs, locations and inserting sample data. It then lists 8 queries to run on the database including selecting employee names, unique department IDs, addresses of departments that employ people in Zanzibar, and deleting a specific employee. The goal is for students to build the database and practice common query operations.

Uploaded by

Raya
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Practical 8 MySQL

The document provides instructions for designing a MySQL database to model an HR system. It describes creating tables for employees, departments, jobs, locations and inserting sample data. It then lists 8 queries to run on the database including selecting employee names, unique department IDs, addresses of departments that employ people in Zanzibar, and deleting a specific employee. The goal is for students to build the database and practice common query operations.

Uploaded by

Raya
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

PRACTICAL: DESIGNING A DATABASE

NOTE: Instructors can provide similar

scenarios to their students similar to the one below

Design MySQL Database on the given

scenario.

Consider the following structure of HR Database:

1. Create the HR database and


all its associated tables as seen in the above figure.
2. Insert data into all the
tables
3. Write a query to display the names (first_name, last_name) of the
employees
table
4. Write a query to get a unique department ID from the employee
table.
5. Write a query to select first 10 records from a table.
6. Write a query to find the addresses (location_id, street_address, city,
state_province, country_name) of all the departments.
7. Write a query to find the name (first_name, last_name), job, department
ID and name of the employees who works in Zanzibar.
8. Write a query to delete an employee with employee_id of 1100

You might also like