FX - Medic Computerize Database Software-Project 6-6-11

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 92

DATABASE MANAGEMENT SYSTEM FOR FX-MEDICS PHARMACEUTICALS

Submitted by: Muhammad Fahad Mukhtar Zulfiqar Hussain Shah

Supervisor: Mr. Mehr Abbas

COMPUTER CENTRE QUAID-I-AZAM UNIVERSITY ISLAMABAD

CERTIFICATE
Report Title: Database Management System of FX-Medics Pharmaceuticals
This is to certify that we have read the project submitted by Muhammad Fahad Mukhtar and Syed Zulfiqar Shah. It is our judgment that this project is of sufficient standard to warrant its acceptance by the Quaid-i-Azam University, Islamabad for the Post Graduate Diploma in computer Science.

Committee
External Examiner: _______________________ Signature: ________________

Supervisor: Mr. Mehr Abbas Assistant Programmer, Computer Centre, Quaid-i-Azam University, Islamabad. signature: _________________

Dirctor: Dr. Rahat Hussain Bukhari Computer Centre, Quaid-i-Azam University, Islamabad. Signature: ________________

DEDICATED TO
Our parents who prayed for us and all who have given us their support during the development of this project and gave us good ideas to prove us as intellectuals in front of our respected teachers.

ACKNOWLEDGMENT
Praise to Allah, Lord of the worlds, who enabled us to complete the project and fulfill the required functionalities. We are thankful to Director of Computer Centre Dr. Rahat Hussain Bukhari for providing us adequate facilities as regards the hardware equipment and software needed for the project. He provided us every opportunity to work in a healthy atmosphere. And this was all not possible without the guidance and moral support by Mr. Mehr Abbas. He was always there whenever we needed his help and ideas. We are really thankful to Mr. Anees-Ur-Rehman (Assistant Director) for his help, support and the guidance that he provided us during the project.

TABLE OF CONTENTS Title


Project Brief.... Abstract...

Page No.

Chapter 1 : Introduction
1.1 Introduction... 1.2 Existing System. 1.3 Requirements.

Chapter 2 : Proposed System


2.1 Project Scope. 2.2 Functionality.. 2.3 Objectives..

Chapter 3 : Database Development


3.1 Logical Database Design... ERD Relationships... 3.2 Physical Database Design..

Chapter 4 : Front End


4.1 Forms. 4.2 Reports...

Chapter 5 : Tools And Technology


5.1 SQL Server 5.2 Visual Studio. 5.3 VB.Net... 5.4 .Net. 5.5 ADO.Net

Chapter 6 : Risk Analysis


6.1 Definition... 6.2 Purpose.. 6.3 Role and Responsibilities.. 6.4 Risk Documentation..

Chapter 7 : Developers Info


7.1 About Us 7.2 Copyrights..

PROJECT BRIEF
Project Title: Objective: Offered by: Supervisor: Developed By: Database Management System of FX-Medics Pharmaceuticals To convert the existing system into computerized database system Computer Centre, Quaid-i-Azam University Mr. Mehr Abbas Muhammad Fahad Mukhtar Zulfiqar Hussain Shah Session: Development Environment: System used: P-IV 2010-2011 SQL Server, Visual Studio.Net, Windows-XP.

ABSTRACT
This project is to be developed for converting the existing manual system of the FXMedics Pharmaceuticals into computerized database system. This database system will be used to store the information related medicine products, chemicals used in the production of these medicines, employees working in the company, departments of the company and customers of the company. This system will be efficient enough to retrieve the needed information with no loss of time. This database system will make it easy for the user to store information and will also be convenient to search some information when needed. The system will be user friendly and its interface will be such that to help the user use the system in an easy and convenient way.

CHAPTER 1 INTRODUCTION
1.1

Introduction
FX-Medics Pharmaceuticals is a growing company in the field of medicine

production. It is producing different products that deal with the general health of public. As products deal with health of public so a great care should be taken in their production. To take required safety measures for quality assurance an efficient system is required that keeps a record of the products and work in progress. This project is undertaken to develop such a system for the company. Keeping in view the needs of the modern world the automated system provide an easy way to save and search the required information and hence help saving the time of the user. A pharmaceutical company deals in public health products and hence a great care and attention required when dealing with the data related pharmaceutical company. In our case the database system will provide the ease and facilities to cope with the difficulties presently faced by the company.

1.2

- Existing System
Presently a manual system of record keeping is being used in the company. Data is

recorded and kept in manually written files. File keeping is hard and time consuming task as more space is required to keep the files. Facing the problems in manual system the company has decided to change manual system by computerized database management system.
1.2.1 - Problems and Drawbacks

The previous system is having many problems because there is a manual system being used to manage the record of the company. The manual system has several
3

drawbacks that can cause problems at critical situations. To avoid these problems the manual system must be replaced with modern database management system. The main problems of existing system are given below:
1. 2. 3. 4.

The record is not easily manageable. It is hard to search an already existing record. Threats of lost of record files if not kept properly. Wastage of time in searching record if not maintained properly. Big space required to keep the record entered manually. Many chances of record spoiling. Chances of data duplication as it is hard to keep track of the documents and transaction.

5. 6. 7.

8.

Data is kept in cabinets and is easily available to everyone and hence there is a lack of security.

9.

As everything has to be written manually hence it is very time consuming. As all of the data is hand written hence there are more chances of mistakes in data entered.

10.

11.

Data duplication may occur if forgotten that the same data has already been entered.

12.

More difficult for a new hired person to manage the record and also difficult for him to search for the previous record.

1.3

Requirements

Keeping in view the complexity of data managed by the company, the company has different requirements which they want to see as functionality in their database management system. Requirements of the company are as follows:

1- Database system going to be developed must be reliable and user friendly. 2- Must avoid un-necessary complexity in the system. 3- It must be easy to update the record. 4- System must store and keep the record of each product being prepared in the company. 5- Must keep the record of daily production of each medicine.
6- Sales record of each medicine for each day. 7- Keeps record of customers doing business with the company.

8- Queue up the orders put by customers and keep a record of them. 9- Keeps record of the chemicals used in the preparation of the medicines. 10- Must keep record of the suppliers who supply the chemicals for the medicine preparation.
11-More than 200 employees are currently working in the company in different

departments; database system must keep record of all these workers. Requirements about the appearance of the system, a form containing buttons should appear on the screen containing entities about which the record has to be maintained and for which the reports have to be generated. When any of the buttons from is pressed all of the fields necessary for that entity should appear on the screen along with buttons to add, save, edit, update and delete. The save button and textboxes for addition of new record should be disabled at start and must be enabled when the button for new record is pressed and after entering the required fields when the save button is pressed the record should be saved in the database. Also the update button should be disabled at the start and must be enabled when the edit button is pressed.

The complete table for the selected entry along with data in the table must appear in the data grid-view and that record must be highlighted which is present in the comboboxes. To delete the specific record first that record must be selected and then delete button must be pressed to have that record deleted from the database.

CHAPTER 2 PROPOSED SYSTEM


2.1 - Project Scope
The proposed database management system will help the user to add some new data into the database conveniently and will also be helpful to search the already saved data and will be proficient enough to save the time of the user. It will be easy for the administrative staff to handle all the activities related to the work being done in the company. The proposed database system will resolve the problems which are in previous system while providing a user friendly Graphical User Interface (GUI).This system will perform the following useful tasks for the user: 1. It will be easier to enter a new record. 2. It will be easier for the user to search the existing record. 3. Will contain the record of the staff, customers, suppliers and departments. 4. Will also save the record of medicines and chemicals. 5. Will search the record (staff, customer, supplier, departments, medicines, chemicals). 6. It will be helpful in order to change/alter any of the existing record using this system. 7. Interface of the system will be helpful for the user to use the software.

