Skip to content
Elizabeth Haynes edited this page Nov 3, 2016 · 3 revisions

#UML Diagram#

The diagram above is a UML Diagram of our database system. We developed this diagram using yUML. The UML code is as follows:

[Park|id:int; name: string; latitude: string; longitude: string; address: string; phone: string; rating: float; website: string; zipcode: string; zipregion: string; photo_url: string; state: State|] [State]++<1-1..*>[Event] [State]++<1-1..*>[Park] [State|name: string; description: string; total_area: string; population: string; highest_point: string|] [Event|idnum: int; orgName: string; latitude: string; longitude: string; topics: string; start_date: string; end_date: string; pic_url: string; contact_phone_num: string; city: string; zipcode: string; zipregion: string; park: Park; state: State|] [Event]++<1..*-1>[Park] [Campground|idnum: int; name: string; description: string; latitude: string; longitude: string; directions: string; phone: string; email: string; zipcode: string; park: Park; state: State|] [State]++<1-1..*>[Campground] [Park]++<1- 1..*>>*> [Campground]

Some fields are Strings that other developers may not expect- for instance, total_area, population, and highestPoint. These fields are strings because the API source, Wikipedia, has these fields with commas, so they are read in as strings. The purpose of the zipregion field is to categorize events and campgrounds with parks, because we found that often, campgrounds were not in the exact same zipcode as the park, but they were close. Storing the zipcodes as strings allowed us to use the first three characters as a region without worrying about a zipcode of "001234" being stored as 1234, and having a region of 1 instead of "001".

Clone this wiki locally