RAJARATA UNIVERSITY OF SRI LANKA
FACULTY OF APPLIED SCIENCE
COM 1302 Database Management System
Design Project
Purpose: To give you experience with designing and implementing a database to
model a real domain
Due: Various milestones are there. Due dates will be noticed
The project is intentionally open-ended. It consists of the following three milestones
1. Choose a mini-world of your interest. Identify a set of requirements for a
ctitious software system appropriate to this selected mini-world. You may
choose an appropriate subset of a large real-world instance as well. Still,
your domain must not be the same as those we use as examples in class
– speci cally the university (from the Database Systems Concepts book)
and the library (from lectures) domains. See the “Choosing an Appropriate
mini-world” discussion below for further details
2. Draw an E-R diagram for a database that models your mini-world
3. Map the E-R diagram into a normalized relational database design for the
selected real-world – that is, a set of tables, each with appropriate
attributes, a primary key, and relevant constraints and foreign keys. Your
relational database must be in BCNF form
fi
fi
Implement your design as follows,
1.Create a le of SQL CREATE statements to build your database
schema. These statements should create all the relations/tables, named
constraints, triggers, and views as appropriate
2.Create your database under your username as a schema in the design
database on the server.
3.Populate the database with sample data to test the schema and the
different transactions supported by your proposed software system. Each table
must contain a minimum of ve rows of data
4.Write SQL SELECT, INSERT, UPDATE, and DELETE statements that
match the functionality of your software system’s requirements
5.Test your SQL statements and constraints using your sample data. The
tests should handle the “good” data and accurately identify various kinds of
invalid insert, update, and delete operations caused by “bad” data.
Note: the comprehensiveness of your tests will be a factor in your
grade for this part of the project
Milestone
The project has to be submitted in three separate milestones. After turning in a
milestone, you have the opportunity to alter your approach and design for the rest of
the project as required based on the feedback you get. In that case, you do not need
to redo the previous milestone(s) unless you change your entire project domain.
Once you met the nal milestone, the project will be graded considering all three
milestones collectively, but with particular emphasis given to the third one
On the due date of each milestone, you are required to present your work orally to
your classmates. For the rst milestone, we will be discussing the next part of the
project - e.g., what might be appropriate entities and relationships for modeling your
fi
s
fi
fi
fi
.
domain. We may also have a similar but briefer class discussion when second
milestones are presented
To facilitate oral presentation and discussion, you should prepare appropriate
material for projection and handouts
You will need to submit the following at each milestone
Milestone I – Mini-world and System Requirements Speci catio
• A description of the problem domain (written using terminology that a system
user would use, not technical database terminology)
• A statement of requirements should take the form of an overall use case
diagram with an explanation
Milestone II - E-R Diagra
• An E-R diagram for the proposed database, including attributes for entities and
relationships
Milestone III - Relational Database Design, Implementation, Sample Data, and
Test
o Prepare a list of the functional and multivalued dependencies for your
schema
o Prepare a schema diagram for your database, with primary and foreign keys
speci ed appropriately
o Prepare a le containing working SQL statements to create the objects in
your database
s
fi
.
fi
.
fi
n
o Prepare a le containing working SQL statements corresponding to each of
the identi ed system requirements. The SQL statements should require
various SQL capabilities, such as different kinds of join, aggregate
functions, etc. (This presupposes an excellent initial domain choice.
o Documentation of testin
o You must test each of your SQL statements. Testing should be related
to the requirements of the speci ed system- that is, tests should
address each of the identi ed requirements (or a subset if there
are many)
o You must test each of your triggers
• You must test all the constraints, af rm that they correctly detect errors whil
• allowing legitimate data. (Note: you do not need to test NOT NULL
constraints.
• You must have a le/ les containing the results of these tests. Make
sure to include (SQL
ocomments indicating the requirement each test is exercising and
the expected result. (i.e. good data or a speci c problem you are catching with
incorrect data)
Selecting the mini-worl
The selected mini-world should possess the following characteristics
1. An appropriately sized domain will result in a database having about a dozen
tables
2. The entities involving your mini-world should be interrelated
3. Your schema should include attributes that make it possible to have some
transactions that involve aggregate functions. (For example, the schema
developed above would allow for queries to calculate the enrollment in
each section, the average enrollment in courses for a given department,
.
fi
.
fi
)
fi
)
fi
g
fi
fi
.
fi
fi
.
the total number of courses being taught by each instructor, etc.). Your
schema should also make interesting constraints and triggers possible
Note: Keep the requirements of all milestones in mind when selecting your mini-
world. You want a domain that will lend itself to interesting requirements and tests, as
well as a suitable E-R diagram, schema, and set of dependencies
Example Use case Diagram for Milestone
I