Вы находитесь на странице: 1из 37

SYSTEM DESIGN

Chapter 5 System Design

SYSTEM DESIGN
5.1 Data Flow Diagram
A data flow diagram (DFD) is a graphical representation of the "flow" of data through an
information system, modelling its process aspects. A DFD is often used as a preliminary
step to create an overview of the system without going into great detail, which can later be
elaborated.[2] DFDs can also be used for the visualization of data processing (structured
design).

DFD is also called bubble chart.

It can also represent system at any level of abstraction, so DFD can be partitioned into levels.

Level '0' DFD depicts the basic function of system, main input and outputs. A level '1' DFD
can be used to go to a detail of a specific function. A DFD shows what kind of information
will be input to and output from the system, how the data will advance through the system,
and where the data will be stored. It does not show information about the timing of process
or information about whether processes will operate in sequence or in parallel unlike
a flowchart which also shows this information.

There are different notations to draw data flow diagrams (Yourdon & Coad
and Gane & Sarson), defining different visual representations for processes, data stores,
data flow, and external entities.

5.1.1 DFD Symbols


In the DFD, there are four symbols

1. A square defines a source(originator) or destination of system data


2. An arrow identifies data flow. It is the pipeline through which the information flows
3. A circle or a bubble represents a process that transforms incoming data flow into
outgoing data flows.
4. An open rectangle/Container is a data store, a temporary repository of data.

Learning Management System For UST Bannu 17


Chapter 5 System Design

Process that transforms data flow.

Source or Destination of data

Data flow

Data Store

Figure 5.1 DFD Symbols

5.1.2 Constructing a DFD


Several rules of thumb are used in drawing DFDs:

1. Process should be named and numbered for an easy reference. Each name should be
representative of the process.
2. The direction of flow is from top to bottom and from left to right. Data traditionally
flow from source to the destination although they may flow back to the source. One
way to indicate this is to draw long flow line back to a source. An alternative way is to
repeat the source symbol as a destination.
3. When a process is exploded into lower level details, they are numbered.
4. The names of data stores and destinations are written in capital letters. Process and
dataflow names have the first letter of each work capitalized.

Learning Management System For UST Bannu 18


Chapter 5 System Design

Figure 5.2 Registration DFD

User need to get registered on the system. Registration is possible for three type of users:
Teacher, student and guardian. User cannot register himself /herself as admin. Only an
Admin has the authority to add another admin.

After registration, a user need to get verified by an admin. Only then he can enter into the
system.

Learning Management System For UST Bannu 19


Chapter 5 System Design

Figure 5.3 Login DFD

A user can login to the system and use the system within his/her type privileges.

Learning Management System For UST Bannu 20


Chapter 5 System Design

Figure 5.4 Quiz DFD

Firstly, a teacher is required to create a quiz. Students are only able to take the quiz after the
teacher start the quiz. Once a quiz time is over, the system automatically generates the result.
The generated result can be seen on screen by the student just after the quiz and also stores
in data store. System give no marks to students who failed to appear for the quiz.

Learning Management System For UST Bannu 21


Chapter 5 System Design

Figure 5.5 Attendance DFD

Only teacher has the authority to update attendance of the classes for the subject which
are assigned to him/her. Previous attendance records can be seen by teacher, student and
guardian.

Learning Management System For UST Bannu 22


Chapter 5 System Design

Figure 5.6 Assignment DFD

Teacher post the assignment detail for a specific class and subject. Students of that class and
subject can be able to submit the assignments within due date. Teacher download those
assignments and then give marks accordingly. System give no marks to the students who
failed to submit their assignments within due date.

Learning Management System For UST Bannu 23


Chapter 5 System Design

Figure 5.7 Gradebook DFD

System retrieves assignment, quiz, attendance and presentation marks and then calculate
the sum of the marks of each student for each subject. Teachers, students and guardian can
view these marks.

Learning Management System For UST Bannu 24


Chapter 5 System Design

5.2 Database Design


The process of creating a database design that supports the enterprises mission statement
and mission objectives for required database system. Database design is the process of
producing a detailed data model of database.

