CS377: Database Design - Text and File Management

Activity Goals

The goals of this activity are:
  1. To represent models

The Activity

Directions

Consider the activity models and answer the questions provided. First reflect on these questions on your own briefly, before discussing and comparing your thoughts with your group. Appoint one member of your group to discuss your findings with the class, and the rest of the group should help that member prepare their response. Answer each question individually from the activity on the Class Activity Questions discussion board. After class, think about the questions in the reflective prompt and respond to those individually in your notebook. Report out on areas of disagreement or items for which you and your group identified alternative approaches. Write down and report out questions you encountered along the way for group discussion.

Model 1: A Flat File Structure: GEDCOM

CousinTree kinship

Questions

  1. The GEDCOM file format defines ancestral history. What do you think each of the line headings mean? If you aren't sure, write one down and skip it for now; we'll check the specifications later!
  2. What do you think the numbers mean at the beginning of each line?
  3. What is a "record" in this format? How many different types of records can you find, and how many records of each type are there?
  4. Draw a diagram representing the family depicted by this example.
  5. Could you represent this data in a more friendly way by making "tables" or spreadsheets? Try representing the basic information in Microsoft Excel, using the VLOOKUP function to refer to data across tables.

Model 2: Javascript Object Notation (JSON)

Questions

  1. This JSON result was returned from a web request to https://api.weatherusa.net/v1/forecast?q=40.1915,-75.4559&daily=0&units=e&maxtime=7d, which obtains the 7-day forecast at Ursinus College given the College's latitude and longitude GPS coordinates. Use a JSON Pretty Printer to better format the JSON for reading.
  2. What do the curly braces represent?
  3. What does the square bracket represent?

Embedded Code Environment

You can try out some code examples in this embedded development environment! To share this with someone else, first have one member of your group make a small change to the file, then click "Open in Repl.it". Log into your Repl.it account (or create one if needed), and click the "Share" button at the top right. Note that some embedded Repl.it projects have multiple source files; you can see those by clicking the file icon on the left navigation bar of the embedded code frame. Share the link that opens up with your group members. Remember only to do this for partner/group activities!

Model 3: A Sample JSON Response


{
    "response": {
        "version": "0.1",
        "termsofService": "http://www.wunderground.com/weather/api/d/terms.html",
        "features": {
            "conditions": 1
        }
    },
    "current_observation": {
        "image": {
            "url": "http://icons-ak.wxug.com/graphics/wu2/logo_130x80.png",
            "title": "Weather Underground",
            "link": "http://www.wunderground.com"
        },
        "display_location": {
            "city": "Philadelphia",
            "state": "PA",
            "zip": "19104",
            "latitude": "39.96150970",
            "longitude": "-75.19716644",
            "elevation": "41.00000000"
        },
        "observation_location": {
            "full": "University City - West Philadelphia, Philadelphia, Pennsylvania",
            "city": "University City - West Philadelphia, Philadelphia",
            "state": "Pennsylvania",
            "latitude": "39.950554",
            "longitude": "-75.211868",
            "elevation": "70 ft"
        },
      "temp_f": 76.5,      
    }
}

Questions

  1. What is the path to longitude?
  2. What is the path to temp_f?

Submission

Submit your answers to the questions using the Class Activity Questions discussion board. You may also respond to questions or comments made by others, or ask follow-up questions there. Answer any reflective prompt questions in the Reflective Journal section of your OneNote Classroom personal section.