2.2 Functionality
The proposed system will reduce the time and efforts required for retrieving and saving information. The proposed system has comprehensive database in which the facilities of insertion, modification, retrieval of records are available. The proposed system will include the following functionality:
1. System will have user friendly GUI (graphical user interface).

2. Screen guides the operator through the system to perform various tasks. 3. Options would be displayed in well designed menu and buttons. 4. Without using mouse focuses next field of entry.
5. No specialized computer staff required as ordinary user can communicate with the

system in a simple way, after desired training. 6. System allows for changes and amendments for future requirements.
7. The new system will be more efficient than the manual one due to its accuracy

and quick response. 8. The proposed system will generate automated reports.
9. Software can work in Networking Environment.

10. It will be easy to take a backup of the stored data.

2.3 Objectives
Every task undertaken has some objectives which motivate the person to work for the accomplishment of the task. Objectives also highlight the conditions and circumstances under which the task has been taken. This software system has to be developed keeping in view some objectives that has to be fulfilled by the system.

2.3.1 - Efficiency Efficiency is the degree to which we maximize utilization of resources. The system will give the high level of efficiency and will be according to the requirements of the customer and end users. 2.3.2 - Data Security Data of any company is highly confidential and needed to be secured from unauthorized use. In this software the data of the company will be secured by applying user authentication so that not everyone can have access to the data. 2.3.3 Accuracy The system provides accurate information, needed for daily transactions. It ensures efficient and accurate record keeping. 2.3.4 Flexibility The system allows for changes and amendments to incorporate future requirements of the management. User can update the previously entered record if it contains any type of mistake and can also delete the record. 2.3.5 - User Friendly User communicates with the system in simple way. It means no specialized computer staffs are required. The interface of the system will help the user to communicate with the system in very easy way. 2.3.6 Productivity Significant reduction of clerical staff leads too much improved staff productivity and will also help improve economy of the company.

10

2.3.6 Reliability The new system is more reliable than the manual one due to its accuracy and security because it provides reports and required data accurately. 2.3.7 - Performance This system will reduce the time and efforts required retrieving information. It will have the capability to react against all the actions instantly and efficiently. 2.3.8 Facilities The proposed system has comprehensive database in which facilities of insertion, modification, retrieval of records and facilities of various queries and reports are available. 2.3.9 - Minimize the Redundancy The proposed system has no redundancy; this means that the database has been designed in such a way that minimum data is duplicated. 2.3.10 - User Interface For better user interaction, provided options would be displayed in well-designed buttons. Without using mouse focuses next field of entry. Appropriate messages about data entry would be displayed on forms and function of each button is displayed whenever that button is got focus.

11

CHAPTER 3 DATABASE DEVELOPMENT


There are two type of database design: 1- Logical Database Design 2- Physical Database Design

4.1 - Logical Database Design


Logical database design is actually the thinking process of the developer. The developer makes a database structure in his imagination that, how he will co-relate the tables in the relational database. Logical database design is structured in form of ERD (Entity Relationship Diagram).The basic part of the database design is to identify entities. 4.1.1 Entities Entities are the objects about which the data has to be stored in the database. Entities used in this database management system and their attributes are given below: 4.1.1.1 - Medicine The products being prepared must have an identifier field named Med_id. Other attributes contain Med_Name., Batch_Id, Chem_Id, Chem_Qty, Med_Price, Current_Qty and Med_Detail.

12

Fig-1: Medicine Table 4.1.1.2 - Batch The medicine manufactured in one batch will have the same manufacture and expiry dates. Entity named batch will have identifier field Batch_Id and other attributes will contain Manufacturing_Date and Expiry_Date.

Fig-2: Batch Table 4.1.1.3 Customer Record of the customers doing business with the company must be stored with Customer_Id as its identifier field. Some other attributes consists of Customr_Name, Customer_Address Customer_contact, Customer_Email and Customer_History.

Fig-3: Customer Table


13

4.1.1.4 Chemical Raw chemical material is used in the manufacturing of the medicine products which must have an identifier field named Chem_Id. Other attributes for the raw chemical material contains Chem_Name, Supplier_Id, Current_Qty, Unit and Rate_Per_Unit.

Fig-4: Chemical Table 4.1.1.5 Supplier The chemicals being used in the manufacturing of the medicine are being supplied by different suppliers/vendors whose data is to be stored with identifier field Supplier_Id and some of the other attributes are Supplier_Name, Supplier_Email, Supplier_Address and Supplier_Contact.

Fig-5: Supplier Table 4.1.1.6 Employee The record of the employees of the company is saved in the entity named Employee with an identifier field Emp_Id and attributes contain Emp_Name, Dept_Id, Scale_Id, Emp_Address and Hire_Date.

14

Fig-6: Employee Table 4.1.1.7 Scale The record for the scales allotted to the employee of the company and the salaries against each scale is recorded in the entity named Scale with identifier field Scale_Id and the other attributes contain Scale and scale_Salary.

Fig-7: Scale Table 4.1.1.8 - Purchase_Order Orders placed by the company for the purchase of chemicals being used in the manufacturing of medicine have an identifier field P_Order_Id. The other attributes for the order are Supplier_Id, Order_Date, Receiving_Date, Chem_Id, Qty_Purchased, Status_Id and Amount_Paid.

Fig-8: Purchase_Order Table 4.1.1.9 - Sales_Order


15

Orders placed by the customer for the purchase of medicine being prepaired in the company have an identifier field S_Order_Id. The other attributes for the order are Customer_Id, Order_Date, Dispatch_Date, Med_Id, Qty_Saled, Status_Id and Amount_Received.

Fig-9: Sales_Order Table 4.1.1.10 - Order_Status The orders placed by the company for the purchase of chemicals or by the customer in the company for the purchase of medicines are identified by its status either fulfilled or not. The identifier field for order_staus is Status_Id and the other attributes contain status.

Fig-10: Order_Status Table 4.1.1.11 Department There are different departments in the company. Each department has identifier named Dept_id and other attribute contains Dept_Name and Dept_Description.

16

Fig-11: Department Table 4.1.1.12 Users This table will contain the data about the users who are authorized to use the database systm. Each user will have identifier field named User_Id and the other attributes will contain User_Name and User_Password.

Fig12: User Table 4.1.1.13 Role Each user using the software will have a specific role identified by Role_Id and the other attribute will be Role.

Fig-13: Role Table

17

4.1.2 Entity Relationship Diagram (ERD)

Fig-14: Entity Relationship Diagram (ERD)

18

4.1.3 Relationships Different medicine products are being produced in the company with different raw chemicals. One or more than one chemical materials are used to prepare medicine and it is not necessary that each chemical material is used in every medicine. Every medicine is produced by mixing one or more chemicals and every medicine does not necessarily contain each chemical material.

CHEMICAL

Use d in

MEDICINE

Orders are placed by the customers for the purchase of medicines. Each order may contain one or more medicine products but will at least contain one medicine product. Each medicine may be present in one or more orders or may not be present in any order at all. SALES_ ORDER Contai ns

MEDICINE

Orders are placed in by different customers for the purchase of different medicine products. One customer can place one or more orders or may not place any order at all. One order can be placed by one or more than one customers.

SALES_ ORDER

Plac ed by

CUSTOMER

19 CHEMICA CHEMICA CHEMICA CHEMICA CHEMICA L LL L L UseUse Use Use Use Use d d d dd in ininin d in in MEDICIN MEDICIN CUSTOM MEDICIN E ER E E

