Post-lab Questions 3.2
1. Databases surround us on the web and everyday life. Now that you have a clearer
idea of what database systems do, find two examples of web sites that you believe
are likely to use databases and discuss what kinds of data they might be storing, as
in the example answer.
- Ebay.com - this site may store data about purchases and user accounts.
- Walmart.com - this site may use data tables to keep track of what is purchsed from the site. It can also use tables to manage user acocunts.
2. Identify relationships. Suppose you are creating a database to help a university
keep track of its course offerings. You might have the following entities in your
database, since they are distinct items in real life that are related to each other in
important ways: course, classroom, professor, and department. In the space
below, draw an ER diagram with a box for each of these four entities and arrows
between the boxes labeled with the relationships they denote. (Don’t worry about
what fields each of these entities should have for now.) See the example ER
diagram in your textbook and in Part 1 of this lab.
-
Department----->Course------>Professor-------->Classroom
3. Identify many-to-one relationships. For each of the relationships you diagrammed
above, which ones are many-to-one? Which ones are many-to-many? Indicate
the relationships by writing 1 or at each end of the relationship arrows. If you
are not sure about whether a relationship is one-to-many or many-to-many,
explain why.
-
Department(1)------>Course(Many)------->Professor(Many)------->Classroom(1)
4. Identify entities. Suppose you are creating a database to keep track of a radio
station’s record collection. What are some of the entities your database might
include?
- Currently played records, Rap records, Jazz Records, R&B Records
5. Query results and tables look very similar—like a set of tuples. How are query
results and tables different, however?
- Queries are the actual instructions for constructing a table.
The tables hold the information.