Week One Assignments Due Week Two
Introduction to Database Systems
Homework 1
Exercises: due Tuesday , Jan. 13 at the beginning of class.
Homework will be marked 1/2 off if turned in late. No points given after I talk
about it in class. Turn in whatever you've managed to finish, on time!
1. (15 points) A Candy Bar has a filling and a coating. The filling
consists of one or more ingredients, as does the coating. For example,
an Almond Joy candy bar has a filling of almonds and coconut, and a coating
of chocolate; a Payday candy bar has a nougat filling with a coating of
caramel and peanuts. A Candy Bar can come in different sizes, for example, .75
oz. and 1.3 oz. A Candy Bar can be packaged different ways. For example, a
Heath bar might come with a single 1.3 oz piece in a package, or with two .75 oz
pieces in a package. However, for a given package type, all the pieces in it will
have the same size. Each different packaging has a suggested retail price.
Draw an E-R diagram to represent information about Candy Bars.
2. (10 points) Section 2.8 describes two sub-entity types of the entity
account, namely savings-account and checking-account. The semantics
given is
that every account is either a savings or a checking account. Consider a
more
general semantics where:
An entity in the supertype need not be a member of any subtype, and
An entity in the supertype can be a member of more than one subtype.
For the account example, the more general semantics would mean that an
account need not be either a savings account or a checking account, and that some
accounts could be both checking and savings accounts.
Compare the two approaches for mapping an entity hierarchy to tables as
given on page 43 as to how well they could handle hierarchies with this more
general semantics.
UNIX Potluck Assignment One
Basic
- What sorts of things do operating systems do?
- Use "ls" with different flags (singly and in combination) and report on the results.
- Using the "man" pages and some experimenting, report on three "obscure" commands.
- Create a file that contains a list of all of your files without going into a text editor.
- Using "script" command to record what you did, create a directory for this course and
start at least two "minimum subset" files using emacs or vi. Change the names of the files
and the directories to something else.
- Using the "man" pages for help change the format of the "date" command output.
Super User
Using the at command, send me (dschuler@elwha) a message at 6:00 on Thursday,
January 8th, or Tuesday January 13th.
Wizard
- Make a script that asks for sender address and letter body, then sends it.
- Write a program that intercepts mail messages before they are put on the queue and
saves some pertinent information from the messge in a file.
|