Chemicals used in the preparation of the medicines are being provided by different suppliers/vendors. Each chemical may be supplied by one or more suppliers/vendors but must at least be supplied by one of the vendors. Also each supplier/vendor can supply one or more chemicals used in the factory for medicine preparation.

CHEMICAL

Suppli ed by

SUPPLIER

A number of employees work in the company in different departments. Each employee works in a specific department. Also each department contains a specific number of employees.

EMPLOYEE

Wor ks in

DEPARTMENT

Employees working in the company are placed in different scales. One employee will have maximum of one scale at a time. Many employees can have same scale at a time but not all employees will have the same scale.

EMPLOYEE

Plac ed in

SCALE

Pre Pre par par ed ed by by

20 SUPPLIER

To purchase chemicals from the suppliers the chemicals are placed in the purchase order. One or more chemicals can be in one purchase order but not necessarily in all purchase orders and also one or more purchase orders will not necessarily have all chemicals.

PURCHAS E_ ORDER

CONTA INS

CHEMICA L

Medicines prepare in one batch will have the same manufacturing and expiry date. One or more medicines can be in single batch and must not necessarily be in every batch. Each batch can have any number of medicines but must at least contain one medicine.

MEDICINE

PLAC ED IN

BATCH

To purchase the medicine purchase order will be sent to the supplier. One purchase order will be sent only to the one supplier. But each supplier can receive more than one purchase orders or cannot receive any purchase order at all.

SUPPLIER

RECEI VES

PURCHASE_ ORDER

21

Every purchase order will have an order status of either fulfilled or not. Every order will have exactly one order status at a time. Every order must have one of the three statuses, fulfilled, pending or rejected.

PURCHASE_ ORDER

HAVE

ORDER_ STATUS

Every sales order will have an order status of either fulfilled or not. Every order will have exactly one order status at a time. Every order must have one of the three statuses, fulfilled, pending or rejected.

SALES _ ORDER

HAVE

ORDER_ STATUS

4.2 - Physical Database Design


A database design is the physical design matured from the logical design. It is based upon the relationships among the data rather than the convenience of shortage structures. A remarkable feature of the database is that the data is organized in a systematic way such as a tabular format depending upon the structure defined for it. The systematic organization of data applied in a computer-based system, makes a database distinct form of record keeping. While designing the database the facts such as data integration, data sharing, consistency, no redundancy and data standardization have been taken care of.

22

4.2.1 - Table Design SQL Server is being used for this software as database. It fulfills the maximum standards presented by international database forum. The data in SQL Server database is stored in tables that contains columns or fields each fields is reserved for a particular data type, which is decided during table creation. The table design is such that redundancies are minimized, which will provide faster retrieval of information. While designing the tables following were the considerations: 1. The size of each field should be long enough to hold complete information. 2.
3.

Unnecessary fields should not be defined. The type of fields must match the data for which it was designed.

4.2.2 - Data dictionary Data Base Name Introduction

FX-Medics It contains all the information regarding FX-Medics Pharmaceuticals. It maintains the records of Users, Medicine, Batch, Chemicals, Customers, Suppliers, Employee, Department, Sales Order, Purchase Order, Scales and Order Status. Windows XP OLEDB Description This table will contain the data about the medicine products being prepared in the company This table contains the data about the chemicals being used in the preparation of medicine. This table will store data of the customers doing business with the company.

Platform Connectivity No. 1. 2. 3.

Table Name Medicine Chemical Customer

23

4. 5.

Supplier

This table will contain data about the suppliers who supply chemicals for the preparation of medicines. This table contains data of the sales-order placed by the customers for the purchase of medicine from the company. This table contains data of the purchase-order placed by the company for the purchase of chemicals from the supplier. This table will contain data of each batch in which a specified amount of medicine is prepared. This table contains data of the employee who are working in the company. This table will save the records of the scale in which the employees are working in the company. This table will contain the data about status of the orders placed by the customer or by the company. This table contains the information about all the departments of the company. This table contains the login information of the users who will use the software, This table contains the data about the role of the users either administrator or other user.

Sales_Order 6. 7. 8. 9. Scale 10. 11. 12. 13. Order_Status Department Users Role Purchase_Order Batch Employee

24

4.2.3 Tables Description Medicine FIELD NAME Med_Id Med_Name Batch_Id Chem_Id Chem_Qty Med_Price Current_Qty Description

DATA TYPE Numeric Varchar Numeric Numeric Numeric Numeric Numeric Varchar

SIZE (18, 0) 50 (18, 0) (18, 0) (18, 0) (18, 0) (18, 0) 50

DESCRIPTION Id of medicine Name of the medicine Id of batch in which medicine was prepared Id of chemical used in medicine Quantity of chemical used in medicine Price of the medicine Quantity of medicine present in store Description of the medicine

Chemical FIELD NAME Chem_Id Chem_Name Supplier_Id Current_Qty Unit Rate_Per_Unit

DATA TYPE Numeric Varchar Numeric Numeric Varchar Numeric

SIZE (18, 0) 50 (18, 0) (18, 0) 10 (18, 0)

DESCRIPTION Id of chemical Name of chemical Id of supplier Quantity of chemical present Unit in which chemical is measured Per unit rate of chemical

25

Customer FIELD NAME Customer_Id Customer_Name

DATA TYPE Numeric Varchar

SIZE (18, 0) 50 50 (18, 0) 50 50

DESCRIPTION Id of customer Name of customer Address of customer Phone number of customer Email address of customer Previous history of customer

Customer_Address Varchar Customer_Contact Customer_Email Customer_History Numeric Varchar Varchar

Supplier FIELD NAME Supplier_Id Supplier_Name Supplier_Email Supplier_Address Supplier_Contact

DATA TYPE Numeric Varchar Varchar Varchar Numeric

SIZE (18, 0) 50 50 50 (18, 0)

DESCRIPTION Id of supplier Name of supplier Email address of supplier Address of supplier Phone number of supplier

Sales_Order FIELD NAME S_Order_Id Customer_Id Order_Date Dispatch_Date Med_Id Qty_Sold Amount_Received Status_Id

DATA TYPE Numeric Numeric Date/time Date/time Numeric Numeric Numeric Numeric

SIZE (18, 0) (18, 0)

DESCRIPTION Id of sales order Id of customer sending order Date of receiving order Date of dispatching order

(18, 0) (18, 0) (18, 0) (18, 0)

Id of medicine present in order Quantity of medicine in order Bill paid by customer Id of order status

26

Purchase_Order FIELD NAME DATA TYPE P_Order_Id Numeric Supplier_Id Ordering_Date Receving_Date Chem_Id Qty_Purchased Status_Id Amount_Paid Numeric Date/time Date/time Numeric Numeric Numeric Nchar

SIZE (18, 0) (18, 0)

DESCRIPTION Id of purchase order Id of supplier Date of sending order Date of receiving order

(18, 0) (18, 0) (18, 0) (10)

Id of chemical present in order Quantity of chemical in order Id of order status Bill paid to supplier

Batch FIELD NAME Batch_Id Manufacturing_Date Expiry_Date Total_Qty_of_cotton_in_Batch DATA TYPE Numeric Date/time Date/time Numeric 18 SIZE 18 DESCRIPTION Id of batch Date of manufacturing Date of expiry Quantity of medicine in one batch

Employee FIELD NAME Emp_Id Emp_Name Dept_Id Scale_Id Emp_Address

DATA TYPE Numeic Varchar Numeric Numeric Varchar

SIZE (18, 0) 50 (18, 0) (18, 0) 50

DESCRIPTION Id of employee Name of employee Id of employees department Id of employees scale Employee address

27

Scale FIELD NAME Scale_Id Scale Scale_Salary

