0% found this document useful (0 votes)
78 views

Data Base Lab Assignment

The document describes the requirements and entity relationship diagram for a semester project on a medicine inventory management system. It outlines the following key details: - The software development life cycle model most suitable for the project is waterfall as it allows for thorough planning and documentation. - The main entities are Orders, Medicines, Prescriptions, Pictures, Payments, and Staff. The attributes and relationships between these entities are defined. - The functional requirements specify fields for each entity like medicine names, prices, expiration dates, doctor details, payment status etc. along with the relationships between entities. - Non-functional requirements include system security, performance, and external constraints that must be met.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views

Data Base Lab Assignment

The document describes the requirements and entity relationship diagram for a semester project on a medicine inventory management system. It outlines the following key details: - The software development life cycle model most suitable for the project is waterfall as it allows for thorough planning and documentation. - The main entities are Orders, Medicines, Prescriptions, Pictures, Payments, and Staff. The attributes and relationships between these entities are defined. - The functional requirements specify fields for each entity like medicine names, prices, expiration dates, doctor details, payment status etc. along with the relationships between entities. - Non-functional requirements include system security, performance, and external constraints that must be met.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

COMSATS UNIVERSITY

ISLAMABAD, SAHIWAL CAMPUS

DEPARTMENT OF COMPUTER
SCIENCE

SUBMITTED TO:
Sir Shoaib

SUBMITTED BY:
Muhammad Usama Masood

COURSE TITLE:
DATA BASE SYSTEMS I (LAB)

REGISTRATION NO:
SP-20-BCS-033 (A)

ASSIGNMENT NO:
3
DATE OF SUBMISSION:
Question No 1:

Database Systems provides the frameworks to design and develop software


applications to manage the business or any organization at any level. Explains the
entity relationship of following case studies:
- Hospital Management System
- Airport Management System
- Banking Management System

ANSWER:
A. Hospital Management System:
Hospital management system is a computer system that helps manage the information
related to health care and aids in the job completion of health care providers
effectively. They manage the data related to all departments of healthcare such as,
Clinical. Financial

The main entities of the Hospital Management System are Hospitals, Patient, Doctors,
Nurses, Appointments and Medicines.

B. Entity Relation-ship Diagram:

C. Airport Management System:


 The airline has one or more airplanes.
 An airplane has a model number, a unique registration number, and the capacity
to take one or more passengers.
 An airplane flight has a unique flight number, a departure airport, a destination
airport, a departure date and time, and an arrival date and time.
 Each flight is carried out by a single airplane.
 A passenger has given names, a surname, and a unique email address.
 A passenger can book a seat on a flight.
A passenger can book any number of flights, while a flight can be booked by any
number of passengers. As discussed earlier in Intermediate Entities,” we could specify
an M:N Books relationship between the Passenger and Flight relationship, but
considering the issue more carefully shows that there is a hidden entity here: the
booking itself. We capture this by creating the intermediate entity Booking and 1:N
relationships between it and the Passenger and Flight entities. Identifying such entities
allows us to get a better picture of the requirements.
D. Entity Relation-ship Diagram:

E. Banking Management System:

Entities and their Attributes are : Bank Entity : Attributes of Bank


Entity are Bank Name, Code and Address. Code is Primary Key for Bank Entity.
Customer Entity : Attributes of Customer Entity are Customer_id, Name, Phone
Number and Address.
ER diagram of Bank has the following description :
 Bank have Customer.
 Banks are identified by a name, code, address of main office.
 Banks have branches.
 Branches are identified by a branch_no., branch_name, address.
 Customers are identified by name, cust-id, phone number, address.
 Customer can have one or more accounts.
 Accounts are identified by acc_no., acc_type, balance.
 Customer can avail loans.
 Loans are identified by loan_id, loan_type and amount.
 Account and loans are related to bank’s branch.

F. Entity Relation-ship Diagram:

Question No 2:

The software development life cycle contains multiple stages to design, build and test
the application. Describe following for your semester project.
- Project Detailed level Requirements.
- Entity relationships and constraints
- Best suitable SDLC model
- Project Architectural design

ANSWER:
a) Software Development Life Cycle:
Software Development Life Cycle is the utilization of standard strategic policies to
building programming applications. It's regularly separated into six to eight stages:
Planning, Requirements, Design, Build, Document, Test, Deploy, Maintain. Some
undertaking directors will consolidate, split, or overlook steps, contingent upon the
task's extension.
b) Project Detailed level Requirements:

 Non-functional of the medicine inventory management system needs:


