Vous êtes sur la page 1sur 5

CS 122A Course Assignment 1

Winter 2016

While working on your CS122A course assignments you will gain experience in database modeling, design,
loading, querying and updates. You are required to work on this assignment in teams of three.

Problem 1
Please answer the following multiple choice questions:
1) Relationship cardinalities:
A. Constrain the number of objects that participate in a relationship
B. Are shown for both directions of a relationship
C. Indicate whether a relationship is mandatory or optional
D. All of the above
The Hollywood studio BestFlick wants to have a database designed to have access to the following information
about all the movies it ever produced: title, year released, director, actors, stuntmen, "Oscars" awarded. A
movie has only one director. In this description, the gender is irrelevant. "Actor", "director", "stuntman" can be
male or female. "Oscar for best acting" refers to an Oscar for best actor or best actress and also includes best
supporting actor or actress.
2) You would show director OF movie by a:
A. 1-1 relationship
B. 1-M relationship

C. M-N relationship
D. Ternary relationship

3) You would show actor starring IN movie as a:


A. 1-1 relationship
B. 1-M relationship

C. M-N relationship
D. Ternary relationship

4) Oscar for best director should be:


A. An attribute of movie
B. A 1-1 relationship between movie and director
C. A 1-N relationship between movie and director
D. An M-N relationship between movie and director
5) Oscar for best acting would be an attribute of:
A. Movie
B. Actor

C. Director
D. A relationship "Starring-in" between Movie and Actor

Problem 2
1 Goal
In this first step you will create a detailed description of a target application and create an entity-relationship
model (E-R diagram) to describe the data for the application. To get you started, we are providing you with a
sketch of the application that you will be working on, your job in this is to add more specifics and to develop its
E-R model. Creativity is permitted (encouraged!). To make the assignment more interesting, weve intentionally
left aspects of the application vague.

2 High Level Application Description


In this assignment, you are to design and create a database to support awareness applications on sensors- it
will be clear momentarily what we mean by awareness applications.
Over the past decade, sensing and data capture technologies have significantly advanced and such advances
coupled with mechanisms for low-power wireless networking can be used to create deeply
instrumented physical spaces. Such physical spaces may be shopping malls, office buildings, airports, critical
infrastructures, electric grid, water distribution systems, hospitals, etc. Sensors and other data capture
devices embedded into the physical spaces has the potential to capture the state of the evolving physical
systems and processes creating situational awareness of the activities in the instrumented space. Situational
awareness, in a broad sense, refers to a continuum of knowledge that captures the current state of the
physical environments being observed, to future projected states of these observed environments. Such
situational awareness offers opportunities to realizing new functionalities and/or bringing transformational
improvements in many application domains.
In this project, we will consider a specific physical space that is being monitored through variety of sensors
viz., Bren Hall. As you walk through Bren Hall, along its corridors, if you glance at the ceiling you will notice a
variety of cameras installed into the camera domes. In addition, Bren Hall has been further instrumented
through variety of other types of sensors including RFID, temperature sensors, light sensors, acoustic sensors,
etc. All these sensors taken together form what we refer to as the I-Sensorium test-bed. The I-sensorium
testbed continuously collects and stores streams of raw data from these sensors. We will refer to the
collected data as observations. The I-sensorium software suite also contains Android and Iphone apps that
enable these mobile devices to function as sensors. In particular, if a user downloads the app to their cell
phone and registers with I-Sensorium, the cell phone will be integrated into the I-sensorium and data such as
location (detected through a combination of GPS technologies as well as WiFi triangulation
technologies) would be transmitted from the participating cell phone to the I-sensorium server. Smart
phones are a perfect example of mobile sensor platforms that host multiple sensors (GPS, camera, ) on a
single devices. The final goal of I-sensorium is the detection of the events happening in the physical space.
The events can range from monitoring the temperature in the rooms, to understanding everyday human activity
and social relations. Your goal in this assignment is to design and create a database that can store
sensor-based observations and support applications on top of such observations.