DATA TYPE Numeric Varchar Numeric

SIZE DESCRIPTION (18, 0) Id of scale 50 Scale

(18, 0) Salary of specific scale

Order_Status FIELD NAME Status_Id Status

DATA TYPE Numeric Varchar

SIZE (18, 0) 50

DESCRIPTION Id of status Status description

Department FIELD NAME Dept_Id Dept_Name Dept_Description

DATA TYPE Numeric Varchar Varchar

SIZE (18, 0) 50 50

DESCRIPTION Id of department Name of department Description of department

Users FIELD NAME User_Id User_Name Password Role_Id

DATA TYPE Numeric Varchar Varchar Numeric

SIZE (18, 0) 50 10 (18, 0)

DESCRIPTION Id of user Name of user Password of user Role of user

28

Role FIELD NAME Role_Id Role

DATA TYPE Numeric Varchar

SIZE (18, 0) 50

DESCRIPTION Id of role Role description

29

CHAPTER 4 FRONT END


4.1 - Forms
The physical appearance of the system will be such that it would be convenient for the end user to handle the software program. The buttons and labels of the system would help the user to handle the system efficiently. The appearance of the forms for data entry and data display will be like the forms shown below. 4.1.1 Login Form When the user will run the software program first login form will appear on the form. User will enter his username and password to have access to the database.

Fig-15: Login Form

30

4.1.2 Main Menu Form for User If the user is someone other than administrator then main menu form that will appear on the screen will be as shown in the following figure.

Fig-16: Main Menu Form for User

31

4.1.3 Main Menu Form for Administrator If the person logged in is an administrator then a different main menu will appear on the screen that will be different from ordinary user form as the rights for both the user and administrator are different. Main menu form for administrator is shown in the figure below.

Fig-17: Main Menu Form for Administrator

32

4.1.4 Record Menu Form for Administrator If the administrator clicks the Record Menu buttons the record menu form appeared on the form is shown in the figure.

Fig-18: Record Menu Form for Administrator

33

4.1.5 Record Menu Form for Users

Fig-19: Record Menu Form for Users

34

4.1.6 Create User Form

Fig-20: Create User Form

35

4.1.7 Supplier Record Form

Fig-21: Supplier Record Form

36

4.1.8 Chemical Record Form

Fig-22: Chemical Record Form

37

4.1.9 Customer Record Form

Fig-23: Customer Record Form

38

4.1.10 Employee Record Form

Fig-24: Employee Record Form

39

4.1.11 Medicine Record Form

Fig-25: Medicine Record Form

40

4.1.12 Order Status Form

Fig-26: Order-Status Form

41

4.1.13 Purchase Order Record Form

Fig-19: Purchase Order Record Form

42

4.1.14 Batch Record Form

Fig-20: Batch Record Form

43

4.1.15 Department Record Form

Fig-21: Department Record Form

44

4.1.16 Sales Order Record Form

Fig-22: Sales Order Record Form

45

4.1.17 Scale Record Form

Fig-23: Scale Record Form

46

4.2 Reports
The system will generate automated reports for the user. When the administrator/user will click the Report menu button the form that will appear on the screen is shown below in the figure.

Fig-24: Report Menu Form

47

4.2.1 Employee Report

Fig-25: Employee Report 4.2.2 Medicine Report

Fig-26: Medicine Report


48

4.2.3 Chemical Report

Fig-27: Chemical Report

4.2.4 Purchase Order Report

Fig-28: Purchase Order Report


49

4.2.5 Sales Order Report

Fig-29: Sales Order Report

50

CHAPTER 5 USE CASES


Some of the Use Cases are given below which will help to understand the functionality of the software.

5.1 - Create Users


UC-01: Create User Actors: Administrator Feature: Administrator will create user. UC-01 Administrator has logged on to System and essential user authentication has been performed.

Use case Id: Pre-condition: Scenarios

Action Step# 1. Administrator will login to the system. 1. From main menu administrator will click Create User button present on the form. 2. Create User form will appear on the screen. 3. Administrator will input the required information for the account to be created. 4. Press OK button. 5. User Created Successfully message will be displayed. 6. Use case ends. Post Conditions Step# Description 1. Administrator has successfully created New User. 2. User ID is unique and will be used by the user.

51

5.2 - User Login


UC-02: User Login Actors: All Users Feature: The user will log on to the system according to its privileges. Use case Id: Pre-condition: Scenarios Step# 1. 2. 3. 4. 5. 6. Action User will request for login on system. Login form will appear on the screen. User will enter Username and password. Click OK button. System will login the user. Use case ends. Post Conditions UC-02 NIL

Step# Description 1. User has logged on the system and can access the commands according to the privileges 2. Each user will use unique id

5.3 Add New Record into Medicine Form


UC-03: Add New Record Actors: Administrator and all Users Feature: The user will enter new record into the Medicine table Use case Id: Pre-condition: Scenarios UC-03 The users must have logged on to system with valid username and password.

52

Step# 1. 2. 3. 4. 5. 6. 7.

Action User will click Record Menu button after logging in. From record menu click the Medicine button. User will press button New on the medicine record form. Required fields will appear on the form for data input. User will fill in the required fields. User will press button Save to add record to the database. Use case ends. Post Conditions

Step# Description 1. Data has successfully been added to the existing database.

5.4 Edit Existing Record from Medicine Table


UC-04: Add New Record Actors: Administrator and all Users Feature: The user will edit already existing record from Medicine table. Use case Id: Pre-condition: Scenarios Step# 1. 2. 3. 4. 5. 6. 7. 8. Action User will login and click Record Menu button on main menu form. From record menu form click the Medicine button. User will select the data to be edited from table. User will press button Edit present on the form. Whole data for that record will appear in the textboxes. Make the required changes in the data. Press button Update to save the edited record. Use case ends. Post Conditions UC-04 The users must have logged on to system with valid username and password.

Step# Description 1. Data has successfully been edited in the database.

53

5.5 Delete Existing Record from Medicine Table


UC-05: Delete Existing Record Actors: Administrator and all Users Feature: The user will delete existing record from the existing database. Use case Id: Pre-condition: Scenarios Step# 1. 2. 3. 4. 5. 6. Action User will login and press button Record Menu on the main menu form. Click Medicine button on the record menu. User will select the record from the table to be deleted. User will press Delete button on the form. The selected data has been deleted from the medicine table. Use case ends. Post Conditions UC-05 The users must have logged on to system with valid username and password.

Step# Description 1. Data has successfully been deleted from the existing database.

5.6 Add New Record into Batch Form


UC-03: Add New Record Actors: Administrator and all Users Feature: The user will enter new record into the Batch table Use case Id: Pre-condition: Scenarios UC-03 The users must have logged on to system with valid username and password.

54

Step# 1. 2. 3. 4. 5. 6. 7.

Action User will click Record Menu button after logging in. From record menu click the Batch button. User will press button New on the Batch record form. Required fields will appear on the form for data input. User will fill in the required fields. User will press button Save to add record to the database. Use case ends. Post Conditions

Step# Description 1. Data has successfully been added to the existing database.

5.7 Edit Existing Record from Batch Table


UC-04: Add New Record Actors: Administrator and all Users Feature: The user will edit already existing record from Batch table. Use case Id: Pre-condition: Scenarios Step# 1. 2. 3. 4. 5. 6. 7. 8. Action User will login and click Record Menu button on main menu form. From record menu form click the Batch button. User will select the data to be edited from table. User will press button Edit present on the form. Whole data for that record will appear in the textboxes. Make the required changes in the data. Press button Update to save the edited record. Use case ends. Post Conditions UC-04 The users must have logged on to system with valid username and password.

