Computer 12 CH03 Notes
Computer 12 CH03 Notes
Q1. What are the different steps involved in analysis stage while designing a
database?
Ans.
The process of study the current system is called analysis. While designing a
database we must consider the following steps. These steps are used at analysis stage
while designing a database.
• Feasibility study
o A feasibility study is a preliminary study which determines and documents a
database's practicality.
o Before developing a new system it is analyzed that either the new system
economically, technically and operationally feasible or not. The results of this
study includes:
The area of identification and selection of boundaries of the
database.
What is the cost of new system?
How much time is required to complete the system?
What the new system will return?
How much funds are allocated?
Alternate solutions are considered.
The results of this study are used to make a decision whether to
proceed with the project or not.
During this process market analysis is also conducted.
o After the project is selected funds are allocated and planning is started.
[Ch#3] Database Design Process 54 Computer Science Part-II
• Requirements analysis
o Systematic requirements analysis is also known as requirements engineering.
o It is sometimes referred by names such as requirements gathering, requirements
capturing, or requirements specification.
o Requirements must be measurable, testable, related to identified business needs or
opportunities, and defined to a level of detail sufficient for system design.
Conceptually, requirements analysis includes three types of activity:
Eliciting requirements:
The task of communicating with customers and users to determine what their
requirements are?
Analyzing requirements:
Determining whether the stated requirements are unclear, incomplete, ambiguous,
or contradictory, and then resolving these issues.
Recording requirements:
Requirements may be documented in various forms, such as natural-language
documents, use cases, user stories, or process specifications.
• Project planning
o Project planning is part of project management.
o Initially the project scope is defined and the appropriate methods for completing
the project are determined.
o Following this step, the durations for the various tasks necessary to complete the
work are listed and grouped into a work breakdown structure.
o The logical dependencies between tasks are defined using an activity network
diagram that enables identification of the critical path.
o Then the necessary resources can be estimated and costs for each activity can be
allocated to each resource, giving the total project cost. e.g. salaries of
development team, traveling expenses, cost of hardware equipments etc.
o At this stage, the project plan may be optimized to achieve the appropriate
balance between resource usage and project duration to comply with the project
objectives.
• Data analysis
While designing a database it is very important to analyze the data which is required
to be stored in the database. There are three activities in this phase
DFD (Data Flow Diagrams):
o A data flow diagram (DFD) is a graphical representation of the "flow" of data
through an information system.
o A data flow diagram can also be used for the visualization of data processing
(structured design).
[Ch#3] Database Design Process 55 Computer Science Part-II
Decision Tables:
o Decision tables are a precise yet compact way to model complicated logic.
o Decision tables, like if-then-else and switch-case statements, associate conditions
with actions to perform.
Decision Trees:
A decision tree is a decision support tool that uses a graph or model of decisions
and their possible consequences.
Q2. What is data modeling? Also discuss its components / ingredients?
Ans.
Data Modeling
o A representation of real world objects or events and their association is called
model and the identification of data objects and their relationships to other data
objects is called data modeling.
o Data modeling is the first step in database design.
o Data modeling helps us to understand the complexity of the system.
o Designers first create a conceptual model of how data items relate to each other.
o Data modeling involves a progression from conceptual model to logical model to
physical schema.
Ingredients of Data Modeling
1. Entity/Object
o Anything about which we want to store data is called
entity.
o It is participating in the system and it can be a person,
EMPLOYEE
place or an event.
o Entity is represented as a rectangle.
o Name of an entity is in capital letters.
o Each occurrence of an entity is also called an instance of entity. Each instance of
an entity is unique. It is identifiable by the primary key.
2. Attributes
o Attributes are properties of an entity for example an EMPLOYEE has a name,
address, telephone number etc.
Name Address Telephone
EMPLOYEE
Stocks
BOOK BOOK STORE
Sells
Returns
Above figure shows different connections between BOOK and BOOK STORE.
• A BOOK STORE orders BOOK(S)
• A BOOK STORE displays BOOK(S)
• A BOOK STORE stocks BOOK(S)
• A BOOK STORE sells BOOK(S)
• A BOOK STORE returns BOOK(S)
• One to Many:
o One instance of first entity is related to zero, one or may instances of
second entity. e.g. A father can have many children but all children must
have only one father.
• Many to Many:
o One or many instances of first entity are related to one or many instances
of second entity. e.g. a student have many courses to study and similarly a
course can be studied by many students.
[Ch#3] Database Design Process 58 Computer Science Part-II