Question

Add a Staff table to the database with the following columns

Query1: Add a Staff table to the database with the following columns: staff_id, staff_first, staff_last, staff_phone, staff_position, hotel_id. hotel_id should be designated as a foreign key referencing the hotel table. Hint: use integer as the data type for hotelno. Make sure to designate the primary key.

Query 2: Add a column to the appropriate table to record the state the hotel is in.

Query 3: change the name of the Holiday Inn in Tulsa to Holiday Inn Supreme

query 4: delete room 212 in hotel 1 from the database

booking
hotelNo guestNo dateFrom dateTo roomNo
1 1 2/28/2015 3/1/2015 101
1 2 3/5/2015 3/7/2015 206
1 2 3/10/2015 3/15/2015 206
1 2 3/4/2016 3/6/2016 206
1 2 3/9/2016 3/14/2016 206
1 6 2/4/2015 2/6/2015 500
1 7 2/3/2015 2/8/2015 206
1 7 4/1/2015 4/4/2015 212
1 8 2/1/2015 2/7/2015 200
1 9 2/1/2015 2/6/2015 101
2 3 3/22/2016 3/25/2016 410
2 4 2/6/2015 2/10/2015 411
2 8 4/1/2016 4/4/2016 200
2 8 4/15/2016 4/18/2016 200
2 9 2/5/2015 2/6/2015 412
3 1 3/13/2016 3/15/2016 212
3 3 1/31/2014 2/4/2014 308
3 3 3/26/2016 3/31/2016 210
3 4 3/11/2016 3/15/2016 214
3 7 2/3/2015 2/4/2015 212
3 7 2/5/2015 2/8/2015 308
4 9 4/15/2016 4/18/2016 321
4 10 3/12/2014 3/13/2014 312
4 10 2/22/2015 2/24/2015 312
5 2 5/18/2015 5/23/2015 219
5 11 5/11/2014 5/12/2014 308
6 9 8/3/2016 8/4/2016 401
6 10 8/9/2014 8/10/2014 222
6 10 9/8/2015 9/15/2015 401
6 11 5/31/2014 6/4/2014 222
6 12 7/3/2016 7/5/2016 222
guest
guestNo guestFirst guestLast guestStreet guestCity guestState guestPhone guestEmail
1 Robert Croft 123 main Boise ID (208) 564-1456 [email protected]
2 Howard Smith 234 main Tulsa OK (405) 744-1144 [email protected]
3 Mike Rose 345 main Hays KS (785) 624-5511 [email protected]
4 Matt Smith 234 main Monroe LA (318) 597-8417 [email protected]
5 Jennifer Bratton 2526 Chatham Way Stillwater OK (405) 777-5413 [email protected]
6 Bryan Hedrick 35 West Liberty Meridian ID (208) 555-3262 [email protected]
7 Raj Ramanathan 145 E. Highland Fargo ND (210) 555-7487 [email protected]
8 Marie James 35 N. Perkins Road Kansas City KS (913) 732-5541 [email protected]
9 Tony Chang 2545 Brighton Lane Shreveport LA (318) 267-4419 [email protected]
10 John Jones 345 Apple St Boise ID (208) 662-4517 [email protected]
11 Jason Williamson 1123 15th Street Stillwater OK (405) 238-5959 [email protected]
12 Martin Johnson 3478 Trenton St. Ruston LA (318) 233-9084 [email protected]
13 Susan Ellis 1211 West Oak Oklahoma City OK (405) 332-1167 [email protected]
hotel
hotelNo hotelName hotelCity hotelPhone
1 Holiday Inn Tulsa (405) 741-5555
2 Hampton Inn Stillwater (405) 874-9963
3 Atherton Stillwater (405) 365-4412
4 Marriott-OKC Oklahoma City (405) 774-8514
5 Marriott-Tulsa Tulsa (405) 714-5562
6 Hyatt Oklahoma City (405) 732-5412
room
roomNo hotelNo type price
101 1 single 90
123 6 double 125
200 1 double 120
200 2 double 160
206 1 double 120
210 3 double 150
210 6 single 100
212 1 family 160
212 3 single 100
212 4 single 200
214 3 double 160
219 5 single 130
222 6 single 100
308 3 single 100
308 5 double 160
312 4 single 200
315 4 double 225
321 4 single 190
333 1 single 95
401 6 single 100
410 2 family 175
411 2 family 180
412 2 family 175
421 5 single 130
500 1 single 100
521 5 single 130
999 1 family 160
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Query 1:-

CREATE TABLE Staff (
    staff_id int NOT NULL PRIMARY KEY,
    staff_first varchar(255) ,
    staff_last varchar(255),
    staff_phone int, staff_position int, hotel_id int,

hotel_id int FOREIGN KEY REFERENCES hotel (hotel_id )

);

Query 3:-

Update hotel set hotelName= 'Holiday Inn Supreme' where hotelName='Holiday Inn' and hotelCity='Tulsa'

Query 4:-

delete from room where roomNo=212 and hotelNo=1