Step# Description 1. Data has successfully been edited in the database.

55

5.8 Delete Existing Record from Batch Table


UC-05: Delete Existing Record Actors: Administrator and all Users Feature: The user will delete existing record from the existing database. Use case Id: Pre-condition: Scenarios Step# 7. 8. 9. 10. 11. 12. Action User will login and press button Record Menu on the main menu form. Click Batch button on the record menu. User will select the record from the table to be deleted. User will press Delete button on the form. The selected data has been deleted from the medicine table. Use case ends. Post Conditions UC-05 The users must have logged on to system with valid username and password.

Step# Description 1. Data has successfully been deleted from the existing database.

56

CHAPTER 6 TESTING
2.1 - Test Case 1
Test Case No Functionality Description 1 New User, Login and Validation. This module is related to the validation of the user for login, user registration, and modification in users registration information. When the user enters information for login it will initially check, is it valid user or not. If valid then allow him/her to login otherwise a message will be generated displaying that invalid user. When new user enters his/her registration information it will initially check, is the information given is valid or not or user name is already exist or not. User can modify/edit his personal or registration information after successful login.

Test Results No Input 1. Login info. 2. Login info. 3. Administrator login info. 4. User login 5. 6. New User Registration Info New User Registration Info

Expected Output Valid Invalid Valid Valid Valid Registered

Observed Output Login Not login Login Login Registered then Login Not Registered (Try Again)

Discrepancy Nil Nil Nil Nil Nil Nil

57

General Observations Being a database project, storage of Administrator and User info was very critical and significant. The client is particularly interested in friendly user interface and correct output. The user will initially be checked, is he/she valid or not. If valid then allow the user to login and use his/her account. Only administrator can create a new account for a new user. Administrator will give name and password for new user.

2.2 - Test Case 2


Test Case No Functionality Description 2
Enter / Update / Delete new record from Batch Table

This module is related to the addition of new record, updating the existing record and deleting the existing record from the existing table of Batch. The user will log in and will press Batch button to display Batch Form.

Test Results No Input 1. User will login using login info Click the 2. 3.

Expected Output Login Batch form opens


Save button enabled and fields to be entered appear at bottom of form Record saved and displayed in data grid view Update button enabled and selected data appears in fields at bottom of form 58

Observed Output
Login

Discrepancy Nil Nil Nil

4.

5.

Batch Detail button Click New button to enter new record Click save button to save the record Click Edit button to edit some existing record

Batch form opens


Save button enabled and fields to be entered appear at bottom of form

Record saved and displayed in data grid view


Update button enabled and selected data appears in fields at bottom of form

Nil

Nil

6.

7.

Click Update button to update the edited record Click Delete button to delete selected record

Data edited and displayed in data grid view Selected record deleted and cannot be viewed in data grid view

Data edited and displayed in data grid view Selected record deleted and cannot be viewed in data grid view

Nil

Nil

General Observations

Users can add, delete and edit the record. User must have logged in using correct username and password. Record edited or added will be displayed in data grid view. Record deleted will vanish from data grid view.

2.3 - Test Case 3


Test Case No Functionality Description 3
Enter / Update / Delete new record into Order-Status Table

This module is related to the addition of new record, updating the existing record and deleting the existing record from the existing table of Order Status. The user will log in and will press Order Status button to display Order Status Form. Expected Output Login Order Status form opens
Save button enabled and fields to be entered appear at bottom of form Record saved and displayed in data grid view Update button enabled and selected data appears in fields at bottom of form Data edited and 59

Test Results No Input 1. User will login using login info 2. Click the Order 3.

Observed Output
Login

Discrepancy Nil Nil Nil

Status button Click New button to enter new record Click save button to save the record Click Edit button to edit some existing record Click Update

Order Status form opens


Save button enabled and fields to be entered appear at bottom of form

4. 5.

Record saved and displayed in data grid view


Update button enabled and selected data appears in fields at bottom of form Data edited and

Nil Nil

6.

Nil

7.

button to update the edited record Click Delete button to delete selected record

displayed in data grid view Selected record deleted and cannot be viewed in data grid view

displayed in data grid view Selected record deleted and cannot be viewed in data grid view

Nil

General Observations Users can add, delete and edit the record. User must have logged in using correct username and password. Record edited or added will be displayed in data grid view. Record deleted will vanish from data grid view.

2.4 - Test Case 4


Test Case No Functionality Description 4
Enter / Update / Delete new record into Customer Table

This module is related to the addition of new record, updating the existing record and deleting the existing record from the existing table of Customer. The user will log in and will press Customer button to display Customer Form.

Test Results No Input 1. User will login using login info 2. Click the 3.

Expected Output Login Customer form opens


Save button enabled and fields to be entered appear at bottom of form Record saved and displayed in data grid view Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data 60

Observed Output
Login

Discrepancy Nil Nil Nil

Customer button Click New button to enter new record Click save button to save the record Click Edit button to edit some existing record

Customer form opens


Save button enabled and fields to be entered appear at bottom of form

4. 5.

Record saved and displayed in data grid view


Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data

Nil Nil

6.

Click Update button to update

Nil

7.

the edited record Click Delete button to delete selected record

grid view Selected record deleted and cannot be viewed in data grid view

grid view Selected record deleted and cannot be viewed in data grid view

Nil

General Observations Users can add, delete and edit the record. User must have logged in using correct username and password. Record edited or added will be displayed in data grid view. Record deleted will vanish from data grid view.

2.5 - Test Case 5


Test Case No Functionality Description 5
Enter / Update / Delete new record into Chemical Table

This module is related to the addition of new record, updating the existing record and deleting the existing record from the existing table of Chemical. The user will log in and will press Chemical button to display Chemical Form.

Test Results No Input 1. User will login using login info 2. Click the 3.

Expected Output Login Chemical record form opens


Save button enabled and fields to be entered appear at bottom of form Record saved and displayed in data grid view Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view 61

Observed Output
Login

Discrepancy Nil Nil Nil

Chemical Detail button Click New button to enter new record Click save button to save the record Click Edit button to edit some existing record Click Update button to update the edited record

Chemical record form opens


Save button enabled and fields to be entered appear at bottom of form

4. 5.

Record saved and displayed in data grid view


Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view

Nil Nil

6.

Nil

7.

Click Delete button to delete selected record

Selected record deleted and cannot be viewed in data grid view

Selected record deleted and cannot be viewed in data grid view

Nil

General Observations Users can add, delete and edit the record. User must have logged in using correct username and password. Record edited or added will be displayed in data grid view. Record deleted will vanish from data grid view.

2.6 Test Case 6


Test Case No Functionality Description 6
Enter / Update / Delete new record into Scale Table

This module is related to the addition of new record, updating the existing record and deleting the existing record from the existing table of Scale. The user will log in and will press Scale button to display Scale Form.

Test Results No Input 1. User will login using login info 2. Click the Scale 3.

Expected Output Login Scale form opens


Save button enabled and fields to be entered appear at bottom of form Record saved and displayed in data grid view Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view Selected record 62

Observed Output
Login

Discrepancy Nil Nil Nil

Detail button Click New button to enter new record Click save button to save the record Click Edit button to edit some existing record

Scale form opens


Save button enabled and fields to be entered appear at bottom of form

4. 5.

Record saved and displayed in data grid view


Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view Selected record

Nil Nil

6. 7.

Click Update button to update the edited record Click Delete

Nil Nil

button to delete selected record

deleted and cannot be viewed in data grid view

deleted and cannot be viewed in data grid view

General Observations Users can add, delete and edit the record. User must have logged in using correct username and password. Record edited or added will be displayed in data grid view. Record deleted will vanish from data grid view.

