INFSCI 1022
Database Management Systems
Syllabus: Term Project
The project for this course involves building a simple, single user
relational database in a structural programming language, such as
C or Pascal.
The database will consist of a collection of routines that will be
accessible through a simple interactive user interface.
The specification of these routines follows below.
You may, although you do not need to, add other features to your database.
Please make sure that you have implemented the required parts first.
The deliverables include the source code in electronic and printed
form and a report describing your system and its capabilities.
The project will be done in groups of normally four students.
The groups will be formed during the first class meeting.
Each group will prepare a written statement listing its members,
the group leader, and the projected responsibilities of each
individual member.
About a week later, the group will submit a written design of the system.
From that point on, the group will proceed with implementation.
Each member of the group carries the responsibility for the success or
failure of the entire group.
Individual group members will have the opportunity to evaluate the
contribution of each of their colleagues in the group to the final result.
To make your project successful, you will have to meet regularly and
coordinate your activities.
The due dates for the project statements and the completion of the
project are listed in the syllabus.
Projects will be demonstrated during one of the last classes.
The best project will be rewarded by a cup of coffee (if you do
not drink coffee, a cup of tea, a Coke, or equivalent) and a doughnut
for each member of the group and an accompanying certificate.
Project Specification:
The following functions have to be included in your database:
- Operations on relations
- The database contains a currency register that points to one
relation in the database that is considered to be current.
This is useful in operations on tuples and allows a user to omit
references to a relation (all operations refer to the current relation).
There is no current relation when the database is started.
- CREATE relation-name
- Creates a new relation named relation-name.
Prompts the user to interactively input the attribute names and
types of the created relation.
Attributes specified by the user may contain two indicators:
- An asterisk before the attribute name (e.g., *attribute-name)
denotes that the attribute is the primary key of the relation.
- A hash followed by a relation name and an attribute name
(e.g., #relation-name0:attr-name0) specifies a referential integrity
constraint: the specified relation (relation-name0) and the attribute
name (attr-name0) must exist (i.e., must have been created prior to
creating the current relation).
The relation relation-name becomes current.
- DELETE relation-name
- Deletes the relation named relation-name from the database.
This operation does not affect the contents of the currency register,
unless relation-name was current, in which case there is no current
relation after performing delete.
- CURRENT relation-name
- Makes the relation named "relation-name" current.
- Operation on tuples
- Similarly to the currency pointer for the relations, there is a
currency pointer for the current tuple in each of the relations.
This is useful in operations on tuples such as display.
There is no current tuple when a relation is created.
- insert
- Prompts the user to enter values of the attributes of the current
relation and inserts the complete tuple into the current relation.
- first
- Makes the first tuple in a given relation the current tuple.
- next
- Makes the tuple that is next after the current tuple the current tuple.
- previous
- Makes the tuple that is right before the current tuple the current tuple.
- last
- Makes the last tuple in a given relation the current tuple.
- remove
- Removes the current tuple from the current relation.
- modify
- Prompts the user interactively to modify the values of the attributes
of the current relation and replaces the original tuple with the modified
tuple in the current relation.
- Input-output
-
- read file-name
- Reads the tuples of the current relation from a disk file rather
than interactively from a keyboard.
- write file-name
- Writes all tuples of the current relation to a disk file.
- Querying
-
- SELECT attr-name1 operator attr-name2|constant
from relation-name1 giving relation-name2
- Creates a new relation relation-name2 consisting of tuples from
relation-name1 that satisfy the condition attr-name1 operator
attr-name2|constant (e.g., name="Smith") (this is a regular relational
select operation).
Relation-name2 becomes current.
- project relation-name1 on attr-name1 attr-name2 ...
giving relation-name2
- Creates a new relation relation-name2 consisting of the attributes
attr-name1 attr-name2 of all tuples of the relation relation-name1
(this is a regular relational project operation).
relation-name2 becomes current.
- join relation-name1 relation-name2
where attr-name1 =attr-name2 ... giving relation-name3
- Creates a new relation relation-name3 consisting of tuples from
relation-name1 and relation-name2 such that their attribute values
specified are equal (this is a regular relational equijoin operation).
relation-name3 becomes current.
Evaluation criteria:
Your database has to be functional - this is a necessary condition
for completing the project.
Your project will be judged on the software design methodology
(e.g., data organization and structure, whether you used indexing
or any efficient access mechanism), the flexibility of your database
(e.g., limitations on the number of attributes each relation can have,
robustness to the input format), clarity of the messages
generated by your system (including error messages),
maintenance of integrity constraints, on-line help provided to the
user, and the manual that you will provide with your database.
Back to the table of contents
INFSCI 1022 main page
Marek Druzdzel's teaching page
Marek Druzdzel's home page
marek@sis.pitt.edu /
Last update: 16 May 1995