In-Class Exercise (from UMM)
Feel Free to search for the exact command format.
In particular you are going to need to figure out how the CREATE TABLE and INSERT statements work. You will also need to figure out a little bit about SQL data-types. If you have any questions feel free to ask. With that in mind, here's what I
want you to do (or have already done):
-
Create your database. You will use this database for all your work.
-
Create a table called workers with the following fields (all capital):
| Column Name |
Description |
| EMPLOYEE |
The person's name |
| MANAGER |
The manager's name |
| JOB |
A job title |
| SALARY |
a yearly salary |
| YEARS_WORKED |
The number of years worked |
You get to pick the data-types for the fields
- Enter data that satisfies ALL of the following restrictions into your table:
- Roberts, Ruskin, and Raphael are all ticket agents.
- Rayburn is a baggage handler.
- Rice is a flight mechanic.
- Price manages all ticket agents.
- Powell manages Rayburn.
- Porter manages Rice, Price, Powell and himself.
- Powell is head of ground crews and Porter is chief of operations.
- Every employee receives a 10% raise for each complete year worked.
- Roberts, Ruskin, Raphael, and Rayburn all started at $12,000. Roberts just started work, Ruskin
and Raphael have worked for a year and a half, and Rayburn has worked for 2 years.
- Rice started at $18,000 and now makes $21,780.
- Price and Powell started at $16,000 and have both been working for three years.
- Porter started at $20,000 and has been around two years longer than anyone else.