2.7 - Test Case 7


Test Case No Functionality Description 7
Enter / Update / Delete new record into Department Table

This module is related to the addition of new record, updating the existing record and deleting the existing record from the existing table of Department. The user will log in and will press Department button to display Department Form. Expected Output Login Department record form opens
Save button enabled and fields to be entered appear at bottom of form Record saved and displayed in data grid view Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view Selected record deleted and cannot 63

Test Results No Input 1. User will login using login info 2. Click the 3.

Observed Output
Login

Discrepancy Nil Nil Nil

Department button Click New button to enter new record Click save button to save the record Click Edit button to edit some existing record Click Update button to update the edited record Click Delete button to delete

Department record form opens


Save button enabled and fields to be entered appear at bottom of form

4. 5.

Record saved and displayed in data grid view


Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view Selected record deleted and cannot

Nil Nil

6. 7.

Nil Nil

selected record

be viewed in data grid view

be viewed in data grid view

General Observations Users can add, delete and edit the record. User must have logged in using correct username and password. Record edited or added will be displayed in data grid view. Record deleted will vanish from data grid view.

2.8 - Test Case 8


Test Case No Functionality Description 8
Enter / Update / Delete new record into Supplier Table

This module is related to the addition of new record, updating the existing record and deleting the existing record from the existing table of Supplier. The user will log in and will press Supplier button to display Supplier Form.

Test Results No Input 1. User will login using login info 2. Click the 3.

Expected Output Login Supplier form opens


Save button enabled and fields to be entered appear at bottom of form Record saved and displayed in data grid view Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view Selected record deleted and cannot be viewed in data 64

Observed Output
Login

Discrepancy Nil Nil Nil

Supplier button Click New button to enter new record Click save button to save the record Click Edit button to edit some existing record

Supplier form opens


Save button enabled and fields to be entered appear at bottom of form

4. 5.

Record saved and displayed in data grid view


Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view Selected record deleted and cannot be viewed in data

Nil Nil

6. 7.

Click Update button to update the edited record Click Delete button to delete selected record

Nil Nil

grid view

grid view

General Observations Users can add, delete and edit the record. User must have logged in using correct username and password. Record edited or added will be displayed in data grid view. Record deleted will vanish from data grid view.

2.9 - Test Case 9


Test Case No Functionality Description 9
Enter / Update / Delete new record into Employee Table

This module is related to the addition of new record, updating the existing record and deleting the existing record from the existing table of Employee. The user will log in and will press Employee button to display Employee Form.

Test Results No Input 1. User will login using login info 2. Click the Batch 3.

Expected Output Login Employee form opens


Save button enabled and fields to be entered appear at bottom of form Record saved and displayed in data grid view Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view Selected record deleted and cannot be viewed in data grid view 65

Observed Output
Login

Discrepancy Nil Nil Nil

Detail button Click New button to enter new record Click save button to save the record Click Edit button to edit some existing record Click Update button to update the edited record Click Delete button to delete selected record

Employee form opens


Save button enabled and fields to be entered appear at bottom of form

4. 5.

Record saved and displayed in data grid view


Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view Selected record deleted and cannot be viewed in data grid view

Nil Nil

6. 7.

Nil Nil

General Observations Users can add, delete and edit the record. User must have logged in using correct username and password. Record edited or added will be displayed in data grid view. Record deleted will vanish from data grid view.

2.10 - Test Case 10


Test Case No Functionality Description 10
Enter / Update / Delete new record into Medicine Table

This module is related to the addition of new record, updating the existing record and deleting the existing record from the existing table of Medicine. The user will log in and will press Medicine button to display Medicine Form.

Test Results No Input 1. User will login using login info 2. Click the 3.

Expected Output Login Medicine form opens


Save button enabled and fields to be entered appear at bottom of form Record saved and displayed in data grid view Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view Selected record deleted and cannot be viewed in data grid view 66

Observed Output
Login

Discrepancy Nil Nil Nil

Medicine button Click New button to enter new record Click save button to save the record Click Edit button to edit some existing record Click Update button to update the edited record Click Delete button to delete selected record

Medicine form opens


Save button enabled and fields to be entered appear at bottom of form

4. 5.

Record saved and displayed in data grid view


Update button enabled and selected data appears in fields at bottom of form Data edited and displayed in data grid view Selected record deleted and cannot be viewed in data grid view

Nil Nil

6. 7.

Nil Nil

General Observations Users can add, delete and edit the record. User must have logged in using correct username and password. Record edited or added will be displayed in data grid view. Record deleted will vanish from data grid view.

67

CHAPTER 7 DATA FLOW DIADRAM


7.1 - Definition

68

Data Flow Diagram


Customer Buying Sales

Department Ordering

Inventory Monitoring

Purchase Order Chemical Receiving

Process Order

Inventory Checking

Transportation

Supplier

Delivery

Inventory Packaging

Delivery Order

69

CHAPTER 7 RISK ANALYSIS


6.1 - Introduction
Despite much research and progress in the area of Software Project Management, software development projects still are not achieving the target of delivering desired systems on time, within the available financial resources and desired quality. Much of the failure in achieving those targets could be avoided by managers proactive planning for dealing with risk factors rather than waiting for problems to occur and then trying to react on the time of occurrence. Usually this reaction is too little and too late, because by the time the problem is fully recognized, the schedule has already been disturbed, a considerable amount of resources has been utilized, and the product quality has suffered due to introduction of errors. Risk management has been proposed as a solution to for overcoming errors appeared insight into potential problem areas and to identify these problems, address and eliminate them before they can create any problems in the project. In order to implement a successful risk management program, project managers need tools to help them reduce risks. Risk Management helps project managers in identifying risks in earlier phases of the project cycle, defining risks in earlier phases of the project cycle and defining risk containment actions. The system should support Risk Assessment during the initial phase of the development as well as during project delivery phase. A good measurement program helps managers: Communicate unambiguously throughout the organization. Identify and correct technical and management problems by focusing on early discovery of errors. Make key tradeoffs by assessing the impact of decision.
70

Defend and justify decisions by providing data to explain how issues are prioritized and managed. Using these as the evaluation criteria a detailed search and evaluation of the Risk

Management System available in the industry was made.

6.2 - Purpose
It identifies risks which may occur in the project, defines roles and responsibilities for participants in the risk management process, the risk management activities that will be carried out, the schedule and budget for risk management activities and tools and techniques that will be used during this process.

- Roles and Responsibilities


6.3.1 - Project manager The project manager will assign a Risk Officer to the project, and identify this individual on the projects organization chart. The Project Manager and other members of the Project Management team will meet every week to review the status of all risk resolving efforts, review the exposure assessments for any new risk items, and redefine the projects Top Ten Risk List. 6.3.2 - Software Quality Assurance involvement The Project Manager and other members of the project will check about the quality of the project and will assign role for each member of the team for making quality assured software 6.3.3 - Risk Officer The Risk officer has the following responsibilities and authorities: Coordinating between risk identification and analysis activities

71

Maintaining the projects risk list Notifying project management of the new risk items discovered Reporting risk resolution status to management The Risk Officer should normally not be the project Manager. 6.3.4 - Project Member Assigned a Risk The Risk Officer will assign each newly identified risk to any member of the project, who will assess the exposure and probability for the risk factor and report the results of that analysis back to the Risk Officer. Project members who have assigned the responsibilities for performing the steps of the mitigation will report progress about the risk mitigation to the Risk Officer biweekly.
6.3 -

Risk Documentation

6.4.1 - Risk List The risk factors identified and managed for this project will be accumulated in a risk list. The Risk list contains the following items:
1.