5.2.1 Data Modeling


Data modeling is the process of analyzing the things of interest to your organization and
how these things are related to each other.

Building a data model requires identification of entities, relationships and attributes. A data
model makes it easier to understand the meaning of the data. Data model is very useful in
understanding and communicating the information requirements.

The primary value of a data model is its ability to be used as a blueprint to build a physical
database.

5.2.1.1 The Components of a Data Model


The simplest data model consists of entities and relationships. As work on the data model
progresses, additional detail and complexity is added.

5.2.1.1.1 Entity
An entity, at a very basic level, is something that exists and is capable of being described.
It is a person, place, thing, concept, or event about which your organization maintains facts.

5.2.1.1.2 Attributes
An attribute is a characteristic of an entity.

Every attribute does one of three things: it identifies, relates, or describes.

5.2.1.1.3 Keys
A key consists of one or more attributes, the values of which uniquely identify an entity
occurrence and define relationships between entities.

Learning Management System For UST Bannu 25


Chapter 5 System Design

5.2.1.1.3.1 Candidate Key

A candidate key is an attribute, or set of attributes, that can be used to uniquely identify an
occurrence of the entity.

5.2.1.1.3.2 Primary Key

The primary key is chosen from the set of candidate keys and is used to identify an entity
occurrence. Its value must be unique. The value of any component of the primary key cannot
be null.

5.2.1.1.3.3 Foreign key

Foreign keys reside in dependent entities to establish relationships. The primary key
identifies an
entity occurrence; foreign keys identify relationships between entity occurrences.

An attribute or set of attributes in a dependent entity which is primary key in a base entity
is called foreign key. Foreign key value can be duplicated.

5.2.1.1.4 Relationships
Relationships define how the different entities are associated with each other. A relationship
may be between different entities or between an entity and itself. The keys define a
relationship: the primary key in the parent entity and the foreign key in the

dependent entity.

5.2.1.1.5 ERD
An ER diagram graphically depicts the entities and relationships of a data model.

5.2.2 Phases of Database Design


Database design is made-up of three main phases:

Conceptual Database Design


Logical Database Design
Physical Database Design

Learning Management System For UST Bannu 26


Chapter 5 System Design

5.2.2.1 Conceptual Database Design


The process of constructing a model of the data used in an enterprise, independent of all
physical considerations.

A conceptual data model is generally more abstract and less detailed than a complete logical
data model. A conceptual data model depicts a high-level view of information. Noncritical
details can be left out of the conceptual data model in order to emphasize the most important
entities, attributes, and relationships. The goal of conceptual modeling is clarity and
simplicity. It is not necessary to discover and document every attribute of each entity at the
conceptual level. Furthermore, issues such as cardinality, optionality, and data types can be
skipped at the conceptual level. Some simple candidate keys may be recorded, but the
conceptual data model will not identify most keys because the high level of abstraction
makes useful key identification impractical or impossible.

Conceptual database design is entirely independent of the implementation details such as


the target DBMS software, application programs, programming languages, hardware
platforms, or any other physical consideration.

5.2.2.2 Logical Database Design


The process of constructing a model of the data used in an enterprise based on a specific
data model, but independent of a particular DBMS and other physical considerations.

The second phase of a database design is called Logical Database Design, which results in
a creation of a logical data model of the part of the organization that we are interested in
modeling.

A logical data model consists of fully normalized entities with all attributes defined.
Furthermore, the domain or data type of each attribute must be defined. A logical data model
requires the specification of primary key for unique identification of each occurrence in
every entity. Foreign key definitions should be clearly defined or

implied by the data relationships. Many-to-many relationships should be translated into


associative entities, which may acquire additional attributes and identifiers.

Learning Management System For UST Bannu 27


Chapter 5 System Design

Throughout the process of the developing a logical data model, the model is tested and
validated against the users requirement. The technique of the Normalization is used to test
the correctness of a logical data model. Normalization ensures that the relations derived
from the data model do not display data redundancy, which can cause anomalies when
implemented.