In particular, the database will need to store all the necessary information about sensors. For simplicity, we will
assume that every sensor can be one of the three types of sensors: image sensor, temperature sensor or GPS
sensor. While the sensors are active, they collect observations that they store in the database along with a
timestamp, that tells us when the observation was created. Every sensor type generates a different type of
observations. Image sensors collect raw images, temperature sensors collect raw temperature and GPS
sensors collect raw GPS coordinates, i.e. latitude and longitude. Each observation type differs considerably
from the others. Raw temperatures are numbers, while images are chunks of binary data. Thus, storing all
types of observation into a single table is a bad design decision. Except for the distinction of sensors into
image, temperature or GPS sensors, a sensor can also be classified as being a location sensor. GPS sensors
are an example of location sensors, but using the right software multiple other sensor types could serve the
role of a location sensor (for instance, if we could write code to determine from the image the location of the
camera taking the picture, the image sensor could also play the role of a location sensor).
As described earlier, mobile phones are an example of sensor platforms. A sensor platform has at least one
sensor connected to it. Sensor platforms can be fixed or mobile. Every mobile platform has a location sensor
attached to it. On the other hand, fixed platforms are positioned at a specific location object. Location object is
the term that we use to describe meaningful parts of the physical space. For example, when modeling a
building, a location object can be a room or a corridor. A room can be an office, a meeting room or both. Every
room has a room number and a maximum capacity of persons that it can have. A room might be assigned to
one or more persons for use. Except for location objects that are described above, all other location objects fall
into the category of open areas that can be used to describe parts of a building (e.g., a lounge). Sometimes we
refer to a location object by a name, to make our communication easier. In general, location is important for
modeling the physical space. For simplicity assume that a location is a two-dimensional coordinate where x, y
can range from 0 to 1000. Every location object will have a bounding box associated with it. A bounding box is
represented as two points, the lower left and upper right corners. For instance, Toms rooms bounding box
might have lower left corner of (5, 20) and upper right corner of (7, 23). Note that the location (6, 22) is inside
of Toms room, while (4, 23) is outside of it.
Events, in general, are associated with specific activity such as entering, walking, running, bending,
standing, etc.; where the location of the activity; who the persons involved in the activity; and when
the start and end time of the activity. Furthermore, each event has a confidence level associated which
captures how certain the event is. Events can not be detected out of nothing. Every event is derived from a set
of observations, a connection that is important for event analysis. Of course, the same observation could have
been used to derive multiple events.

3 Entity-Relationship Model Requirements


Ideally, we want you to aim to include at least the following in your entity-relationship model:
7 entity sets (each should have at least 1 non-key attribute, and 2 of them should have at least 2
non-key attributes)
Pre-assigned entity sets: you need to include all of the following entity sets in your E-R diagram Sensor, Sensor Platform, Observation, Event, Person, and Location Object. Note that you
may have more entity sets besides these.
1 n:m relationship
3 1:n relationships
1 relationship that itself has 1 or more attributes
1 useful ISA relationship
1 weak entity set
Again, we have only tried to give you a general description of the problem domain above. You are expected to
extend and make meaningful assumptions about the problem to make it richer and then create an appropriate
E-R model, making sure that it meets the minimum requirements that we have listed. We do understand that
the above requirements are not always possible to fulfill and/or meaningful for a particular application, so if you
opt to go with your own application rather than the one we have suggested, your mileage may vary a little. We
strongly suggest fulfilling all of our requirements, but if your design does not meet some of the requirements
above, please be sure to note that fact, explain why, and have a design that is richer in some other ways
instead. (You will still get full credit as long as you convince us that you have nicely solved a design problem of
sufficient complexity.)

Deliverables
1. For Problem 1, only include the question number and answer. (e.g., 1) F 2) E ...)
The filename should be problem1_answer.txt. A plain text file is enough.
2. For Problem 2, please create the following two files.
a. A detailed but concise description of the application's data requirements, including all of your
assumptions and any/all more detailed information about the various data characteristics. Be
sure to clearly identify the real-world objects of interest, their variations, their relationships, their
attributes, their rules and constraints, and so on. This description will serve as the basis for your
E-R design. The file format should be PDF. Put the filename as description.pdf.
b. An Entity-Relationship diagram for your database design along with comments on how/why you
made any particularly interesting design choices when creating the E-R model of your enterprise
based on its description and requirements. To create your E-R diagram, you are free to use
whatever tool you are most comfortable with an E-R modeling tool that you get from the web,
your favorite drawing tool (e.g., Visio, Word, PowerPoint, Dia), or just a neat hand-drawing
(followed by high-quality scanning). Please submit both the enterprise requirements description
and the E-R diagram in .PDF

format. The filename should be erd.pdf.

Submission
Put all of your files (problem1_answer.txt, description.pdf, and erd.pdf) into a .zip archive and upload it to EEE.
Only one member of your team is required to submit the file. And all team members are required to have the
finally submitted file. Be sure to identify all team members in all files (name,
Please use the following naming scheme for your team's zip file submission:

email and student ID).

[last -name -of -member1]_[last -name -of -member2]_[last -name -of -member3]_assignment1.zip
For example if Frederic Chopin, Alberto Eins and Franz Liszt were teammates they would submit:
Chopin_Eins_Liszt_assignment1.zip

The due time is: Friday, Jan 22 (23:45 pm)


Good Luck!

Vous aimerez peut-être aussi