Personal Risk. Unrealistic schedules and budgets. Developing wrong software solution. Developing wrong user interface. 5. Continuing streams of requirement changes. 6. Shortfall in extremely furnished components. 7. Shortfall in externally performed tasks. 8. Real time performance shortfall. 9. Wrong assessment of requirements.
72

2. 3. 4.

The ten risk items that currently have the highest estimated risk exposure are referred to as the project's Top Ten Risk List. 6.4.2 - Risk Data Items The following information will be stored for each project risk: Risk ID Classification Description Probability Impact Risk Exposure First Indicator That risk is becoming a problem Mitigation approaches Owner Date due Contingency plan Contingency plan trigger

6.4.3 - Closing Risk A risk item can be considered closed when it meets the following criteria: The planned lessening actions have been completed and the estimated risk exposure of probability time's impact is less than 2.
73

6.4.4 - Activities Task Participants State the techniques that will be used to identify risk factors at the Risk Officer beginning of the project and on an on-going basis. This may involve a formal risk assessment workshop, a brainstorming session, and interviews at the beginning of each life cycle phase. Describe any consolidated lists of risk items that will be used to identify candidate risks for this project. The Risk Officer will assign each risk factor to an individual Assigned project member, who will estimate the probability the risk could Project become a problem and the impact this risk on either scale of units Member of dollars or schedule days, as indicated by the Risk Officer) The individual analyzed risk factors are collected, reviewed, and Risk Officer adjusted if necessary. The list of risk Factors are sorted by descending risk exposure. The top ten risks, or those risk factors having an estimated exposure Risk Officer greater than <state exposure. Threshold> are assigned to individual project members for development and execution of a risk mitigation plan. For each assigned risk factor, recommend actions that will reduce Project Members either the probability of the risk materializing into a problem, or the severity of the exposure if it does. Return the mitigation plan to the Risk Officer. The mitigation plans for assigned risk items are collected into a Risk Officer single list. The completed Top Ten Risk List is created and made available for the management. Each individual who is responsible for executing a risk mitigation Assigned plan carries out the mitigation activities Individual

74

Constructive Cost Model (COCOMO)

Risk Officer

The status and effectiveness of each mitigation action is reported Assigned to the Risk Officer every two weeks. Individual

The probability and impact for each risk item is reevaluated and Risk Officer modified if appropriate for risk management. If any new risk items have been identified, they are analyzed as Risk Officer were the items on the original risk list and added to the risk list. The Top Ten Risk List is regenerated based on the updated Risk Officer probability and impact for each remaining risk. Any risk factors for which mitigation actions are not being Risk Officer effectively carried out, or whose risk exposure is rising, may be escalated to an appropriate level of management for visibility and action. If the project will be storing lessons learned about mitigation of Risk Officer specific risks in a database, describe that database and process here and indicate the timing of entering risk-related lessons into the database.

75

CHAPTER 7 TOOLS AND TECHNOLOGY


7.1 - SQL Server
7.1.1 - Introduction Microsoft SQL Server is a relational model database server produced by Microsoft. Microsoft SQL Server is the tool of choice for many corporate environments because it is a commercial database server. Its core role in the commercial world is to store data which is slightly different to Microsoft Access. Microsoft SQL Server allows you to store large volumes of data which include items like photographs, video, text, numbers and much more. 7.1.2 - Data storage The main unit of data storage is a database, which is a collection of tables with typed columns. SQL Server supports different data types, including primary types such as Integer, Float, Decimal, Char (including character strings), Varchar (variable length character strings), Text (for textual data) among others. 7.1.3 - SQL CLR Microsoft SQL Server 2005 includes a component named SQL CLR ("Common Language Runtime") via which it integrates with .NET Framework. When writing code for SQL CLR, data stored in SQL Server databases can be accessed using the ADO.NET APIs (An application programming interface, API is a particular set of rules and specifications that software programs can follow to communicate with each other. It serves as an interface between different software programs and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers like any other managed application that accesses SQL Server data.
76

7.1.4 - Reporting Services SQL Server Reporting Services is a report generation environment for data gathered from SQL Server databases. Reports are created as RDL (Report Definition Language) files. Reports can be designed using recent versions of Microsoft Visual Studio (Visual Studio.NET 2003, 2005, and 2008) installed or with the included Report Builder. Once created, RDL files can be rendered in a variety of formats including Excel, PDF etc. 7.1.5 - SQL Server and Visual Studio Microsoft Visual Studio includes native support for data programming with Microsoft SQL Server. It can be used to write and debug code to be executed by SQL CLR. It also includes a data designer that can be used to graphically create, view or edit database schemas. Queries can be created either visually or using code. 7.1.6 - When Should You Use Microsoft SQL Server Over Microsoft Access? Some of the reasons why IT Departments do not want Microsoft Access in their environments are quite valid. For example, the use of Access Databases in high security areas such as in the Education Department for storing student information, Department of Defense systems, Hospitals storing patient data are all valid reasons why data should not be stored in a Microsoft Access Database. However, one of the key advantages that Microsoft Access has is the ability to build a software system to manage a range of services very quickly. The downside is that Microsoft Access on its own is very un-secure and can easily be lifted without any trace using a USB Stick or CDROM. But there are ways to secure Microsoft Access and to prevent data from being lifted. Microsoft SQL Server is the tool of choice for many corporate environments because it is a commercial database server. Its core role in the commercial world is to store data which is slightly different to Microsoft Access. Microsoft Access whilst it is a
77

database, it is more so a database management system that allows you to build a fully interactive user interface that allows users to enter data and report on data where as Microsoft SQL Server simply stores the data within tables. It doesnt have the ability to provide you with a front-end like Microsoft Access. Microsoft SQL Server allows you to store large volumes of data which include items like photographs, video, text, numbers and much more. Microsoft Access can do that too but Microsoft Access has very defined limits. Microsoft SQL Server is designed to handle terra bytes worth of data where as Microsoft Access can only hand around 1 Gigabyte of data without having issues.

7.2 - Visual Studio


7.2.1 - Introduction Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It can be used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native codes together with managed code for all platforms supported by Microsoft Windows, Windows Mobile, Windows CE and .NET Framework. Visual Studio includes a code editor supporting IntelliSense as well as code refactoring. Other built-in tools include a forms designer for building GUI applications, web designer, class designer, and database schema designer. Visual Studio supports different programming languages by means of language services, which allow the code editor and debugger to support (to varying degrees) nearly any programming language, provided a language-specific service exists. Built-in languages include C/C++, VB.NET and C#.

78

7.2.2 - Capabilities Following are some of the various applications that can be built using Visual Studio.

Console applications: These applications run from the command line and do not include a graphical interface, but are great for small tools or anything that will be run by another application.

Windows forms applications: These are Windows desktop applications written using the .NET framework; since they are .NET applications, they require that the .NET framework be on any computer that will run the application.

Windows services: Services are applications that run in the background while your computer is running. These are usually applications that will have to perform scheduled tasks or handle continuous network requests.

ASP.NET applications: ASP.NET is a powerful technology that is used to create dynamic web applications, often driven by a database. Many popular websites are written using ASP.NET.

ASP.NET web services: ASP.NET provides a complete web services model that allows you to quickly and easily create web services.

Windows Mobile applications: Windows Mobile applications can run on devices that include the Compact framework; these include Pocket PC devices, as well as cell phones running the Microsoft Smartphone platform.

Visual Studio add-ins: That's right, you can use Visual Studio to write new functionality to be added into Visual Studio.

And more: Visual Studio also includes projects to deploy your application, work with databases, create reports, and more.
79

Visual Studio provides an extensible model for adding new projects to Visual Studio; many other Microsoft applications now integrate directly into the IDE. Some of the most common include SQL Server Reporting Services and Visual Studio Tools for Office. 7.2.3 -Features Visual Studio is dedicated to making your development life easier through timesaving and convenient features; here are some of the most compelling of those features.

IntelliSense: IntelliSense is the trademark feature of Visual Studio. IntelliSense simply helps you while programming by showing you the available classes and the methods and properties available on those classes.

Designers: Visual Studio includes visual WYSIWYG designers for Windows applications, ASP.NET applications, and Windows Mobile applications. These designers make it much easier to get your application looking just right.

Debugging: One of the most important features of Visual Studio is the ability to step through your application line by line as it is executing.

7.3 - VB.NET
Visual Basic .NET (VB.NET) is an object-oriented computer programming language that can be viewed as an evolution of the classic Visual Basic (VB) which is implemented on the .NET Framework. Microsoft currently supplies two major implementations of Visual Basic: Microsoft Visual Studio, which is commercial software and Microsoft Visual Studio Express, which is free of charge. Visual Studio .NET is a complete set of development tools for building ASP Web applications, XML Web services, desktop applications, and mobile applications. Visual Basic .NET, Visual C++ .NET, Visual C# .NET, and Visual J# .NET all use the same

80

integrated development environment (IDE), which allows them to share tools and facilitates in the creation of mixed-language solutions.

7.4 - The .NET Framework


Microsoft .NET (pronounced dot net) is a software component that runs on the Windows operating system. .NET provides tools and libraries that enable developers to create Windows software much faster and easier. .NET benefits end-users by providing applications of higher capability, quality and security. The .NET Framework must be installed on a users PC to run .NET applications. This is how Microsoft describes it: .NET is the Microsoft Web services strategy to connect information, people, systems, and devices through software. Integrated across the Microsoft platform, .NET technology provides the ability to quickly build, deploy, manage, and use connected, security-enhanced solutions with Web services. .NETconnected solutions enable businesses to integrate their systems more rapidly and in a more agile manner. 7.4.1 - What is the .NET architecture? Microsoft .NET consists of four major components:

Common Language Specification (CLS) Framework Class Library (FCL) Common Language Runtime (CLR) .NET Tools

7.4.1.1 - Common Language Specification (CLS) The CLS is a common platform that integrates code and components from multiple .NET programming languages. In other words, a .NET application can be written in multiple programming languages with no extra work by the developer (though converting code between languages can be tricky).

81

7.4.1.2 - Framework Class Library (FCL) The FCL is a collection of over 7000 classes and data types that enable .NET applications to read and write files, access databases, process XML, display a graphical user interface, draw graphics, use Web services, etc. 7.4.1.3 - Common Language Runtime (CLR) The CLR is the execution engine for .NET applications and serves as the interface between .NET applications and the operating system. The CLR provides many services such as:

Loads and executes code Converts intermediate language to native machine code Separates processes and memory Manages memory and objects Enforces code and access security Handles exceptions Provides type-checking Provides code meta data (Reflection) Provides profiling, debugging, etc.

82

7.4.2 - .NET Tools Visual Studio .NET is Microsofts flagship tool for developing Windows software. Visual Studio provides an integrated development environment (IDE) for developers to create standalone Windows applications, interactive Web sites, Web applications, and Web services running on any platform that supports .NET. In addition, there are many .NET Framework tools designed to help developers create, configure, deploy, manage and secure .NET applications and components. 7.4.2.1- Interoperability Because computer systems commonly require interaction between new and older applications, the .NET Framework provides means to access functionality that is implemented in programs that execute outside the .NET environment. 7.4.2.2 - Language Independence The .NET Framework introduces a Common Type System, or CTS. The CTS specification defines all possible data types and programming constructs supported by the CLR and how they may or may not interact with each other conforming to the Common Language Infrastructure (CLI) specification. Because of this feature, the .NET Framework supports the exchange of types and object instances between libraries and applications written using any conforming .NET language. 7.4.2.3 - Base Class Library The Base Class Library (BCL), part of the Framework Class Library (FCL), is a library of functionality available to all languages using the .NET Framework. The BCL provides classes which encapsulate a number of common functions, including file reading and writing, graphic rendering, database interaction, XML document manipulation and so on.

83

7.4.2.4 - Simplified Deployment The .NET Framework includes design features and tools that help manage the installation of computer software to ensure that it does not interfere with previously installed software, and that it conforms to security requirements. 7.4.3 - Common Language Infrastructure (CLI) The purpose of the Common Language Infrastructure is to provide a languageneutral platform for application development and execution, including functions for Exception handling, Garbage Collection, security, and interoperability. By implementing the core aspects of the .NET Framework within the scope of the CLI, this functionality will not be tied to a single language but will be available across the many languages supported by the framework. Microsoft's implementation of the CLI is called the Common Language Runtime, or CLR. 7.4.4 - Memory management The .NET Framework CLR frees the developer from the burden of managing memory (allocating and freeing up when done); instead it does the memory management itself even though there are no actual guarantees as to when the Garbage Collector will perform its work, unless an explicit double-call is issued. To this end, the memory allocated to instantiations of .NET types (objects) is done contiguously from the managed heap, a pool of memory managed by the CLR.

7.5 - ADO.NET
ADO.NET (ActiveX Data Object for .NET) is a set of computer software components that programmers can use to access data and data services. It is a part of the base class library that is included with the Microsoft .NET Framework. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also access data in non-relational sources. ADO.NET is sometimes considered an evolution of ActiveX Data Objects (ADO) technology, but was changed so extensively that it can be considered an entirely new product.

84

7.5.1 - ADO.NET and Visual Studio Functionality exists in the Visual Studio IDE to create specialized subclasses of the Dataset classes for a particular database schema, allowing convenient access to each field through strongly typed properties. This helps catch more programming errors at compiletime and makes the IDE's Intellisense feature more beneficial. ADO.NET provides consistent access to data sources such as Microsoft SQL Server, as well as data sources exposed through OLEDB and XML. Data-sharing consumer applications can use ADO.NET to connect to these data sources and retrieve, manipulate, and update data. 7.5.2 - ADO Features Support Free threading-ADO supports multiple client connections through multiple threads in such a way that these threads dont interfere with each other. Support asynchronous queries. This basically means that after

an SQL query is submitted to the data base server, the control then immediately returns to the calling application, allowing the user to complete the query, the results are then sent to the client. Support client side and server side cursors Cursor is a

mechanism that allows access a navigation of the data in a record set. They are implemented as a client side or a server side. Traditionally, frequently updated record set is implemented as a server side while read only record set is implemented as a client side. Support disconnected record set After a record set is returned

on execution of a query, it is stored as a client side cursor and the active connection is closed. After changes have been committed to the record set the connection is re-established and all updates are sent in a batch to the data store. This helps in reducing network traffic in a great extent.

85

Support commands as a common method The unique feature

of ADO is that when a command is executed, a connection is first established internally before that commands get submitted for execution. Compare this to a traditional object model like DAO/RAO where a connection has to establish explicitly before a command can be submitted.
7.5.3 - ADO Architecture

In the ADO model there are five objects Connection Command Record set Record Stream

The connection object sets up the connection to the data source. First the data source name, its location, user id, password is stored in a connection string object, which is passed to the connection object to establish connection to the data source. The command button is used to execute the SQL commands, queries and stored procedures. When a query is executed it returns results that are stored in the Record set object. Data in a record set is manipulated and then updated to the database. Records allow you to handle data kept in semi structured storage (such as files in a directory structure) as though they were record in a database. The stream object is used to access the contents of the node, such as an Email message, or a web page.
86

87

You might also like