The logical data model is a source of information for next phase, namely Physical Database
Design.

5.2.2.2.1 Normalization
Process of decomposing large amount of data into small and well-structured relations is
called normalization.

A normalized data model reduces data redundancy and inconsistencies by ensuring that the
data elements are designed appropriately.

There are many types but most commonly used normal forms are 1NF, 2NF and 3NF.

5.2.2.2.1.1 First normal Form(1NF)


First normal form eliminates repeating groups and non-atomic data from a relation.

A relation is said to be in first normal form if and only if there is no repeating groups and
non-atomic data.

5.2.2.1.2 Second normal Form(2NF)


Second normal form eliminates partial dependency from a relation.

A relation is said to be in second normal form if and only if it is in first normal form and
every non-key attribute is fully dependent on the key.

5.2.2.1.3 Third normal Form(3NF):


Third normal form eliminates transitive dependency from a relation.

A relation is said to be in third normal form if and only if it is in second normal form and
every non-key attribute is non-transitively dependent on the primary key.

Learning Management System For UST Bannu 28


Chapter 5 System Design

5.2.2.3 Physical Database Design


Physical database design is the process of transforming a logical data model into a physical
data model and then implementing the physical model as an actual database using a specific
DBMS product such as SQL Server, Oracle, or MySQL. The physical data model specifies
exactly how the logical data model will be implemented using a particular DBMS.

The physical database design phase allows the designer to make decisions on how the

database is to be implemented. Therefore, physical design is tailored to a specific DBMS.


In development of the physical database design, we must first identify the target DBMS.

In generally the main aim of physical database design is to describe how we intend to
physically implement the logical database design. For the relational model, this involves:

Creating a set of relational tables and the constraints on these tables from the information
presented in the logical data model. [8][9]

5.2.2.3.1 Integrity Constraints


There are two basic integrity constraints:

Entity integrity
Referential integrity

5.2.2.3.1.1 Entity Integrity:

In a base relation, no attribute of a primary key can be null. Entity integrity is established
when a primary key is defined in table.
5.2.2.3.1.2 Referential Integrity

If a foreign key exists in a relation, either the foreign key value must match a primary key
value of some tuple in its base relation or the foreign key value must be wholly null. [10]

Learning Management System For UST Bannu 29


Chapter 5 System Design

5.2.3 ER Diagrams of LMS for UST Bannu


ERD of LMS for UST Bannu is complex because of so many entities. So we divide ER
Diagram of our system into following parts to understand and present properly.

Figure 5.8 ERD of Discussion Forum

In Figure 5.8, entities of discussion forum, their attributes and relationships with other
entities are depicted.

Learning Management System For UST Bannu 30


Chapter 5 System Design

Figure 5.9 ERD of Assignment

In Figure 5.9, entities with their attributes and relationships with other entities, related to
assignment module, are depicted.

Learning Management System For UST Bannu 31


Chapter 5 System Design

Figure 5.10 ERD of Quiz

In Figure 5.10, entities of quiz module, their attributes and relationships with other entities
are depicted.

Learning Management System For UST Bannu 32


Chapter 5 System Design

Figure 5.11 ERD of Notification

In Figure 5.11, entities of notification module, their attributes and relationships with other
entities are depicted.

Learning Management System For UST Bannu 33


Chapter 5 System Design

Figure 5.12 ERD of Class Structure

In Figure 5.12, entities of class structure, their attributes and relationships with other
entities are depicted.

Learning Management System For UST Bannu 34


Chapter 5 System Design

Figure 5.13 ERD of Attendance

In Figure 5.13, entities of attendance module, their attributes and relationships with other
entities are depicted.

5.2.4 Database Diagram


The following is the design and implementation schema of the Learning Management
System for UST Bannu.

Learning Management System For UST Bannu 35


Chapter 5 System Design

Learning Management System For UST Bannu 36


Chapter 5 System Design

5.2.5 Tables in Database:

5.2.5.1 USER
This table contains information about the users of the system. User may be a teacher, a
student, an admin or a guardian. User_ID is the primary key which stores the users CNIC
No. Teacher_ID, Registration_No, Admin_ID, and Guardian_ID are the foreign keys.