Unit of measurement usually divided into 2 main categories:

Execution qualities, like security and quality, that unit evident at the runtime.

Non-functional  of the medicine inventory management system needs place


restrictions on the merchandise being developed, the event technique, and specify
external constraints that the merchandise has to be compelled to meet the requirement.

 Functional requirements of medicine inventory management system:-


The functional requirements are those requirements which are necessary to the eye of the user and
the client. Here we try to make the module possible to accomplish the need of the desired
function.

 Entity Order:
 Primary Key Order_id:
This is system generated and unique, which can be referenced in any other entity.

 Foreign Key Medicine_id:


This is reference key from the other entity to link the data of that table.It is system
generated unique identity number. This used to uniquely identify every table in the
database and perform the crud operation on it.

 No of medicines:
The no of the user needs to buy is here

 Quantity:
the quantity per medicine is here

 Price per medicine:


Price per medicine according to the quantity is given here

 Discount:
If any discount they are offering is eligible is counted here

 Tax:
The taxes are added here

 Grand Total:
the total of the medicines is given here.
 Entity Medicine:
 Primary Key Medicine_id:
This is system generated and unique, which can be referenced in any other entity.

 Name:
The name of the medicine is given here

 Manufacture date:
The date at which it was manufactured.

 Expiry date:
The date at which it will get expired.

 M r p:
The market price is printed here.

 Formula content:
The content of the medicine which is comprised of is given here.

 Used for:
For what purpose the medicine is given for.

 Dosage:
No of dosage per day was given is noted down here.

 Entity Prescription:
 Primary Key Prescription_id:
This is system generated and unique, which can be referenced in any other entity.

 Foreign Key User_id:


This is reference key from the other entity to link the data of that table.It is system
generated unique identity number. This used to uniquely identify every table in the
database and perform the crud operation on it.

 Medicines:
Medicines are noted down here more than one is here.

 Disease:
The disease for which the medicine is prescribed is given here with reason

 Doctor name:
who issued the prescription the doctor name will come here.

 Doctor qualification:
The doctor’s degree of education is here written.

 Foreign Key Pic_id:


This is reference key from the other entity to link the data of that table.It is system
generated unique identity number. This used to uniquely identify every table in the
database and perform the crud operation on it.

 Entity Pic:
 Primary Key Pic_id:
This is system generated and unique, which can be referenced in any other entity.

 Name:
Name of the pic

 Length:
length of the pic

 Width:
The width of the pic

 Size:
Size in m b is given here

 Doctor name:
name of the doctor is given here.

 Foreign Key User_id:


This is reference key from the other entity to link the data of that table.It is system
generated unique identity number. This used to uniquely identify every table in the
database and perform the crud operation on it.

 Entity Payment:
Primary Key Payment_id:
This is system generated and unique, which can be referenced in any other entity.

 User_id:
This is reference key from the other entity to link the data of that table.It is system
generated unique identity number. This used to uniquely identify every table in the
database and perform the crud operation on it.

 Prescription_id_id:
This is reference key from the other entity to link the data of that table.It is system
generated unique identity number. This used to uniquely identify every table in the
database and perform the crud operation on it.

 Status:
Is the payment is done or not is given here.

 Entity Staff:
Primary KeyStaff_id:
This is system generated and unique, which can be referenced in any other entity.

 Staff name:
Staff name is taken from the user and fed into this it is properly validated so that no
mistake happens.

 Qualification:
qualification is taken as to filter the events according to this so that user does not need
to filter out the events to register it makes this system more reliable and useful.

 Number:
The phone number is taken here to keep the member updated and for the confirmation
of the event is also managed through this method.

 Email:
email is taken to make member aware of new offers new events and for future
reference, it is also relevant.

 Type:
the type of user is mentioned here like is he a student, teacher or he is the vendor of
any shop. According to this data, the discounts offers and other things are decided
plus few other things of adjusting the task of the user also with this.

 Address:
The location of the user is also mentioned here to make it easy to the delivery and few
other things too.

 EntityUser:-
User data have to be saved in this entity and all fields are required for this purpose
which taken from the user .proper validation is checked and the attributes are as
follows:

 Primary KeyUser_id:
This is system generated and unique, which can be referenced in any other entity.

 Username:
Username is taken from the user and fed into this it is properly validated so that no
mistake happens.

 Qualification:
qualification is taken as to filter the events according to this so that user does not need
to filter out the events to register it makes this system more reliable and useful.

 Number:
The phone number is taken here to keep the member updated and for the confirmation
of the event is also managed through this method.

 Email:
email is taken to make member aware of new offers new events and for future
reference, it is also relevant.

 Type:
the type of user is mentioned here like is he a student, teacher or he is the vendor of
any shop. According to this data, the discounts offers and other things are decided
plus few other things of adjusting the task of the user also with this.

 Address:
The location of the user is also mentioned here to make it easy to the delivery and few
other things too.

Entity Admin:
 Primary key admin:
This is the main supervisor of all task happening in the system for long. It is system
generated unique identity number. This used to uniquely identify every table in the
database and perform the crud operation on it.

It is used to reference that table to any other table or any interface to show the data of
it and support other entities. It has all the power to make changes in the field of other
tables. I grant the privileges to other users of the system that what kind of operations
they can perform.
 Logs:
The logs are saved here to analyze the system accordingly. The changes occur. For
necessary changes.

 Password:
A Strong password is recommended for this account as no one wants to get hacked
and lose the sophisticated data.

 Description:
Any important info. Regarding this account is attributed in this.

c) Entity relationships:
ER relation ship are described already in the assignment.

d) Best suitable SDLC model:


Software development process model is the abstract representation process which
serves as the basis for planning, organizing, coordinating, budgeting and directing a
software development.
All models follow the basic foundation as follows:
Planning:
This is the initial evaluation of the software to be developed or in most cases; it is an
attempt to upgrade an existing system
Requirement Analysis and Specification:
In this stage, the problem the new system is identified; its operational capabilities are
defined and the resources needed for the system and maintenance goals are set.
Functional Specification or Prototyping:
The computational aspect, relation and attributes of the software system are
identified. Also, the operations that will transform these objects along with the
constraints of the system behaviors are considered at this point.
Architectural Design and Configuration Specification:
The interconnection between all the component and modules of the system are
defined in such a way that they meet the detailed design.
Detailed Component Design Specification:
This is the stage in which the modules of the defined component are transformed
from required inputs into provided outputs.
Component Implementation and Debugging:
Codifies the preceding specifications into Operational source code implementations
and validates their basic operation.
Software Integration and Testing:
This is the stage where integrity of the software system configuration is tested and
verified for consistency and completeness. All developed modules, interfaces and
resources are verified against their specification.
Documentation Revision and System Delivery:
At this stage, the technical know-how of the developed soft-ware system is
documented as user’s guides.
Deployment and Installation:
Installation of the software system into local computing environment, operating
systems configuration and diagnostic test cases to ensure the workability of the
system is done at this stage.
Training and Use:
Providing training support for the users of the software system is as important as the
development of the software system itself, since the user of the system needs to have a
good under-standing of the system itself.
Software Maintenance:
Maintaining the system in the environment in which it is created for is also an
important aspect that must be taken into consideration.

e) Project Architectural design:

Question No 3:

Developing software applications needs to analyze the legacy systems as well as


collecting new requirements to make effective and efficient design. Implement
following with additional features at table and attribute level:
- Event Management System
- Restaurant Management System
- Ecommerce Management System

ANSWER:
Event Management System:

The data model consists of three main subject areas:

 Events and partners


 Shows, performers and equipments
 Employees

 Show_Id and Equipment_Id – Refers to the related show and


equipment. This pair forms the UNIQUE key of the table.
 quantity – The quantity of that equipment needed.
 Cost_planned and Cost_Actual – What we expect to pay for installing
or renting equipment and what we actually paid.

 Event_Name – The name of an event. It’s not UNIQUE because we


may have two or more events with the same name – e.g. a concert by
the same band would have the same event name. However,
the Event_Name – Start_Time pair should be UNIQUE.
 Event_Type_Id  – References the Event_Type dictionary.
 Event_Location – Describes the location where the event will take
place. Using a descriptive attribute lets us avoid building a more
complex model with tables like “country” and “city” and attributes
like “address” and “description”.
 Event_Description – A detailed description of the event and all shows
or activities associated with it. For a concert, this is where we would
store info on the opening act, the main act, any additional
entertainers, and the performance order.
 Start_Time – When the event will start. It’s mandatory because we
should know this in the planning phase.
 End_Time – When the event ends. We could use this attribute to store
