Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 39

Wachemo University

College of Engineering and Technology


school of Computing and Informatics
Department of Information Technology

Course: System Analysis and Design

Course Code: ITec3061

Course Instructor: Getu Wodeso(MSc)

05/10/202 06:29 AM System Analysis and Design 1


4
Chapter 2

System Design

System Analysis and Design


05/10/202 06:29 AM 2
4
2.1 Logical Database Design

The whole purpose of database design is to accurately represent the data, the relationship
between the data, and the business constraints pertinent to that organization.

Therefore, one can design a database using one or more techniques.

Such a technique is called the E-R model.

Logical design:-is the process of constructing a model of the information used in an enterprise
based on a specific data model (e.g. relational, hierarchical or network, or object), but independent
of a particular DBMS and other physical considerations.

System Analysis and Design


05/10/202 06:29 AM 3
4
2.1 Logical Database Design

It is the process of deciding how to arrange the attributes of the entities in a given business
environment into database structures, such as the tables of a relational database.

The goal of logical database design is to create well-structured tables that properly reflect the
company’s business environment.

System Analysis and Design


05/10/202 06:29 AM 4
4
2.1 Logical Database Design

Logical database design :


deciding how to arrange the attributes of the entities in a given business
environment into database structures, such as the tables of a relational database.
Detailed specifications of data necessary for logical database design are
collected to design system inputs and outputs.
can be driven from the form and report layouts.

System Analysis and Design


05/10/202 06:29 AM 5
4
2.1 Logical Database Design

Logical database design :


deciding how to arrange the attributes of the entities in a given business
environment into database structures, such as the tables of a relational database.
Detailed specifications of data necessary for logical database design are
collected to design system inputs and outputs.
can be driven from the form and report layouts.

models information gathered from business requirements.

It has nothing to do with database creation yet.

System Analysis and Design


05/10/202 06:29 AM 6
4
2.1 Logical Database Design

Example

System Analysis and Design


05/10/202 06:29 AM 7
4
2.1 Logical Database Design

Logical modeling involves gathering information about business processes, business entities
(categories of data), and organizational units.

After this information is gathered, diagrams and reports are produced including entity relationship
diagrams, business process diagrams, and eventually process flow diagrams.

System Analysis and Design


05/10/202 06:29 AM 8
4
2.2 Physical Database Design

Deals with how the data will be stored in the database using suitable DBMS and this design is
generally created by database administrators and developers.

Involves the actual design of a database according to the requirements that were established
during logical modeling.

Deals with the conversion of the logical model or design, into a relational database model.

The implementation of the physical model depends on the hardware and software the company
uses.

The hardware can determine what type of software can be used because software is normally
developed according to common hardware and operating system platforms.

System Analysis and Design


05/10/202 06:29 AM 9
4
Differences between Logical database design and Physical design

Logical Database Design Physical Database Design

 Describes the data without regard to how they  Represents how the actual database is built.
will be physically implemented in the database.

 Defines the data elements and their relationship.  Developing the actual database.

 Simpler than the Physical database design.  Complex than the Logical database design.

System Analysis and Design


05/10/202 06:29 AM 10
4
Functional Dependency

Specifies the relationship between two sets of attributes where one attribute determines the value
of another attribute.

It is denoted as X → Y, where the attribute is set on the left side of the arrow, X is called the
Determinant, and Y is called the Dependent.

Functional dependencies are important because they help ensure data consistency and eliminate
data redundancy in a database.

They are used to define the relationships between tables and to ensure that updates to the database
do not violate the integrity of the data.

05/10/202 06:29 AM 11
4
Functional Dependency

Roll No Name Department Name Dept Building


10 abc CSc 140
11 pqr IT 142
12 xyz IS 140
13 xyz IT 142

From the above table we can conclude some valid functional dependencies:

 Roll No → { Name, Department Name, Dept Building },→ Here, Roll No can determine values of
fields Name, Department Name and Dept Building, hence a valid Functional dependency
 Roll No → Department Name , Since, Roll No can determine whole set of {Name, Department
Name, Dept Building}, it can determine its subset Department Name also.
 Department Name → Dept Building , Department Name can identify the Dept Building accurately,
since departments with different Department Name will also have a different Dept Building
 More valid functional dependencies: Roll No → Name, {Roll No, Name} ⇢ {Department Name,
Dept Building}, etc.
System Analysis and Design
05/10/202 06:29 AM 12
4
Functional Dependency

 Here are some invalid functional dependencies:


 Name → Department Name Students with the same name can have different Department Name, hence
this is not a valid functional dependency.
 Dept Building → Department Name. There can be multiple departments in the same building. For example, in
the above table departments CSc and IS are in the same building 140, hence Dept Building → Department
Name is an invalid functional dependency.
 More invalid functional dependencies: Name → Roll No, {Name, Department Name} → Roll No, Dept
