Download Blank window box - VLE

Transcript
Chapter 4
Design
4.1
Introduction
This chapter is divided into two main sections. The first section is about the design of the
database application and this will be illustrated through an entity relationship diagram and
normalisation. The second section is about the design of the website.
4.2
Database
A number of different data modeling techniques were used to obtain the structure of the
database application. An entity relationship diagram, which is a graphical representation of
the relationships between the entities in the database, this was used to obtain an overall
structure of the application. Normalisation was then used to ensure that the structure of the
database was accurate by ensuring that there were no data duplication issues.
4.2.1
Entity Relationship Diagram
An entity relational diagram contains three key elements, entities, attributes and
relationships. An entity is defined as something “in the real world with an independent
existence” [23], this can be either something physical or conceptual. Whereas an attribute has
“properties that describes the entities characteristics” [23], for example the properties for the
entity Member could be FirstName, Postcode and Email. Finally, entities can be associated
with each other via a certain type of relationship. These relationships are split into three
types, one-to-one, one-to-many and many-to-many.
A one-to-one relationship is when a single entity is related to another single entity, for
example no member has more than one login username and no username is used by more than
one member. A one-to-many relationship is when a single entity is related to many instances
of another entity, for example a member has many DVD’s on loan, but a DVD can only be
loaned to one member at a time. Finally, a many-to-many relationship is when many
instances of an entity are related to many instances of another entity, for example a DVD title
can have more than one category, and that category can be used by many DVD titles.
16