Advertisement
mauza

Untitled

Mar 21st, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. Question #9 - 25 points
  2.  
  3. Create table(s) to support collecting data for the following scenario:
  4. We need to collect some key information about campgrounds in
  5. national parks. Each campground has a set number of camp spots,
  6. some that support accessibility needs, others that do not. A national
  7. park may have multiple campgrounds (think Yellowstone). Each national
  8. park has a point of contact (first name, last name, email, phone). The
  9. same person can be responsible for multiple parks.
  10.  
  11. Provide statements to create the tables you think meet the above need. As
  12. before, preface each table name with your first initial and full last name.
  13. */
  14. CREATE TABLE cmauNationalParks
  15. (
  16. ParkID int IDENTITY (1,1) NOT NULL,
  17. ParkName varchar(255) NULL
  18. )
  19.  
  20. CREATE TABLE cmauCampgrounds
  21. (
  22. CampgroundID int IDENTITY (1,1) NOT NULL,
  23. ParkID int references cmauNationalParks(ParkID),
  24. CamgroundName varchar(255) NULL,
  25. TotalCampgrounds int NULL
  26. )
  27.  
  28. CREATE TABLE cmauContacts
  29. (
  30. ContactID int IDENTITY (1,1) NOT NULL,
  31. FirstName varchar(255) NULL,
  32. LastName varchar(255) NULL,
  33. email varchar(255) NULL,
  34. phone varchar(255) NULL
  35. )
  36.  
  37. CREATE TABLE cmauCampgroundAssignments
  38. (
  39. ContactID int references cmauContacts(ContactID),
  40. CampgroundID int references cmauCampgrounds(CampgroundI)
  41. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement