Chapter 03 Use It
Q1
The following three tables make up a simple reservation system for a small campground. The database should allow for a camper to make multiple reservations for future dates and for a camping spot to have several reservations for upcoming visits.
Table: Camper
| CAMPER_LAST_NAME | CAMPER_FIRST_NAME | CAMPER_ADDRESS | CAMPER_CITY | CAMPER_STATE | CAMPER_ZIP_CODE | CAMPER_DRIVERS_LICENSE | CAMPER_EMAIL | |
| 1000 | Jones | Jamie | 1278 Essex Pl | Birmingham | AL | 45251 | JJ998743-98 | jjones@somewhere.com |
| 1001 | Schmidt | Pat | 4954 Spangled Way | El Paso | TX | 79919 | 87632434 | patwonderfu34l@nowhere.net |
| 1002 | Williams | Clifford | 956 Segull Lane | Portland | ME | 4108 | WIL885123 | williams98342@foomail.com |
| 1003 | Cooper | Amanda | P. O. Box 998877 | Portsmouth | OH | 45662 | 765A876B897 | coopera@nowhere.net |
Table: Spot
| SPOT_NUMBER | SPOT_NAME | SPOT_LENGTH | SPOT_PULLTHRU | SPOT_ELECTRIC_AMPS | SPOT_WATER | SPOT_SEWER | SPOT_RATE_WEEKDAY | SPOT_RATE_WEEKEND |
| 101 | The Pines | 55 | 1 | 50 | 1 | 1 | 35 | 42 |
| 102 | The Glade | 50 | 0 | 50 | 1 | 1 | 33 | 42 |
| 103 | Teardrop Spot | 20 | 0 | 20 | 1 | 0 | 15 | 22 |
| 104 | Tent In Trees | 0 | 0 | 0 | 1 | 0 | 12 | 15 |
Table: Reservation
| RESV_NUMBER | RESV_DATE | RESV_NIGHTS | SPOT_NUMBER | RESV_RATE | RESV_DEPOSIT | |
| 1 | 2015-05-15 | 2 | 101 | 1002 | 84 | 20 |
| 2 | 2015-05-14 | 4 | 103 | 1000 | 150 | 25 |
| 3 | 2015-05-14 | 4 | 104 | 1001 | 24 | 24 |
| 4 | 2015-05-20 | 1 | 101 | 1002 | 35 | 10 |
| 5 | 2016-06-01 | 2 | 101 | 1002 | 85 | 0 |
Add the ends to the relations on the Crows Foot ERD for the campground reservation system.

Q2
The following three tables make up a simple reservation system for a small campground. The database should allow for a camper to make multiple reservations for future dates and for a camping spot to have several reservations for upcoming visits.
Table: Camper
| CAMPER_LAST_NAME | CAMPER_FIRST_NAME | CAMPER_ADDRESS | CAMPER_CITY | CAMPER_STATE | CAMPER_ZIP_CODE | CAMPER_DRIVERS_LICENSE | CAMPER_EMAIL | |
| 1000 | Jones | Jamie | 1278 Essex Pl | Birmingham | AL | 45251 | JJ998743-98 | jjones@somewhere.com |
| 1001 | Schmidt | Pat | 4954 Spangled Way | El Paso | TX | 79919 | 87632434 | patwonderfu34l@nowhere.net |
| 1002 | Williams | Clifford | 956 Segull Lane | Portland | ME | 4108 | WIL885123 | williams98342@foomail.com |
| 1003 | Cooper | Amanda | P. O. Box 998877 | Portsmouth | OH | 45662 | 765A876B897 | coopera@nowhere.net |
Table: Spot
| SPOT_NUMBER | SPOT_NAME | SPOT_LENGTH | SPOT_PULLTHRU | SPOT_ELECTRIC_AMPS | SPOT_WATER | SPOT_SEWER | SPOT_RATE_WEEKDAY | SPOT_RATE_WEEKEND |
| 101 | The Pines | 55 | 1 | 50 | 1 | 1 | 35 | 42 |
| 102 | The Glade | 50 | 0 | 50 | 1 | 1 | 33 | 42 |
| 103 | Teardrop Spot | 20 | 0 | 20 | 1 | 0 | 15 | 22 |
| 104 | Tent In Trees | 0 | 0 | 0 | 1 | 0 | 12 | 15 |
Table: Reservation
| RESV_NUMBER | RESV_DATE | RESV_NIGHTS | SPOT_NUMBER | RESV_RATE | RESV_DEPOSIT | |
| 1 | 2015-05-15 | 2 | 101 | 1002 | 84 | 20 |
| 2 | 2015-05-14 | 4 | 103 | 1000 | 150 | 25 |
| 3 | 2015-05-14 | 4 | 104 | 1001 | 24 | 24 |
| 4 | 2015-05-20 | 1 | 101 | 1002 | 35 | 10 |
| 5 | 2016-06-01 | 2 | 101 | 1002 | 85 | 0 |
Identify the primary keys and foreign keys in the three tables by dropping the correct column name or names into the table. If there is no primary or foreign key then drop none as your answer.