Building → Roll No, etc.

System Analysis and Design


05/10/202 06:29 AM 13
4
Types of Functional Dependencies in DBMS

1) Trivial functional dependency

2) Non-Trivial functional dependency

3) Multivalued functional dependency

4) Transitive functional dependency

System Analysis and Design


05/10/202 06:29 AM 14
4
1. Trivial Functional Dependency

A dependent is always a subset of the determinant. i.e.

If X → Y and Y is the subset of X, then it is called a trivial functional dependency.

roll_no name age

42 abc 17

43 pqr 18

44 xyz 18

Here, {roll_no, name} → name is a trivial functional dependency, since the dependent name is a
subset of determinant set {roll_no, name}.

Similarly, roll_no → roll_no is also an example of trivial functional dependency.

System Analysis and Design


05/10/202 06:29 AM 15
4
2. Non-trivial Functional Dependency

The dependent is strictly not a subset of the determinant.

If X → Y and Y is not a subset of X, then it is called Non-trivial functional dependency.

roll_no name age

42 abc 17

43 pqr 18

44 xyz 18

 Here, roll_no → name is a non-trivial functional dependency, since the name is not a subset of
determinant roll_no.

 Similarly, {roll_no, name} → age is also a non-trivial functional dependency, since age is not a
subset of {roll_no, name}.
System Analysis and Design
05/10/202 06:29 AM 16
4
3. Multivalued Functional Dependency

 Entities of the dependent set are not dependent on each other.

 i.e. If a → {b, c} and there exists no functional dependency between b and c, then it is called a
multivalued functional dependency.

roll_no name age


NB: A table should have at least 3 columns
42 abc 17 for it to have a multi-valued dependency.

43 pqr 18

44 xyz 18

45 abc 19

 Here, roll_no → {name, age} is a multivalued functional dependency, since the dependents name &
age are not dependent on each other(i.e. name → age or age → name doesn’t exist !)
System Analysis and Design
05/10/202 06:29 AM 17
4
4. Transitive Functional Dependency

Dependent is indirectly dependent on determinant.

i.e. If a → b & b → c, then according to axiom of transitivity, a → c.

roli_no name dept building_no

42 abc CO 4

43 pqr EC 2

44 xyz IT 1

45 abc EC 2

 Here, roll_no → dept and dept → building_no. Hence, according to the axiom of transitivity,
roll_no → building_no is a valid functional dependency.

System Analysis and Design


05/10/202 06:29 AM 18
4
5. Fully Functional Dependency

In full functional dependency an attribute or a set of attributes uniquely determines another


attribute or set of attributes. If a relation R has attributes X, Y, and Z with the dependencies X->Y
and X->Z it states that those dependencies are fully functional.

System Analysis and Design


05/10/202 06:29 AM 19
4
6. Partial Functional Dependency

In partial functional dependency a nonkey attribute depends on a part of the composite key, rather
than the whole key. If a relation R has attributes X, Y, and Z where X and Y are the composite key
and Z is non-key attribute. Then X->Z is a partial functional dependency in RBDMS.

ABC  D (D fully FD on ABC) But not BCD or CD or A  D

System Analysis and Design


05/10/202 06:29 AM 20
4
Types of Normalization

The process of organizing data in a database: -


 minimize redundancy and

increase data integrity.

Functional dependencies play an important part in data normalization.

System Analysis and Design


05/10/202 06:29 AM 21
4
First Normal Form (1NF)

A relation violates the first normal form if it contains composite or multi-valued attributes.

In the first normal form, the attribute values are single-valued and there are no repeating groups.
By using the primary key and foreign key, the first normal form creates a functional dependency
between the two tables.

System Analysis and Design


05/10/202 06:29 AM 22
4
First Normal Form (1NF)

 The Employee table is not in its first


normal form because the column
Phone No. contains multiple
values.

System Analysis and Design


05/10/202 06:29 AM 23
4
First Normal Form (1NF)

To convert the Employee table into 1NF we decompose it as follows:

System Analysis and Design


05/10/202 06:29 AM 24
4
Second Normal Form (2NF)

In order for a relationship to be in the second normal form:-


 it must first be in the first normal form and

 should not contain partial dependencies.

 The Second Normal Form eliminates partial dependencies on primary keys.

System Analysis and Design


05/10/202 06:29 AM 25
4
Second Normal Form (2NF)

Primary keys

StudentID StudentName ProjectID ProjectName


S89 Olivia P09 Geo Location
S76 Jacob P07 Cluster Exploration

S56 AVA P03 IoT Devices

S92 Alexandra P05 Cloud Deployment

System Analysis and Design


