Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need some example code for these 18 in mysql: 1- List all records from each table. 2- List all of your constraints in the

I need some example code for these 18 in mysql:

1- List all records from each table.

2- List all of your constraints in the database one table at a time.

3- List all of your table names in the database.

4- List the structure of each table.

5- Create three new tables that all have the same structure as your Trainee Table above. Name each of the tables as follows: Chrysler_Trainee_TBL, Ford_Trainee_TBL, and GM_Trainee_TBL. (Do not relate these tables to other tables)

6- Copy the respective Trainees from the Trainee Table into Chrysler_Trainee_TBL, Ford_Trainee_TBL, or GM_Trainee_TBL based on which company the Trainees are associated with. Use one command for each insertion of records into each table.

7- Add a new CompanyName field to each of the three Trainee tables that you just created in Q5.

8- Add the actual Company Name to each Trainee record that they are associated with in each of the three Trainee tables that you just created in Q5.

9- Make the CompanyName field in the three Trainee Tables that you created in Q5 all required fields.

10- Delete any records from the three Trainee Tables that you created in Q5 that do not have permanent phone numbers listed.

11- List all data from each of the three Trainee Tables that you created in Q5.

12- The three Trainee Tables that you created in Q5 are no longer needed, so you may delete all thee of them at this point.

13- List the Apartment Building name and the number of apartments in each building that are available to be rented.

14- Create an address listing of all Employers and all Apartment Buildings. The new headings to be displayed are: (ID, Name, Street, City, State, Zipcode, Phone)

15- List the Building Name, Apartment Number, Apartment Type and Floor for any Apartments that have never been rented out. Sort the information by Building Name and then by Apartment Number both ascending.

16- List all of the Trainee's Name, City, State and Phone Number from the Trainee table for any pair of Trainees who live in the same city and state and worked for the same companies. Note: Only list the city and state once.

17- List the Building Name listed as "Building", AptNumber listed as "Apartment", the AptFloor the apartment is on listed as "Floor", the ApartmentType listed as "Apartment Style" and the PricePerNight listed as "Nightly Charge".

18- List the Trainee's First and Last name as "Full Name", the BuildingName, AptNumber, ApartmentType, PricePerNight, CheckInDate, CheckOutDate, "Number of Days Stayed" (Calculated Field), along with the total charge amount for their stay (calculated field, which includes the 8% tax and the ContractDiscount which should be discounted first) listed as "Total Charge".

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

Explain how technology has changed the learning environment.

Answered: 1 week ago