the expected or actual event end time. Since we may not know this
exact time in advance (e.g. if a sports game goes into overtime), this
attribute is optional.
Restaurant Management System:
E-Commerce Management System:

Some of the tables and attributes:

Suppliers(Supplier_Id, Supplier_Address,Supplier_City, Supplier_State,


Supplier_Phone, Supplier_ country, Supplier_Fax, Supplier_Email )

OrderDetails (Order_Id, Order_Number, Order_Price, Order_Quantity,


Order_discount, Order_Total, Order_Date)

Shipper (Shipper_Id, Shipper_CompanyName, Shipper_Phone, Shipper_


Email)

Payment (Payment_ID, Payment_Number, Payment_Allowed)

Category (Category_Id, Category_Name, Category_description, Category_pic,


Category_Active)
Question No 4:

What is your project domain? Make short report on semester project and describe how
design patterns are applying on your project. Your report should be in proper format.
- Introduction
- Problem Statement
- Scope
- Methodology (ERD, UML Class, Sequence, Use Case and Flow chart)
- Tools and techniques

Hint: Take Real time E commerce, Social, sales and utility software applications
scenarios.

ANSWER:
1. My Project Domain:

The core competency of the healthcare system is to provide treatment and care to the
patient. The prime focus has always been towards appointing specialized physicians,
well-trained nurses and medical staffs, well-established infrastructure with advanced
medical equipment, and good quality pharmacy items. But, of late, the focus is driven
towards management side of healthcare systems which include proper capacity
planning, optimal resource allocation, and utilization, effective and efficient inventory
management, accurate demand forecasting, proper scheduling, etc. and may be dealt
with a number of operations research tools and techniques.

2. Report:
In this report , a Markov decision process inventory model is developed for a hospital
pharmacy considering the information of bed occupancy in the hospital. One of the
major findings of this research is the significant reduction in the inventory level and
total inventory cost of pharmacy items when the demand for the items is considered to
be correlated with the number of beds of each type occupied by the patients in the
healthcare system. It is observed that around 53.8% of inventory cost is reduced when
the bed occupancy state is acute care, 63.9% when it is rehabilitative care, and 55.4%
when long-term care. This may help and support the healthcare managers in better
functioning of the overall healthcare system.

3. Introduction:
Equipment inventory is an essential part of an effective health-care technology
management (HTM) system. In order to be effective in assisting with various HTM
activities, the inventory must be updated continually so that it provides at any given
moment a correct look at the status of medical equipment within the health-care
facility.

Update points include initial data collection; as information is updated, such as when
a new piece of equipment arrives or is retired; and during annual inventory audits.
The inventory of medical equipment is used in conjunction with inventories of
additional supportive assets, such as consumables, spare parts, and testing and safety
tools and equipment. Inclusion of equipment in an inventory is decided through a risk-
based analysis in order to ensure appropriate time and resource allocation, and to
eliminate unnecessary work. The health-care facility decides on the level of detail of
data to be included in its inventory, in order to satisfy its own requirements and
according to its own capabilities. Inventory management is done through a paper-
based or computer based system, as determined by the resources available.

4. Problem Statement:

The two basic inventory decisions that managers face are:

 How much additional inventory to order or produce


 When to order or produce it

Although it is possible to consider these two decisions separately, they are so closely
related that a simultaneous solution is usually necessary. Typically, the objective is to
minimize total inventory costs. Total inventory costs typically include holding,
ordering, shortage, and purchasing costs.

In a continuous review system, managers continuously monitor the inventory position.


Whenever the inventory position falls at or below a level R, called the reorder point,
the manager orders Q units, called the order quantity. (Notice that the reorder decision
is based on the inventory position including orders and not the inventory level. If
managers used the inventory level, they would place orders continuously as the
inventory level fell below R until they received the order.) When you receive the
order after the lead-time, the inventory level jumps from zero to Q, and the cycle
repeats

5. Methodology (ERD, UML Class, Sequence, Use Case and Flow chart)

I. ERD:
II. UML:
III. Flow chart:

6. Tools and techniques:

i. Inventory Management Techniques


Economic order quantity.
Minimum order quantity.
ABC analysis.
Just-in-time inventory management.
Safety stock inventory.
FIFO and LIFO.
Reorder point formula.
Batch tracking.
ii. Tools in Inventory Management:
Oracle Database
My SQL
HTML
CSS
BOOTSTARP

You might also like