05/10/202 06:29 AM 26
4
Second Normal Form (2NF)

Student Table project Table

StudentID StudentName ProjectID ProjectName


P09 Geo Location
S89 Olivia
P07 Cluster Exploration
S76 Jacob
P03 IoT Devices
S56 AVA
S92 Alexandra P05 Cloud Deployment

System Analysis and Design


05/10/202 06:29 AM 27
4
Third Normal Form (3NF)

The data must be in Second Normal Form.

A relation has no transitive functional dependencies on the prime key.


Course Fee Qualification Teacher ID Teacher Name
Title
SAD €2000 Advanced Level 1 Getu

IP1 €2500 Advanced Level 2 Gosa


Primary Key

IP2 €3000 Advanced Level 3 Aderajew


OOP €2700 Diploma 4 Fekadu
COA €2800 Certificate 5 Abduljebar
DS €3200 Diploma 6 Esubalew

Course Title  Teacher ID Teacher Name


Course Title  Teacher Name  Teacher ID
System Analysis and Design
05/10/202 06:29 AM 28
4
Third Normal Form (3NF)

Transitive dependency can be avoided by using the following method.

Course Table Teacher Table


Course Fee Qualification Teacher ID Teacher Name
Title
SAD €2000 Advanced Level 1 Getu

IP1 €2500 Advanced Level 2 Gosa


IP2 €3000 Advanced Level 3 Aderajew
OOP €2700 Diploma 4 Fekadu
COA €2800 Certificate 5 Abduljebar
DS €3200 Diploma 6 Esubalew

System Analysis and Design


05/10/202 06:29 AM 29
4
4th Normal Form (4NF)

A relation will be in 4NF if it is in Boyce Codd’s normal form and has no multi-valued
dependency.

For a dependency A → B, if for a single value of A, multiple values of B exist, then the
relationship will be a multi-valued dependency.

System Analysis and Design


05/10/202 06:29 AM 30
4
4th Normal Form (4NF)

STU_ID COURSE HOBBY


Example:
21 Computer Dancing
STUDENT Table 21 Math Singing
34 Chemistry Dancing
74 Biology Cricket
59 Physics Hockey

 The given STUDENT table is in 3NF, but the COURSE and HOBBY are two independent entity. Hence,
there is no relationship between COURSE and HOBBY.
 In the STUDENT relation, a student with STU_ID, 21 contains two courses, Computer and Math , and two
hobbies, Dancing and Singing. So there is a Multi-valued dependency on STU_ID, which leads to
unnecessary repetition of data.

System Analysis and Design


05/10/202 06:29 AM 31
4
4th Normal Form (4NF)

No relationship
The above table will result in the following redundant data.
STU_ID COURSE HOBBY
21 Computer Dancing
21 Math Singing
21 Computer Singing
21 Math Dancing
34 Chemistry Dancing
74 Biology Cricket
59 Physics Hockey

System Analysis and Design


05/10/202 06:29 AM 32
4
4th Normal Form (4NF)

Hence, the multi-valued dependency of the above table can be removed by dividing the table into
two tables: Student course and student hobby.

Student Course Table


STU_ID COURSE
21 Computer
21 Math
34 Chemistry
74 Biology
59 Physics

System Analysis and Design


05/10/202 06:29 AM 33
4
4th Normal Form (4NF)

Hence, the multi-valued dependency of the above table can be removed by dividing the table into
two tables: Student course and student hobby.

Student Course Table Student Hobby


STU_ID COURSE STU_ID HOBBY
21 Computer 21 Dancing
21 Math 21 Singing
34 Chemistry 34 Dancing
74 Biology 74 Cricket

59 Physics 59 Hockey

System Analysis and Design


05/10/202 06:29 AM 34
4
Assignment

Try to show the 5th Normal Form by using every necessary step!

System Analysis and Design


05/10/202 06:29 AM 35
4
Designing the human interface

A UI prototype demonstrates a product's design and functionality to stakeholders, clients, and


potential users.

A prototype gives stakeholders a better understanding of how users interact with the product,
website, or application while it's in the design and development process.

User interface modeling moves from requirements definition into analysis at the point you decide
to evolve all or part of your essential user interface prototype into a traditional UI prototype.

This im- plies you convert your hand drawings, flip-chart paper, and sticky notes into something a
little more substantial.

System Analysis and Design


05/10/202 06:29 AM 36
4
Designing the human interface

Different platforms lead to different prototyping tools, for a browser-based application, you need
to use an HTML development tool, whereas a Java-based application would require a Java
development tool and a different approach to the user interface design.

System Analysis and Design


05/10/202 06:29 AM 37
4
System Analysis and Design
05/10/202 06:29 AM 38
4
System Analysis and Design
05/10/202 06:29 AM 39
4

You might also like