Table 5.1 USER

5.2.5.2 STUDENT
This table contains information about the students of the UST Bannu. Registration_No is
the primary key. Class_ID and Guardian_ID are the foreign keys.

Table 5.2 STUDENT

Learning Management System For UST Bannu 37


Chapter 5 System Design

5.2.5.3 TEACHER
This table contains information about the teachers of the UST Bannu. Teacher_ID is the
primary key which store the Teachers Employee ID.

Table 5.3 TEACHER

5.2.5.4 ADMIN
This table contains information about the admins of the system. Admin_ID is the primary
key which store the Admins Employee ID.

Table 5.4 ADMIN

Learning Management System For UST Bannu 38


Chapter 5 System Design

5.2.5.5 GUARDIAN
This table contains information about the guardians of the students of the UST Bannu.
Guardian_ID is the primary key.

Table 5.5 GUARDIAN

5.2.5.6 CONTACT
This table contains information about the contact of the users of the system. User_ID and
Contact_ID is the composite primary key. User_ID is the foreign key.

Table 5.6 CONTACT

Learning Management System For UST Bannu 39


Chapter 5 System Design

5.2.5.7 CLASS
This table contains information about the classes of the UST Bannu. Class_ID is the primary
key. Discipline_ID and Semester_No are the foreign keys.

Table 5.7 CLASS

5.2.5.8 DISCIPLINE
This table contains information about the disciplines which are taught in UST Bannu.
Discipline_ID is the primary key.

Table 5.8 DISCIPLINE

Learning Management System For UST Bannu 40


Chapter 5 System Design

5.2.5.9 SEMESTER
This table contains information about the semesters of the disciplines. Semester_No and
Discipline_ID is the composite primary key. Semester_No and Discipline_ID are the
Foreign keys.

Table 5.9 SEMESTER

5.2.5.10 SUBJECT
This table contains information about the subjects which are taught in UST Bannu.
Subject_ID is the primary key.

Table 5.10 SUBJECT

Learning Management System For UST Bannu 41


Chapter 5 System Design

5.2.5.11 SEMESTER_SUBJECT
This table contains information about association of SUBJECT to SEMESTER of the
Disciplines. Subject_ID, Semester_No and Discipline_ID is the composite primary key.
Subject_ID, Semester_No and Discipline_ID are the Foreign keys.

Table 5.11 SEMESTER_SUBJECT

5.2.5.12 ASSIGNED_SUBJECT
This table contains information about the association between TEACHER, SUBJECT and
CLASS which associates Subjects of Classes to the Teachers. In other words, this table
contains the subjects of the classes which are assigned to teachers. Teacher_ID, Subject_ID
and Class_ID is the composite primary key. Teacher_ID, Subject_ID and Class_ID are the
foreign keys.

Table 5.12 ASSIGNED_SUBJECT

Learning Management System For UST Bannu 42


Chapter 5 System Design

5.2.5.13 ASSIGNMENT_DETAIL
This table contains information about the assignments of the classes in their subjects.
Assignment_No, Class_ID and Subject_ID is the composite primary key. Class_ID,
Subject_ID and Teacher_ID are the foreign keys.

Table 5.13 ASSIGNMENT_DETAIL

5.2.5.14 ASSIGNMENT
This table contains information about the assignments of the students. Registration_No,
Assignment_No, Class_ID and Subject_ID is the composite primary key. Registration_No,
Assignment_No, Class_ID and Subject_ID are the foreign keys.

Table 5.14 ASSIGNMENT

Learning Management System For UST Bannu 43


Chapter 5 System Design

5.2.5.15 QUIZ_DETAIL
This table contains information about the quizzes of the classes in their subjects. Quiz_No,
Subject_ID and Class_ID is the composite primary key. Class_ID, Subject_ID and
Teacher_ID are the foreign keys.

Table 5.15 QUIZ_DETAIL

5.2.5.16 QUESTION_ANSWER
This table contains questions, answers and multiple choices (MCQs) for quizzes. Quiz_No,
Subject_ID, Class_ID and Question_No is the composite primary key. Quiz_No,
Subject_ID and Class_ID are the foreign keys.

Learning Management System For UST Bannu 44


Chapter 5 System Design

Table 5.16 QUESTION_ANSWER

5.2.5.17 QUIZ
This table contains information about the quizzes of the students. Registration_No,
Quiz_No, Subject_ID, Class_ID and Question_No is the composite primary key.
Registration_No, Quiz_No, Subject_ID, Class_ID and Question_No are the foreign keys.

Table 5.17 QUIZ

Learning Management System For UST Bannu 45


Chapter 5 System Design

5.2.5.18 QUIZ_RESULT
This table contains results of the quizzes. Quiz_No, Subject_ID, Class_ID and
Registration_No is the composite primary key. Quiz_No, Subject_ID, Class_ID and
Registration_No are the foreign keys.

Table 5.18 QUIZ_RESULT

5.2.5.19 LAB
This table contains information about the computer labs of UST Bannu. Lab_ID is the
primary key.

Table 5.19 LAB

Learning Management System For UST Bannu 46


Chapter 5 System Design

5.2.5.20 COMPUTER
This table contains information about the computers of labs. Computer_MAC is the primary
key. Lab_ID is the foreign key.

Table 5.20 COMPUTER

5.2.5.21 ATTENDANCE
This table contains information about the attendance of the students of UST Bannu.
Attendance_Date, Registration_No, Subject_ID is the composite primary key.
Registration_No, Subject_ID, Class_ID and Teacher_ID are the Foreign keys.

Table 5.21 ATTENDANCE

Learning Management System For UST Bannu 47


Chapter 5 System Design

5.2.5.22ATTENDANCE_REMARKS
This table contains additional information about the attendance of the students for their
grade book. Registration_No, Subject_ID and Attendance_Remarks_ID is the composite
primary key. Registration_No and Subject_ID are the Foreign keys.

Table 5.22 ATTENDANCE_REMARKS

5.2.5.23 PRESENTATION_DETAIL
This table contains information about the presentations of the classes in their subjects.
Presentation_ID, Subject_ID and Class_ID is the composite primary key. Class_ID,
Subject_ID and Teacher_ID are the foreign keys.

Learning Management System For UST Bannu 48


Chapter 5 System Design

Table 5.23 PRESENTATION_DETAIL

5.2.5.24 PRESENTATION
This table contains information about the presentations of the students. Presentation_ID,
Subject_ID, Class_ID and Registration_No is the composite primary key. Presentation_ID,
Subject_ID, Class_ID and Registration_No are the foreign keys.

Table 5.24 PRESENTATION

Learning Management System For UST Bannu 49


Chapter 5 System Design

5.2.5.25 THREAD
This table contains information about the threads, created by users of the system. Thread_ID
is the primary key. Subject_ID and User_ID are the foreign keys.

Table 5.25 THREAD

5.2.5.26 POST
This table contains information about the posts of the threads. Post_ID and Thread_ID is
the composite primary key. Thread_ID and User_ID are the foreign keys.

Table 5.26 POST

Learning Management System For UST Bannu 50


Chapter 5 System Design

5.2.5.27 TOPIC
This table contains topics, created by teachers, to help users in searching related threads.
Topic_ID is the primary key.

Table 5.27 TOPIC

5.2.5.28 THREAD_TOPICS
This table contains information about association between THREAD and TOPIC. In other
words, it contains references to all threads, associated with a topic and vice versa.
Thread_ID and Topic_ID is the composite primary key. Thread_ID and Topic_ID are the
foreign keys.

Table 5.28 USER

Learning Management System For UST Bannu 51


Chapter 5 System Design

5.2.5.29 NOTIFICATION
This table contains information about the general notifications, made by teachers, for
students. Notification_ID is the primary key. Class_ID, Teacher_ID and Subject_ID are the
foreign keys.

Table 5.29 NOTIFICATION

Learning Management System For UST Bannu 52

Вам также может понравиться