Professional Documents
Culture Documents
Medicine Distribution Management System: M. Siddique Roll No 847
Medicine Distribution Management System: M. Siddique Roll No 847
M. Siddique
Roll No 847
BS (IT)
Session 2010-2014
i
Department of Computer Science and Information Technology
Medicine Distribution Management System
ii
Department of Computer Science and Information Technology
Medicine Distribution Management System
PROJECT BRIEF
Project Name:
Medicine Management System
Objective:
The main aim of the project is to develop a complete desktop application of Medicine
Management System which will facilitate the administration to manage all the
information regarding all data of the medicine. Record all the information about the
medicine and customer and vendors. Manage information of product supply to the
customers; also maintain information receiving products from the vendors.
iii
Department of Computer Science and Information Technology
Medicine Distribution Management System
Undertaken BY:
M.Siddique
Supervised By:
Operating System:
Project Stared:
June-01-2014
Project Finished:
September-10-2014
Source Language:
iv
Department of Computer Science and Information Technology
Medicine Distribution Management System
(AMEEN)
v
Department of Computer Science and Information Technology
Medicine Distribution Management System
DEDICATION
Whos Support?
Give me Strength
And determination
To Accomplish my Goal
vi
Department of Computer Science and Information Technology
Medicine Distribution Management System
ACKNOWLEDGEMENT
First of all, our deepest gratitude to almighty ALLAH: the most beneficent, compassionate,
most merciful and most gracious whose favor and kindness made it possible for me to
complete this project work.
A very special thanks and appreciation goes to my parents and other family members for
always encouraging me. They really deserve me for enduring my problems with great
patience and love and whose endless prayers are a source of determination for me.
We wish to thank to Mr. Asghar Sir Head of Department for providing me the facility and
best environment to complete my task.
We also greatly indebted to my respectable teacher Madam Hina Sattar for his
supervision, kind support, unforgettable devotion and encouraging behavior.
We are also thankful to all staff members of the Department of Computer Science & IT
for their coordination.
M.Siddique
vii
Department of Computer Science and Information Technology
Medicine Distribution Management System
CONTENTS
DEDICATION........................................................................................................... VI
ABSTRACT ............................................................................................................... XI
CHAPTER # 1 .............................................................................................................. 1
INTRODUCTION ..................................................................................................... 1
1.1. PROBLEM STATEMENT: ........................................................................................ 2
1.2 PROJECT/PRODUCT FEASIBILITY REPORT:............................................................. 2
1.2.1. Technical Feasibility: ................................................................................... 2
1.2.2.Operational Feasibility: ................................................................................. 2
1.2.3.Economic Feasibility: ................................................................................... 2
1.2.4. Schedule Feasibility: .................................................................................... 2
1.2.5. Specification Feasibility: ............................................................................. 3
1.2.6. Information Feasibility: ............................................................................... 3
1.2.7. Motivational Feasibility: .............................................................................. 3
1.2.8. Legal & Ethical Feasibility: ......................................................................... 3
1.3. PROJECT SCOPE: ................................................................................................... 3
1.4. TOOLS AND TECHNOLOGY: .................................................................................. 4
1.4.1 Front-End Technology (ASP.Net 2010): ...................................................... 4
1.4.2.Back-End Technology (SQL Server 2008): .................................................. 5
1.5. VISION DOCUMENT: ............................................................................................. 6
1.6. RISK LIST: ............................................................................................................ 6
CHAPTER 2 ................................................................................................................. 8
viii
Department of Computer Science and Information Technology
Medicine Distribution Management System
CHAPTER # 3 ............................................................................................................ 17
ix
Department of Computer Science and Information Technology
Medicine Distribution Management System
x
Department of Computer Science and Information Technology
Medicine Distribution Management System
ABSTRACT
Student Project Management and Information system is a model system which
manages the projects and stores their information. It lacked a proper system to
manage the projects of students and store their information. Their earlier system was
manual and they had to maintain a separate register to manage the projects. This
resulted in a waste of time and required enhanced efforts to keep the record of the
projects. This Web Site provides the complete solution for their needs it is constructed
according to their specification and requirements. We provide WEB data entries and
updates for projects information and management.
Project Management and Information System tell how projects are managed. Our
system tell whole procedure which is made on project during its compilation.
Our system also provides searching facility. In our system user can search any project.
Rights in our project are given three type of user. One is Administrator other one is
Supervisor (Internal) user And Third One is Student (Enrolled). Visitors user only
gets information about project. But administrator can change in project. Our System
tells Which Student did which project in which session. This was the external of him
or her.
xi
Department of Computer Science and Information Technology
Medicine Distribution Management System
CHAPTER # 1
INTRODUCTION
1
Department of Computer Science and Information Technology
Medicine Distribution Management System
2
Department of Computer Science and Information Technology
Medicine Distribution Management System
3
Department of Computer Science and Information Technology
Medicine Distribution Management System
History
After four years of development, and a series of beta releases in 2000 and 2001,
ASP.NET 1.0 was released on January 5, 2002 as part of version 1.0 of the .NET
Framework. Even prior to the release, dozens of books had been written about
ASP.NET,[2] and Microsoft promoted it heavily as part of its platform for Web
services. Scott Guthrie became the product unit manager for ASP.NET, and
development continued apace, with version 1.1 being released on April 24, 2003 as a
part of Windows Server 2003. ASP.NET is loosely based on HTML. This release
focused on improving ASP.NET's support for mobile devices.
Characteristics
ASP.NET Web pages, known officially as Web Forms, are the main building blocks
for application development. Web forms are contained in files with a ".aspx"
extension; these files typically contain static (X) HTML markup, as well as markup
defining server-side Web Controls and User Controls where the developers place all
the rc content [further explanation needed] for the Web page. Additionally, dynamic
code which runs on the server can be placed in a page within a block <% -- dynamic
code -- %>, which is similar to other Web development technologies such as PHP,
JSP, and ASP. With ASP.NET Framework 2.0, Microsoft introduced a new code-
behind model which allows static text to remain on the .aspx page, while dynamic
code remains in an .aspx.vb or .aspx.cs or .aspx.fs file (depending on the
programming language used).
4
Department of Computer Science and Information Technology
Medicine Distribution Management System
Directives
A directive is a special instruction on how ASP.NET should process the page. [6] the
most common directive is <%@ Page %> which can specify many attributes used by
the ASP.NET page parser and compiler.
C#'s principal designer and lead architect at Microsoft is Anders Hejlsberg, who was
previously involved with the design of Turbo Pascal, Embarcadero Delphi (formerly
CodeGear Delphi, Inprise Delphi and Borland Delphi), and Visual J++. In interviews
and technical papers he has stated that flaws[citation needed] in most major
programming languages (e.g. C++, Java, Delphi, and Smalltalk) drove the
fundamentals of the Common Language Runtime (CLR), which, in turn, drove the
design of the C# language itself.
5
Department of Computer Science and Information Technology
Medicine Distribution Management System
MS Project is Medicine management software that is ideal for the designing and
documentation of large projects. MS Project is designed to assist project managers in
developing plans, assigning resources to tasks, tracking progress, managing budgets
and analyzing workloads.
Microsoft Visio:
Microsoft Visio is used to make diagrams for design phase and documentation.
Only authorized administrator can update, delete, edit, search and change any records.
6
Department of Computer Science and Information Technology
Medicine Distribution Management System
7
Department of Computer Science and Information Technology
Medicine Distribution Management System
CHAPTER 2
REQUIREMENT ANALYSIS
8
Department of Computer Science and Information Technology
Medicine Distribution Management System
1. Requirements elicitation
2. Requirements analysis and negotiation
3. Requirements specification
4. System modeling
5. Requirements validation
6. Requirements management
Here, requirements specification is to be discussed. Requirements specification would
lead to the following steps:
1. Identify external interfaces
2. Development of context diagram
3. User characteristics
4. Allocate requirements
5. Prioritize requirements
6. Development of requirements traceability matrix
9
Department of Computer Science and Information Technology
Medicine Distribution Management System
6. Customer Transaction
7. Customer Type
8. Vendor Transaction
9. Stock
10. Stock Items
11. Debit Note
12. Credit Note
1. Maintenance Detail
2. Maintenance Item
10
Department of Computer Science and Information Technology
Medicine Distribution Management System
Sr # Initial Requirements
11
Department of Computer Science and Information Technology
Medicine Distribution Management System
12
Department of Computer Science and Information Technology
Medicine Distribution Management System
2.0 Medium DB admin shall inert the city code. UC_04 UC_insert city code
2.0 Medium DB Admin shall modifying the city UC_05 UC_modifying city code
code
2.0 Medium DB admin shall inert the credit note UC_07 UC_insert credit note
2.0 Medium DB Admin shall modifying the credit UC_08 UC_modifying credit note
note
2.0 Medium DB admin shall inert the Customer UC_09 UC_insert customer
2.0 Medium DB admin shall inert the customer UC_11 UC_insert transection
transection
2.0 Medium DB admin shall inert the customer UC_13 UC_insert customer type
type
2.0 Medium DB admin shall modifying the UC_14 UC_modifying customer type
customer type
2.0 Medium DB admin shall inert the debit name UC_15 UC_insert debit name
2.0 Medium DB admin shall modifying the debit UC_16 UC_modifying debit name
name
2.0 Medium DB admin shall inert the invoice UC_17 UC_insert invoice
2.0 Medium DB admin shall inert the salesman UC_19 UC_insert salesman
13
Department of Computer Science and Information Technology
Medicine Distribution Management System
2.0 Medium DB admin shall inert the stock UC_21 UC_insert stock
2.0 Medium DB admin shall modifying the stock UC_22 UC_modifying stock
2.0 Medium DB admin shall inert the stock item UC_23 UC_insert stock items
2.0 Medium DB admin shall modifying the stock UC_24 UC_modifying stock items
item
2.0 Medium DB admin shall inert the vendor UC_25 UC_insert vendor
2.0 Medium DB admin shall inert the vendor UC_27 UC_insert vendor transection
transection
14
Department of Computer Science and Information Technology
Medicine Distribution Management System
15
Department of Computer Science and Information Technology
Medicine Distribution Management System
16
Department of Computer Science and Information Technology
Medicine Distribution Management System
CHAPTER # 3
17
Department of Computer Science and Information Technology
Medicine Distribution Management System
The objective of Object Oriented Analysis and Design is to develop a model that
describes computer software as it works to satisfy a set of requirements. After
understanding the current situation of the problem domain the team is ready to strive
for the solution by using OOAD approach.
Actors:
Following are the actors that interact with Medicine Management System.
Administrator
User (Driver)
Figure:
Administrator: User:
USER
18
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ID UC_01
UC-Name UC_Login
Pre-Condition:
The administrator and user must have a valid username and password.
Description:
This use case describes how an administrator and user can login the system.
Basic Flow:
3. If the username and/or password is wrong the user remains on the same screen.
Extensions: None.
19
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-02
UC-Name UC_Register
Pre-Condition: The DB Admin must login in the system with administrator login.
Description: This use case describes the creation of user accounts and addition of
new data in any form i.e. driver and register them so that they can use the system.
Basic Flow:
Extensions: None.
20
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-03
UC-Name UC_Update
Description:
This use case describes how the DB Admin updates any form of the system.
Basic Flow:
Extensions: None.
21
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-04
Pre-Condition:
Description: This use case describes how admin insert the City Code in the system.
Basic Flow:
Alternative Flow: The admin can cancel the process at any time.
Extensions: None.
22
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-05
Pre-Condition:
Admin must log in and open the page which he wants to modify.
Description: This use case describes how Admin can modify the city code and their
all actions.
Basic Flow:
Extensions: None.
23
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-06
Pre-Condition:
Description: This use case describes how admin insert the credit note in the system.
Basic Flow:
Post-Condition:
The Data is entered, update and deleted form the Data Base.
Extensions: None.
24
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-07
Pre-Condition:
Admin must log in and open the page which he wants to modify.
Description: This use case describes how Admin can modify the credit note and their
all actions.
Basic Flow:
Extensions: None.
25
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-08
Pre-Condition:
Description: This use case describes how admin insert the customer in the system.
Basic Flow:
Post-Condition:
The Data is entered, update and deleted form the Data Base.
Extensions: None.
26
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-09
Pre-Condition:
Admin must log in and open the page which he wants to modify.
Description: This use case describes how Admin can modify the customer and their
all actions.
Basic Flow:
Extensions: None.
27
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-10
Pre-Condition:
Description: This use case describes how admin insert the customer transection in the
system.
Basic Flow:
Post-Condition:
The Data is entered, update and deleted form the Data Base.
Extensions: None.
28
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-11
Pre-Condition:
Admin must log in and open the page which he wants to modify.
Description: This use case describes how Admin can modify the customer transection
and their all actions.
Basic Flow:
Extensions: None.
29
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-12
Pre-Condition:
Description: This use case describes how admin insert the customer type in the system.
Basic Flow:
Extensions: None.
30
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-13
Pre-Condition:
Admin must log in and open the page which he wants to modify.
Description: This use case describes how Admin can modify the customer type and
their all actions.
Basic Flow:
Extensions: None.
31
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-14
Pre-Condition:
Description: This use case describes how admin insert the debit note in the system.
Basic Flow:
Extensions: None.
32
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-15
Pre-Condition:
Admin must log in and open the page which he wants to modify.
Description: This use case describes how Admin can modify the debit note and their all
actions.
Basic Flow:
Extensions: None.
33
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-16
Pre-Condition:
Description: This use case describes how admin insert the invoice in the system.
Basic Flow:
Extensions: None.
34
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-17
Pre-Condition:
Admin must log in and open the page which he wants to modify.
Description: This use case describes how Admin can modify the invoice and their all
actions.
Basic Flow:
Extensions: None.
35
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-18
Pre-Condition:
Description: This use case describes how admin insert the salesman in the system.
Basic Flow:
Extensions: None.
36
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-19
Pre-Condition:
Admin must log in and open the page which he wants to modify.
Description: This use case describes how Admin can modify the salesman and their
all actions.
Basic Flow:
Extensions: None.
37
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-20
Pre-Condition:
Description: This use case describes how admin insert the stock in the system.
Basic Flow:
Extensions: None.
38
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-21
Pre-Condition:
Admin must log in and open the page which he wants to modify.
Description: This use case describes how Admin can modify the stock and their all
actions.
Basic Flow:
Extensions: None.
39
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-22
Pre-Condition:
Description: This use case describes how admin insert the stock items in the system.
Basic Flow:
Extensions: None.
40
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-23
Pre-Condition:
Admin must log in and open the page which he wants to modify.
Description: This use case describes how Admin can modify the stock items and their
all actions.
Basic Flow:
Extensions: None.
41
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-24
Pre-Condition:
Description: This use case describes how admin insert the vendor in the system.
Basic Flow:
Extensions: None.
42
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-25
Pre-Condition:
Admin must log in and open the page which he wants to modify.
Description: This use case describes how Admin can modify the vendor and their all
actions.
Basic Flow:
Extensions: None.
43
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC-ID UC-26
Pre-Condition:
Description: This use case describes how admin insert the vendor transection in the
system.
Basic Flow:
Extensions: None.
44
Department of Computer Science and Information Technology
Medicine Distribution Management System
The UML system sequence diagram (SSD) illustrates events sequentially inputs from
external source to the system. The SSD will define the system events and operations.
System sequence diagrams are a timeline drawing of an expanded use case. Events are
related by time with the top events occurring first. System events are the important
items. These are events that cause a system response.
The System Sequence Diagrams of the Transport Management System of the Islamia
University of Bahawalpur are shown below.
SYSTEM
USER
4: Validate(U,P)
5: Invalid Login
45
Department of Computer Science and Information Technology
Medicine Distribution Management System
SYSTEM
USER
6: Action(action)
7: Action()
46
Department of Computer Science and Information Technology
Medicine Distribution Management System
SYSTEM
USER
6: Action(action)
7: Action()
47
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Customer:
SYSTEM
USER
6: Action(action)
7: Action()
48
Department of Computer Science and Information Technology
Medicine Distribution Management System
SYSTEM
USER
49
Department of Computer Science and Information Technology
Medicine Distribution Management System
SYSTEM
USER
4.Show Customer
Transaction Form
6: Action(action)
7: Action()
50
Department of Computer Science and Information Technology
Medicine Distribution Management System
SYSTEM
USER
6: Action(action)
7: Action()
51
Department of Computer Science and Information Technology
Medicine Distribution Management System
SYSTEM
USER
6: Action(action)
7: Action()
52
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Invoice:
SYSTEM
USER
6: Action(action)
7: Action()
53
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Salesman:
SYSTEM
USER
6: Action(action)
7: Action()
54
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Stock:
SYSTEM
USER
6: Action(action)
7: Action()
55
Department of Computer Science and Information Technology
Medicine Distribution Management System
SYSTEM
USER
6: Action(action)
7: Action()
56
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Vendor:
SYSTEM
USER
6: Action(action)
7: Action()
57
Department of Computer Science and Information Technology
Medicine Distribution Management System
SYSTEM
USER
6: Action(action)
7: Action()
58
Department of Computer Science and Information Technology
Medicine Distribution Management System
1: Login
3: Enter(username, password)
4: Valid Input
59
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC _City Code:
6. Valid Input
8. Data Inserted
9. Data Inserted Succesfully
60
Department of Computer Science and Information Technology
Medicine Distribution Management System
6. Valid Input
8. Data Inserted
9. Data Inserted Succesfully
61
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Customer:
6. Valid Input
8. Data Inserted
9. Data Inserted Succesfully
62
Department of Computer Science and Information Technology
Medicine Distribution Management System
Customer Transection
User User Screen DB Handler
Page
6. Valid Input
7. input Reqired Data
8. Data Inserted
9. Data Inserted Succesfully
63
Department of Computer Science and Information Technology
Medicine Distribution Management System
6. Valid Input
8. Data Inserted
9. Data Inserted Succesfully
64
Department of Computer Science and Information Technology
Medicine Distribution Management System
6. Valid Input
8. Data Inserted
9. Data Inserted Succesfully
65
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Invoice:
6. Valid Input
8. Data Inserted
9. Data Inserted Succesfully
66
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Salesman:
6. Valid Input
8. Data Inserted
9. Data Inserted Succesfully
67
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Stock:
6. Valid Input
8. Data Inserted
9. Data Inserted Succesfully
68
Department of Computer Science and Information Technology
Medicine Distribution Management System
6. Valid Input
8. Data Inserted
9. Data Inserted Succesfully
69
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Vendor:
6. Valid Input
8. Data Inserted
9. Data Inserted Succesfully
70
Department of Computer Science and Information Technology
Medicine Distribution Management System
6. Valid Input
7. input Reqired Data
8. Data Inserted
9. Data Inserted Succesfully
71
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Customer:
72
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Invoice:
UC_ Salesman:
73
Department of Computer Science and Information Technology
Medicine Distribution Management System
UC_ Stock:
UC_ Vendor:
74
Department of Computer Science and Information Technology
Medicine Distribution Management System
CHAPTER # 4
4.8. Attribute
4.9. Normalization
75
Department of Computer Science and Information Technology
Medicine Distribution Management System
76
Department of Computer Science and Information Technology
Medicine Distribution Management System
Some DBMS examples include MySQL, PostgreSQL, Microsoft Access, SQL Server,
FileMaker, Oracle, RDBMS, dBASE, Clipper, and FoxPro. Since there are so many
database management systems available, it is important for there to be a way for them
to communicate with each other. For this reason, most database software comes with
an Open Database Connectivity (ODBC) driver that allows the database to integrate
with other databases. For example, common SQL statements such as SELECT and
INSERT are translated from a program's proprietary syntax into a syntax other
databases can understand.
77
Department of Computer Science and Information Technology
Medicine Distribution Management System
4.2.4. Data:
Data is information that has been translated into a form that is more convenient to
move or process. Relative to today's computers and transmission media, data is
information converted into binary digital form.
4.2.5. Hardware:
Hardware is a machine which we use to store access manipulates and manages the
data it consist of following two things
4.2.6. Software:
The request from users is processed by the DBMS.
78
Department of Computer Science and Information Technology
Medicine Distribution Management System
4.2.7. Users:
a) Application programmer:
b) End user:
The second class of user is end user. End-users use the software to assist with some
task. This may be flying an aircraft managing insurance policies, writing a books etc.
They want to know how the software can help them. They are not interested in
computer or administration details. These were final or ultimate user of a computer
system. The end user is the individual who uses the product after it has been fully
developed and marketed
c) Database administrator:
Compactness
No need for possible voluminous paper files.
79
Department of Computer Science and Information Technology
Medicine Distribution Management System
Speed
Machines can retrieve and update data for faster than human can.
Accuracy
Accurate up to date information is available on demand at any time.
Data Independence
Consistency of Data
Control Over Redundancy
Integrity of Data
Greater Security of Data
Centralized Control of Data
Increased Productivity
Minimal Data Redundancy
Data Sharing
Ease of application development
Enforcement of standards
Data can be shared
Physical data independence
Logical data independence
Data independence is the type of data transparency that matters for a centralized
DBMS. It refers to the immunity of user applications to make changes in the
definition and organization of data. Physical data independence deals with hiding the
details of the storage structure from user applications. The application should not be
involved with these issues, since there is no difference in the operation carried out
against the data. The data independence and operation independence together gives
the feature of data abstraction.
80
Department of Computer Science and Information Technology
Medicine Distribution Management System
Data integrity is data that has a complete or whole structure. All characteristics of the
data including business rules, rules for how pieces of data relate dates, definitions and
lineage must be correct for data to be complete. Data that has integrity is identically
maintained during any operation (such as transfer, storage or retrieval). Put simply in
business terms, data integrity is the assurance that data is consistent, certified and can
be reconciled.
Entity integrity concerns the concept of a primary key. Entity integrity is an integrity
rule which states that every table must have a primary key and that the column or
columns chosen to be the primary key should be unique and not null.
Referential integrity concerns the concept of a foreign key. The referential integrity
rule states that any foreign key value can only be in one of two states. The usual state
of affairs is that the foreign key value refers to a primary key value of some table in
the database. Occasionally, and this will depend on the rules of the business, a foreign
key value can be null. In this case we are explicitly saying that either there is no
relationship between the objects represented in the database or that this relationship is
unknown.
Domain integrity specifies that all columns in relational database must be declared
upon a defined domain. The primary unit of data in the relational data model is the
data item. Such data items are said to be non-decomposable or atomic. A domain is a
set of values of the same type. Domains are therefore pools of values from which
actual values appearing in the columns of a table are drawn.
81
Department of Computer Science and Information Technology
Medicine Distribution Management System
Entity is a basic data object in database modeling. Entity can be person, a place, an
event or a thing about which we have to save data in the database. If we assume that
our database is a language then we can say that entities are nouns. Database is a
collection of entities. The first step in database modeling is to identify entities of
database. This is of the major parts in conceptual database modeling. Following are
some characteristics of an entity and it is very important to consider these while
identifying entities.
a) Significant:
List only entities that are important to your database users and that are worth the
trouble and expense of computer tabulation.
b) Generic:
List only types of things, not individual instances. For instance, symphony might
be an entity, but Beethoven's Fifth would be an entity instance or entity
occurrence
C) Fundamental:
List only entities that were exist independently and do not need something else to
explain them. Anything you might call a trait, a feature, or a description is not an
entity. For example, a part number is a feature of the fundamental entity called
part.
d) Unitary:
Be sure that each entity you name represents a single class. It cannot be separated
into subcategories, each with its own features. In the telephone directory example,
82
Department of Computer Science and Information Technology
Medicine Distribution Management System
e) Weak entity:
4.8. Attribute:
The primary key of a relational table uniquely identifies each record in the table.
It can either be a normal attribute that is guaranteed to be unique (such as Social
Security Number in a table with no more than one record per person) or it can be
generated by the DBMS (such as a globally unique identifier, or GUID, in
Microsoft SQL Server). Primary keys may consist of a single attribute or
multiple attributes in combination.
83
Department of Computer Science and Information Technology
Medicine Distribution Management System
4.9. Normalization:
Normalization is a process to organize the data in an efficient manner. There are two
basic results which we expect from normalization. First is to remove redundant data
and second is avoid duplicate date to be recorded in database.
Through this example we explain different problems that might occur if the table is
not normalized.
a) Redundant Data:
Just consider that if we want to add a new entry of Maintenance then we has to enter
all the information regarding item again, in the above table, there are only a few
records. Just imagine what will happen where we have to store thousands of records.
b) Modification Anomaly:
Now consider another situation where we have to update the record of maintenance
item then we have to update it at many places, now what would happen when we will
have millions of records.
84
Department of Computer Science and Information Technology
Medicine Distribution Management System
c) Deletion Anomaly:
What if we want to delete any record of any item from above mentioned table, then
we will also lose the information about slip no so what if we want to keep the record
of thesis maintenance information but still want to delete some information ?
d) Insertion Anomaly:
Suppose another situation where we have to insert a new record of thesis maintenance
information but we do not want insert data about vehicle.
To avoid such situations which are described above, we have to normalize the
database.
We can divide the whole normalization process into four steps; until and unless, we
are done with first step we cannot move to next step.
85
Department of Computer Science and Information Technology
Medicine Distribution Management System
According to second normal form, all non-key attributes must be dependent on key
attribute. If primary key is composite then non key attribute must depend on all the
key columns.
Understand the concept of second normal form, consider the following example.
1 C# X/Y/Z
2 SQL SERVAR X/Y/Z
Transitive dependency means that any non-key attribute is depending on any other
non-key attribute which is depending on key attribute.
86
Department of Computer Science and Information Technology
Medicine Distribution Management System
There is a general rule to find whether your table is in third normal form or not. You
have to identity column which need upgrading when you upgrade any other column in
that table.
Some time, it can make things too complex while implementing these normal form so
best way is to find a balance as when it gets too complex then many DBMS requires
more resource or it can decrease the performance.
A carefully thought-out database design forms the foundation for future success.
These links will help you plan your database designs to maintain performance and
integrity through future growth. Database design is the process of producing a
detailed data model of a database. This logical data model contains all the needed
logical and physical design choices and physical storage parameters needed to
generate a design in a Data Definition Language, which can then be used to create a
database. A fully attributed data model contains detailed attributes for each entity.
After creating conceptual database design, you have to represent that by using any
modeling techniques. Currently, there are many modeling tools and techniques are
available which are given below:
87
Department of Computer Science and Information Technology
Medicine Distribution Management System
Here in this document, we are going to discuss entity relationship diagram and
UML as this is the most widely used technique in the world.
Identify Entities
Define relationships
Define Cardinality of relationships
Identify Attributes and Primary Keys
Map all Attribute
88
Department of Computer Science and Information Technology
Medicine Distribution Management System
Basic Objects:
_______________
Us e to mention primary key attribute
89
Department of Computer Science and Information Technology
Medicine Distribution Management System
c) Developing ERD:
To understand the core concept of ERD, consider the Book Wholesale System. There
is following steps for Developing ERD.
The first step of developing ERD is identifying entities. We can identify following
entities.
1. City Code
2. Credit Note
3. Customer
4. Customer transection
5. Customer type
6. Debit Name
7. Invoice
8. Salesman
9. Stock
10. Stock Items
11. Vendor
12. Vendor transection
90
Department of Computer Science and Information Technology
Medicine Distribution Management System
In one to one relation there can be only one occurrence in both entities, for instance
the relationship between person and finger prints pattern will be one to one as a
person can only have one kind of finger prints. In one to many relationships there can
multiple instances in second table against one instance in first table but there will be
only one instance in first table against one instance in second table. Consider the
example of father and kids. A father can have many children but one child will have
only one father. In many to many relationships there can multiple instances in second
table against one instance in first table also there can be multiple instances in first
table against one instance in second table. To understand the concept of many to
many relationship please consider the example of students and courses. A student can
have more than one course and in one course there can be multiple students willing to
attend.
Attributes Of users:
PK UserId
Login
User(Login) Password
91
Department of Computer Science and Information Technology
Medicine Distribution Management System
City Code
Address
Phone No
Salesman Name
Phone NO
CityCode
City Code
City Name
CreditNote
92
Department of Computer Science and Information Technology
Medicine Distribution Management System
Attributes Of Customer:
Amount
InvoiceCode DateTime Customer
Invoice Code
Customer
Amount
Date Time
CustomerType
CustomerTypeID
Customer
Transection
Customer Type ID
Customer Type
Customer Transection
93
Department of Computer Science and Information Technology
Medicine Distribution Management System
Date
Remarks
Debit Amount
DebitNote
Remarks
Invoice
Attribute of Invoice:
Net Value
Invoice Code
CustomerCode
Salesman Code
ItemCode
SalesmanCo
de Total value Total value
SaleTax
Quntatiy
InvoiceCode Customer code
CustomerDate
Sales tax
Invoice
Customer Code
Retail price
Total amount
discount
94
Department of Computer Science and Information Technology
Medicine Distribution Management System
Stock code
Attribute of Stock Items:
Item Group name
Vendor Code
Trade mark
bonus
Trademark
Sales tax
Issue date
Batch name
Attribute of Vendor:
CityCode
Phone Number Vendor
Address
Opening Vendor Code
balance
Status
Current balance
95
Department of Computer Science and Information Technology
Medicine Distribution Management System
Transection type
Vendor transection
Amount
VendorCode
date
96
Department of Computer Science and Information Technology
Medicine Distribution Management System
City code:
Credit Note:
Customer:
97
Department of Computer Science and Information Technology
Medicine Distribution Management System
Customer Transection:
Customer type
Debit Note:
98
Department of Computer Science and Information Technology
Medicine Distribution Management System
Invoice:
Login:
Salesman:
99
Department of Computer Science and Information Technology
Medicine Distribution Management System
Stock table:
Stock items:
100
Department of Computer Science and Information Technology
Medicine Distribution Management System
Vendor:
Vendor transection:
101
Department of Computer Science and Information Technology
Medicine Distribution Management System
Chapter 5
TESTING
5.1. Testing
5.2. Testing Strategy
5.3. Test Cases
102
Department of Computer Science and Information Technology
Medicine Distribution Management System
5.1. Testing:
It is the process used to help identify the correctness, completeness, security, and
quality of developed computer software. Testing is a process of technical
investigation, performed on behalf of stakeholders, that is intended to reveal quality-
related information about the product with respect to the context in which it is
intended to operate.
This Strategy used for testing is Black Box Testing. Every module is tested and after
the integration of all modules again individually testing is done.
System:
Test:
Instructions:
Expected Result:
Message will appear that please enter correct user name and password.
103
Department of Computer Science and Information Technology
Medicine Distribution Management System
Actual Result:
Error occur with the following message Please enter correct username and password
System:
Test:
Main form is opened and username and password is entered to go to a Main Menu.
Instructions:
Expected Result:
Actual Result:
System:
Test:
Choose Add student Form from Main Menu and Enter Student information and click
Save button.
104
Department of Computer Science and Information Technology
Medicine Distribution Management System
Instructions:
Expected Result:
Actual Result:
System:
Test:
Instructions:
Expected Result:
Actual Result:
105
Department of Computer Science and Information Technology
Medicine Distribution Management System
.Test:
Instructions:
Expected Result:
Actual Result:
106
Department of Computer Science and Information Technology
Medicine Distribution Management System
CHAPTER # 6
107
Department of Computer Science and Information Technology
Medicine Distribution Management System
6.4. Invoice
108
Department of Computer Science and Information Technology
Medicine Distribution Management System
109
Department of Computer Science and Information Technology
Medicine Distribution Management System
110
Department of Computer Science and Information Technology
Medicine Distribution Management System
111
Department of Computer Science and Information Technology
Medicine Distribution Management System
112
Department of Computer Science and Information Technology
Medicine Distribution Management System
113
Department of Computer Science and Information Technology
Medicine Distribution Management System
114
Department of Computer Science and Information Technology
Medicine Distribution Management System
REFRENCES
Website References:
www.google.com
www.w3schools.com
www.wikipedia.com
115
Department of Computer Science and Information Technology