Add a comment
Know the answer?
Add Answer to:
Add a Staff table to the database with the following columns
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Required: In the partial database given below, indicate the table name(s) that are linked with the...

    Required: In the partial database given below, indicate the table name(s) that are linked with the listed tables. If more than one table is applicable, select the option that contains multiple tables. Author Table Author ID Last Name AU-1 Adams AU-2 Brown AU-3 Davis AU-4 Newport AU-5 Pham AU-6 Sviokla First Name Eric Jennifer Keith Kevin John Julia Email [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] Phone Number (714) 833-2419 (619) 596-0012 (212) 342-5680 (301) 947-7741 (617) 645-3647 (805) 498-1688 Book...

  • 2. The following table displays data on Italy. Prices are in trillion USD $. year Nominal...

    2. The following table displays data on Italy. Prices are in trillion USD $. year Nominal GDP Real GDP (in 2010 USD) GDP deflator 2012 2.087 100 2013 2.141 2.047 2014 2.047 105.5 2015 1.836 89 2016 2.089 89.8 1. 1. Fill in the missing values 2. Calculate GDP growth between 2012 and 2013 (use real GDP). Did Italy’s GDP grow or contract? 3. Calculate GDP growth between 2013 and 2014 4. Calculate inflation rate between 2013 and 2014 5....

  • Suppose we have the following annual sales data for an automobile dealership: Year                Sales             &n

    Suppose we have the following annual sales data for an automobile dealership: Year                Sales                Trend 2009                121                     1 2010                187                     2 2011                165                     3 2012                134                     4 2013                155                     5 2014                167                     6 2015                200                     7 2016                206                     8 2017                221                    9 2018                231                 10 We want to forecast sales for 2019 and 2020 using either a simple trend model or a quadratic trend model. Use a within sample forecasting technique...

  • For Stillwater Sports, assume a December 31 year end, and make the appropriate journal entries. If...

    For Stillwater Sports, assume a December 31 year end, and make the appropriate journal entries. If a reversing entry is required, please record it with a January 1 date. 1. Stillwater paid $2,400 for a two-year insurance policy on April 1 and recorded it as a debit to an asset account. 2. Stillwater leased a portion of its building to a fitness instructor and collected $12,000 in advance rent on August 1. The lease is for one year. Stillwater's bookkeeper...

  • Please show on Excel For Stillwater Sports, assume a December 31 year end, and make the...

    Please show on Excel For Stillwater Sports, assume a December 31 year end, and make the appropriate journal entries. If a reversing entry is required, please record it with a January 1 date. 1. Stillwater paid $2,400 for a two-year insurance policy on April 1 and recorded it as a debit to an asset account. 2. Stillwater leased a portion of its building to a fitness instructor and collected $12,000 in advance rent on August 1. The lease is for...

  • 1. The following production table shows the amount of output (a) that can be produced with...

    1. The following production table shows the amount of output (a) that can be produced with various combinations of labor (L) and capital K 10 158 223 274 316 354 387 418 447 474 500 9 150 212 260 300 335 367 397 424 450 474 8 141 200 245 283 316 346 374 400 424 447 7 132 187 229 264 296 324 350 374 397 418 6 122 173 212 245 274 300 324 346 367 387 5...

  • Question #6 Sales are $2.6 million in 2014, $2.7 million in 2015, and $2.5 million in...

    Question #6 Sales are $2.6 million in 2014, $2.7 million in 2015, and $2.5 million in 2016. What is the percentage change from 2014 to 2015? What is the percentage change from 2015 to 2016? Be sure to show your calculation and indicate whether the percentage change is an increase or a decrease. Question #7 If sales are $1,150,000 in 2016 and this represents a l 5% increase over sales in 2015, what were sales in 201 5? (show your...

  • estion 15 ut yet swered arked out of 2.00 100 1 P Flag question 413 The...

    estion 15 ut yet swered arked out of 2.00 100 1 P Flag question 413 The table shows the cost information for a farm when the farm has three different amounts of land: one field, two fields, or three fields In the long run, if the farmer is producing 12 units, what would be their average total cost? Q TC(1) ATC(0) Q TC(2) ATC2) 0 Q TC(3) ATC(3) 0 200 0 300 104 1040 202 202.0 1 301 2 3010...

  • S18-1 Horizontal analysis McCormick Ltd reported the following on its comparative income statement: 2014 2016 2015...

    S18-1 Horizontal analysis McCormick Ltd reported the following on its comparative income statement: 2014 2016 2015 (In millions) $8 975 5 900 $9 300 $9 575 6 000 Revenue Cost of sales 5 975 Requirement Prepare a horizontal analysis of revenues and gross profit-both in dollar amounts and in percentages-for 2016 and 2015.

  • a potential buyer wants to know about the biggest average increase in share price year on year. what was the increase i...

    a potential buyer wants to know about the biggest average increase in share price year on year. what was the increase in profit during that period? Operating Performance 8 Revenue (Un EBillions) 7 6.12 6.17 6 4.98 447 4 3 Net Profit (In EBllons 2 1.97 1.35 1.42 1.11 0 2014 2015 2016 2013 0 2014 2015 2016 2017 Average Share Price E7 EO.8 Profits Per Share E6.12 ES.64 E6 ES.27 E0.7 E0.66 E4.91 ES c0.6 EO.47 EO.45 E4 E0.5...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT