Structured system analysis and design

J
Jayant DalviStudent at University of Mumbai
STRUCTURED SYSTEM
ANALYSIS AND DESIGN
CHP 6. DATABASE DESIGN
MR. JAYANT. P. DALVI
DATABASE CONCEPTS
• Data: collection of raw facts
• Information: conversion of data into it after processing
• Database: collection of data in form of tables(rows and
columns)
• primary key: It is the first key which is used to identify one
and only one instance of an entity uniquely.
• Foreign key:
• Foreign keys are the column of the table which is used to
point to the primary key of another table.
• In a company, every employee works in a specific
department, and employee and department are two
different entities. So we can't store the information of the
department in the employee table. That's why we link
these two tables through the primary key of one table.
• We add the primary key of the DEPARTMENT table,
Department_Id as a new attribute in the EMPLOYEE table.
• Now in the EMPLOYEE table, Department_Id is the foreign
key, and both the tables are related.
NEED OF DATABASE DESIGN
• For any organization a bit complex and challenging task is to analyze
and organize the data in required format which becomes database
design for the system.
• It requires technical database design methods such as Entity
modeling method and Normalization which helps to put every datA of
data structure in its perspective and provides neat and well defined &
designed database.
• Entity:-Everything that is having individual existence which can be
recognized by its characteristics is called as entity.
• Characteristics or properties of an entity represent its attributes.
ER MODEL
• Rules For E-R Model:
Every entity must be represented in the model.
Every entity must have at least one relationship{1-1,1-m,m-n}
Every entity must have a unique identifier.
Many to many relationships are to be avoided.
Entity models are logical, not physical; they represent logical groups of data
Called entities and the relationships between the entities.
The technique complements data flow diagram.
Note that many to many relationships can be split as N-1 &1-M relationships.
Illustrative Case For E-R Model
• Draw E-R diagram for the computer course conducted for the
students which involves some compulsory subjects and some
optional subjects. Students refer different books for studying those
subjects.
• Solution:
• Entities: course, students, subjects, books
• Relationships: 1) course counducted for students
2) course includes subjects
3) students refer books
4) subjects have books
Attributes of Entities
1) Course Table: course_no, course_name, University_name,
2) Subject Table: sub_no, Sub_name,
3)Students Table: stu_no, Stu_name, address
4) Books Table: book_no, book_name,
ER DIAGRAM OF CASE STUDY
Mapping E-R to Table
1] Each entity is mapped into a table. The name of the entity becomes the name of the table.
2] The attributes of the entity becomes the fields of the table.
3] The key attribute of the entity becomes the primary key of the table.
4] The table which is mapped from the weak entity will have the key attribute of weak
entity and also have the key attribute of the strong entity on what it depends. This
attribute is known as foreign key.
5] In case of 1: m relationship the entity having the ‘m’ relationship borrows the key
attribute from the ‘1’ relationship.
In illustrative case:
1] Course table {strong entity}: course no (pk), course –nm, uni-nm, sub_no(fk), stu_nm(fk)
2] Student table {weak entity}: stu-id (Pk), stu-nm, stu-add, ph-no, course-no (fk), sub_no(fk).
3] Subject table: sub-cd (pk), sub-nm, cors-cd, book-pres-no, stu-id (fk).
4] Book table: Book-no (pk), book-nm, sub-cd (fk),course_no(fk).
CONVERSION OF E-R DIAGRAM TO E-R DATA
MODEL
• To convert E-R diagram to setoff relationship (E-R data model) we
replace each set in E-R diagram by a table. Thus each entity set and
each relationship set becomes a table or relation, the name of the set
becomes the name of the table and the attributes of the set become
the table columns.
Structured system analysis and design
Structured system analysis and design
Structured system analysis and design
WHAT IS NORMALIZATION?
• Normalization is the decomposition of complex data structures into ‘flat files’ called
relations. Decomposition refers to the breaking down of one table into multiple tables.
• The main difference between decomposition and normalization is that decomposition
can not be used for redundancy if it leads loss of information.
• If we are not able to take back the data in original forms means there is loss of
information from original database design. Normalization is not very different from
decomposition. The only difference between the two is that decomposition is not abide
by any formal rules, where as normalization does .
• When we apply a normalization rile the database design takes the next original form
called the normal form
NORMALIZATION
• Normalization is the process of organizing the data in the database.
• Normalization is used to minimize the redundancy from a relation or
set of relations. It is also used to eliminate the undesirable
characteristics like Insertion, Update and Deletion Anomalies.
• Normalization divides the larger table into the smaller table and links
them using relationship.
• The normal form is used to reduce redundancy from the database
table.
WHY IS NORMALIZATION NECESSARY?
• Following Normalization is necessary to structure the data for
following reasons
1. Data structure should be easily understood by user.
2. New data items, records and associations can be added to the data
structure
without changing the existing structure.
3. It provides maximum flexibility to different levels of users to handle
the queries.
4. To provide maximum flexibility and ease for data maintenance.
LEVELS OF NORMALIZATION
• We are going to focus mainly three levels of normalization:
1. 1NF: First normal form – It is data structure without internal
repeating groups.
2. 2NF: Second normal form- It is data structure in which all non key
elements are fully and functionally dependent on the primary key.
3. 3NF: Third normal form- Third normal form eliminates transitive
dependencies. That is the dependencies of some non key elements on
other non key elements.
Illustrative Case study
• Consider a case where a order is placed by a customer for some
items. Order is fulfilled and on the basis of rate & quantity bill is
generated. Now for this case the data in raw state that is in un -
normalized form is as follows: Ord-no,ord-dt,cust-no,cust-nm,cust-
add,item-no,item-nm,rate,qty,amt,fax.
DATABASE TABLES
1] 1NF:- In first normal form we eliminate repeating data groups, means
redundancy is eliminated.
• This is the case of decomposition of
data where we loose the data due to
lack of integrity, since there is no
commonality between two tables.
So we can add another column to
second table so that item sold can
be linked up with particular order.
Thus referential integrity
relationship is achieved .In simple
words adding the joining column to
another table means foreign key. SO
modified table structure is as follows
2] 2NF: In second normal form , we move all columns to another table that do
not fully and functionally depend on primary key. So now the data in 2NF form
is as follows
3) 3NF: For 3NF transitive dependencies are eliminated. To find out the non key
elements depending upon some other no key elements, extract the elements which can
be directly calculated. In this case we can get rid of the field amt which can be
calculated with the help of rate and quantity. So the data structure in 3 NF Form is
FINAL DATABASE TABLES AFTER NORMALIZATION
EXAMPLE OF NORMALIZATION: 1NF
• A relation will be 1NF if it contains
an atomic value.
• It states that an attribute of a table
cannot hold multiple values. It must
hold only single-valued attribute.
• First normal form disallows the
multi-valued attribute, composite
attribute, and their combinations.
• Example: Relation EMPLOYEE is not
in 1NF because of multi-valued
attribute EMP_PHONE.
1NF
Second Normal Form (2NF)
• In the 2NF, relational must be in 1NF.
• In the second normal form, all non-key
attributes are fully functional dependent on
the primary key
• Example: Let's assume, a school can store the
data of teachers and the subjects they teach.
In a school, a teacher can teach more than
one subject.
• In the given table, non-prime attribute
TEACHER_AGE is dependent on TEACHER_ID
which is a proper subset of a candidate key.
That's why it violates the rule for 2NF.
2NF
Third Normal Form (3NF)
• A relation will be in 3NF if it is in 2NF and not contain any transitive partial
dependency.
• 3NF is used to reduce the data duplication. It is also used to achieve the data
integrity.
• If there is no transitive dependency for non-prime attributes, then the relation
must be in third normal form.
• A relation is in third normal form if it holds atleast one of the following
conditions for every non-trivial function dependency X → Y.
• X is a super key.
• Y is a prime attribute, i.e., each element of Y is part of some candidate key.
3NF
3NF
• Super key in the table above:
• {EMP_ID}, {EMP_ID, EMP_NAME}, {EMP_ID, EMP_NAME, EMP_ZIP}....so on
• Candidate key: {EMP_ID}
• Non-prime attributes: In the given table, all attributes except EMP_ID are non-prime.
• Here, EMP_STATE & EMP_CITY dependent on EMP_ZIP and EMP_ZIP dependent on EMP_ID. The non-prime
attributes (EMP_STATE, EMP_CITY) transitively dependent on super key(EMP_ID). It violates the rule of third
normal form.
• That's why we need to move the EMP_CITY and EMP_STATE to the new <EMPLOYEE_ZIP> table, with EMP_ZIP as a
Primary key.
Structured system analysis and design
1 de 30

Recomendados

Year 11 DATA PROCESSING 1st Term por
Year 11 DATA PROCESSING 1st TermYear 11 DATA PROCESSING 1st Term
Year 11 DATA PROCESSING 1st TermIsaac-Joseph Olanrewaju
1.1K visualizações83 slides
Normalization por
NormalizationNormalization
NormalizationAhmed Farag
1.5K visualizações47 slides
Relational model por
Relational modelRelational model
Relational modelSabana Maharjan
337 visualizações29 slides
Chapter-8 Relational Database Design por
Chapter-8 Relational Database DesignChapter-8 Relational Database Design
Chapter-8 Relational Database DesignKunal Anand
143 visualizações48 slides
The Relational Model por
The Relational ModelThe Relational Model
The Relational ModelBhandari Nawaraj
5.5K visualizações63 slides
Intro to relational model por
Intro to relational modelIntro to relational model
Intro to relational modelATS SBGI MIRAJ
446 visualizações64 slides

Mais conteúdo relacionado

Mais procurados

The relational database model chapter 2 por
The relational database model  chapter 2The relational database model  chapter 2
The relational database model chapter 2Nargis Ehsan
2.5K visualizações37 slides
Chapter-3 Data Modeling using ER Model por
Chapter-3 Data Modeling using ER ModelChapter-3 Data Modeling using ER Model
Chapter-3 Data Modeling using ER ModelKunal Anand
52 visualizações49 slides
Relational model por
Relational modelRelational model
Relational modelDabbal Singh Mahara
2.8K visualizações57 slides
Chapter-6 Relational Algebra por
Chapter-6 Relational AlgebraChapter-6 Relational Algebra
Chapter-6 Relational AlgebraKunal Anand
138 visualizações55 slides
Relational model por
Relational modelRelational model
Relational modelWBUTTUTORIALS
2.3K visualizações20 slides
Normalization por
NormalizationNormalization
Normalizationochesing
17.3K visualizações25 slides

Mais procurados(20)

The relational database model chapter 2 por Nargis Ehsan
The relational database model  chapter 2The relational database model  chapter 2
The relational database model chapter 2
Nargis Ehsan2.5K visualizações
Chapter-3 Data Modeling using ER Model por Kunal Anand
Chapter-3 Data Modeling using ER ModelChapter-3 Data Modeling using ER Model
Chapter-3 Data Modeling using ER Model
Kunal Anand52 visualizações
Chapter-6 Relational Algebra por Kunal Anand
Chapter-6 Relational AlgebraChapter-6 Relational Algebra
Chapter-6 Relational Algebra
Kunal Anand138 visualizações
Relational model por WBUTTUTORIALS
Relational modelRelational model
Relational model
WBUTTUTORIALS2.3K visualizações
Normalization por ochesing
NormalizationNormalization
Normalization
ochesing17.3K visualizações
Relational Model - An Introduction por Rajeev Srivastava
Relational Model - An IntroductionRelational Model - An Introduction
Relational Model - An Introduction
Rajeev Srivastava121 visualizações
Relational Data Model Introduction por Nishant Munjal
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
Nishant Munjal13.4K visualizações
Normalization of database_tables_chapter_4 por Farhan Chishti
Normalization of database_tables_chapter_4Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4
Farhan Chishti3K visualizações
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF por Oum Saokosal
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Oum Saokosal112.2K visualizações
Normalization por lingesan
NormalizationNormalization
Normalization
lingesan5K visualizações
Lecture 07 relational database management system por emailharmeet
Lecture 07 relational database management systemLecture 07 relational database management system
Lecture 07 relational database management system
emailharmeet3.7K visualizações
Database - Normalization por Mudasir Qazi
Database - NormalizationDatabase - Normalization
Database - Normalization
Mudasir Qazi3.1K visualizações
Unit I Database concepts - RDBMS & ORACLE por DrkhanchanaR
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLE
DrkhanchanaR1.9K visualizações
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF por Biplap Bhattarai
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Biplap Bhattarai2.3K visualizações
Penormalan/Normalization por Joan Ador
Penormalan/NormalizationPenormalan/Normalization
Penormalan/Normalization
Joan Ador483 visualizações
Normalization in Database por A. S. M. Shafi
Normalization in DatabaseNormalization in Database
Normalization in Database
A. S. M. Shafi79 visualizações
Database normalization por Edward Blurock
Database normalizationDatabase normalization
Database normalization
Edward Blurock3.5K visualizações
Sppt chap007 por Awais Ahmed
Sppt chap007Sppt chap007
Sppt chap007
Awais Ahmed87 visualizações
Sql interview q&a por Syed Shah
Sql interview q&aSql interview q&a
Sql interview q&a
Syed Shah85 visualizações

Similar a Structured system analysis and design

DATABASE DESIGN.pptx por
DATABASE DESIGN.pptxDATABASE DESIGN.pptx
DATABASE DESIGN.pptxSaranCreations
3 visualizações81 slides
Data Modeling por
Data ModelingData Modeling
Data ModelingDrkhanchanaR
797 visualizações46 slides
Normmmalizzarion.ppt por
Normmmalizzarion.pptNormmmalizzarion.ppt
Normmmalizzarion.pptDeependra35
6 visualizações47 slides
Assignment#11 por
Assignment#11Assignment#11
Assignment#11Sunita Milind Dol
1.4K visualizações5 slides
Ism normalization pine valley 2012 por
Ism normalization pine valley 2012Ism normalization pine valley 2012
Ism normalization pine valley 2012Akshit R Shah
2.5K visualizações29 slides
Research gadot por
Research gadotResearch gadot
Research gadotJotham Gadot
875 visualizações5 slides

Similar a Structured system analysis and design (20)

DATABASE DESIGN.pptx por SaranCreations
DATABASE DESIGN.pptxDATABASE DESIGN.pptx
DATABASE DESIGN.pptx
SaranCreations3 visualizações
Data Modeling por DrkhanchanaR
Data ModelingData Modeling
Data Modeling
DrkhanchanaR797 visualizações
Normmmalizzarion.ppt por Deependra35
Normmmalizzarion.pptNormmmalizzarion.ppt
Normmmalizzarion.ppt
Deependra356 visualizações
Assignment#11 por Sunita Milind Dol
Assignment#11Assignment#11
Assignment#11
Sunita Milind Dol1.4K visualizações
Ism normalization pine valley 2012 por Akshit R Shah
Ism normalization pine valley 2012Ism normalization pine valley 2012
Ism normalization pine valley 2012
Akshit R Shah2.5K visualizações
Research gadot por Jotham Gadot
Research gadotResearch gadot
Research gadot
Jotham Gadot875 visualizações
1683368767418684.pdf por Janoakre
1683368767418684.pdf1683368767418684.pdf
1683368767418684.pdf
Janoakre3 visualizações
Presentation on Normalization.pptx por kshipra sony
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
kshipra sony15 visualizações
UNIT II DBMS.pptx por NIVETHA37590
UNIT II DBMS.pptxUNIT II DBMS.pptx
UNIT II DBMS.pptx
NIVETHA375905 visualizações
Distributed database por NasIr Irshad
Distributed databaseDistributed database
Distributed database
NasIr Irshad125 visualizações
Lecture 6.pptx por DilanAlmsa
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
DilanAlmsa6 visualizações
Database Management Systems 4 - Normalization por Nickkisha Farrell
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - Normalization
Nickkisha Farrell6.5K visualizações
databaess.pptx por Janoakre
databaess.pptxdatabaess.pptx
databaess.pptx
Janoakre2 visualizações
Normalization por Prabal Chauhan
NormalizationNormalization
Normalization
Prabal Chauhan113 visualizações
Database Management System por SelshaCs
Database Management SystemDatabase Management System
Database Management System
SelshaCs121 visualizações
Chapter Four Logical Database Design (Normalization).pptx por haymanot taddesse
Chapter Four Logical Database Design (Normalization).pptxChapter Four Logical Database Design (Normalization).pptx
Chapter Four Logical Database Design (Normalization).pptx
haymanot taddesse11 visualizações
Advance database system(part 5) por Abdullah Khosa
Advance database system(part 5)Advance database system(part 5)
Advance database system(part 5)
Abdullah Khosa177 visualizações
Linkedlists por Rajendran
LinkedlistsLinkedlists
Linkedlists
Rajendran 324 visualizações
ER Modeling and Introduction to RDBMS por Rubal Sagwal
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMS
Rubal Sagwal1.8K visualizações
overview of database concept por gourav kottawar
overview of database conceptoverview of database concept
overview of database concept
gourav kottawar614 visualizações

Mais de Jayant Dalvi

Linux System Administration por
Linux System AdministrationLinux System Administration
Linux System AdministrationJayant Dalvi
88 visualizações43 slides
Linux System Administration por
Linux System AdministrationLinux System Administration
Linux System AdministrationJayant Dalvi
73 visualizações29 slides
Structured system analysis and design por
Structured system analysis and design Structured system analysis and design
Structured system analysis and design Jayant Dalvi
70 visualizações20 slides
Structured system analysis and design por
Structured system analysis and design Structured system analysis and design
Structured system analysis and design Jayant Dalvi
54 visualizações14 slides
Structured system analysis and design por
Structured system analysis and design Structured system analysis and design
Structured system analysis and design Jayant Dalvi
86 visualizações12 slides
Java I/O por
Java I/OJava I/O
Java I/OJayant Dalvi
319 visualizações32 slides

Mais de Jayant Dalvi(16)

Linux System Administration por Jayant Dalvi
Linux System AdministrationLinux System Administration
Linux System Administration
Jayant Dalvi88 visualizações
Linux System Administration por Jayant Dalvi
Linux System AdministrationLinux System Administration
Linux System Administration
Jayant Dalvi73 visualizações
Structured system analysis and design por Jayant Dalvi
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
Jayant Dalvi70 visualizações
Structured system analysis and design por Jayant Dalvi
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
Jayant Dalvi54 visualizações
Structured system analysis and design por Jayant Dalvi
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
Jayant Dalvi86 visualizações
Java I/O por Jayant Dalvi
Java I/OJava I/O
Java I/O
Jayant Dalvi319 visualizações
Information system audit 2 por Jayant Dalvi
Information system audit 2 Information system audit 2
Information system audit 2
Jayant Dalvi132 visualizações
java- Abstract Window toolkit por Jayant Dalvi
java- Abstract Window toolkitjava- Abstract Window toolkit
java- Abstract Window toolkit
Jayant Dalvi121 visualizações
Structured system analysis and design por Jayant Dalvi
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
Jayant Dalvi37 visualizações
Information system audit por Jayant Dalvi
Information system audit Information system audit
Information system audit
Jayant Dalvi41 visualizações
Information system audit por Jayant Dalvi
Information system audit Information system audit
Information system audit
Jayant Dalvi37 visualizações
Structured system analysis and design por Jayant Dalvi
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
Jayant Dalvi52 visualizações
Information system audit por Jayant Dalvi
Information system audit Information system audit
Information system audit
Jayant Dalvi70 visualizações
Multithreading in Java por Jayant Dalvi
Multithreading in JavaMultithreading in Java
Multithreading in Java
Jayant Dalvi140 visualizações
Exception handling c++ por Jayant Dalvi
Exception handling c++Exception handling c++
Exception handling c++
Jayant Dalvi234 visualizações
Object Oriented Programming using C++ por Jayant Dalvi
Object Oriented Programming using C++Object Oriented Programming using C++
Object Oriented Programming using C++
Jayant Dalvi49 visualizações

Último

AI Tools for Business and Startups por
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and StartupsSvetlin Nakov
89 visualizações39 slides
Use of Probiotics in Aquaculture.pptx por
Use of Probiotics in Aquaculture.pptxUse of Probiotics in Aquaculture.pptx
Use of Probiotics in Aquaculture.pptxAKSHAY MANDAL
81 visualizações15 slides
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx por
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxISSIP
256 visualizações50 slides
Psychology KS5 por
Psychology KS5Psychology KS5
Psychology KS5WestHatch
68 visualizações5 slides
discussion post.pdf por
discussion post.pdfdiscussion post.pdf
discussion post.pdfjessemercerail
106 visualizações1 slide
Computer Introduction-Lecture06 por
Computer Introduction-Lecture06Computer Introduction-Lecture06
Computer Introduction-Lecture06Dr. Mazin Mohamed alkathiri
65 visualizações12 slides

Último(20)

AI Tools for Business and Startups por Svetlin Nakov
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and Startups
Svetlin Nakov89 visualizações
Use of Probiotics in Aquaculture.pptx por AKSHAY MANDAL
Use of Probiotics in Aquaculture.pptxUse of Probiotics in Aquaculture.pptx
Use of Probiotics in Aquaculture.pptx
AKSHAY MANDAL81 visualizações
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx por ISSIP
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
ISSIP256 visualizações
Psychology KS5 por WestHatch
Psychology KS5Psychology KS5
Psychology KS5
WestHatch68 visualizações
discussion post.pdf por jessemercerail
discussion post.pdfdiscussion post.pdf
discussion post.pdf
jessemercerail106 visualizações
The basics - information, data, technology and systems.pdf por JonathanCovena1
The basics - information, data, technology and systems.pdfThe basics - information, data, technology and systems.pdf
The basics - information, data, technology and systems.pdf
JonathanCovena177 visualizações
Class 10 English lesson plans por TARIQ KHAN
Class 10 English  lesson plansClass 10 English  lesson plans
Class 10 English lesson plans
TARIQ KHAN239 visualizações
STERILITY TEST.pptx por Anupkumar Sharma
STERILITY TEST.pptxSTERILITY TEST.pptx
STERILITY TEST.pptx
Anupkumar Sharma114 visualizações
Google solution challenge..pptx por ChitreshGyanani1
Google solution challenge..pptxGoogle solution challenge..pptx
Google solution challenge..pptx
ChitreshGyanani182 visualizações
ACTIVITY BOOK key water sports.pptx por Mar Caston Palacio
ACTIVITY BOOK key water sports.pptxACTIVITY BOOK key water sports.pptx
ACTIVITY BOOK key water sports.pptx
Mar Caston Palacio350 visualizações
OEB 2023 Co-learning To Speed Up AI Implementation in Courses.pptx por Inge de Waard
OEB 2023 Co-learning To Speed Up AI Implementation in Courses.pptxOEB 2023 Co-learning To Speed Up AI Implementation in Courses.pptx
OEB 2023 Co-learning To Speed Up AI Implementation in Courses.pptx
Inge de Waard165 visualizações
American Psychological Association 7th Edition.pptx por SamiullahAfridi4
American Psychological Association  7th Edition.pptxAmerican Psychological Association  7th Edition.pptx
American Psychological Association 7th Edition.pptx
SamiullahAfridi474 visualizações
Compare the flora and fauna of Kerala and Chhattisgarh ( Charttabulation) por AnshulDewangan3
 Compare the flora and fauna of Kerala and Chhattisgarh ( Charttabulation) Compare the flora and fauna of Kerala and Chhattisgarh ( Charttabulation)
Compare the flora and fauna of Kerala and Chhattisgarh ( Charttabulation)
AnshulDewangan3275 visualizações
The Open Access Community Framework (OACF) 2023 (1).pptx por Jisc
The Open Access Community Framework (OACF) 2023 (1).pptxThe Open Access Community Framework (OACF) 2023 (1).pptx
The Open Access Community Framework (OACF) 2023 (1).pptx
Jisc77 visualizações
11.28.23 Social Capital and Social Exclusion.pptx por mary850239
11.28.23 Social Capital and Social Exclusion.pptx11.28.23 Social Capital and Social Exclusion.pptx
11.28.23 Social Capital and Social Exclusion.pptx
mary850239112 visualizações
Student Voice por Pooky Knightsmith
Student Voice Student Voice
Student Voice
Pooky Knightsmith148 visualizações
The Accursed House by Émile Gaboriau por DivyaSheta
The Accursed House  by Émile GaboriauThe Accursed House  by Émile Gaboriau
The Accursed House by Émile Gaboriau
DivyaSheta139 visualizações

Structured system analysis and design

  • 1. STRUCTURED SYSTEM ANALYSIS AND DESIGN CHP 6. DATABASE DESIGN MR. JAYANT. P. DALVI
  • 2. DATABASE CONCEPTS • Data: collection of raw facts • Information: conversion of data into it after processing • Database: collection of data in form of tables(rows and columns) • primary key: It is the first key which is used to identify one and only one instance of an entity uniquely. • Foreign key: • Foreign keys are the column of the table which is used to point to the primary key of another table. • In a company, every employee works in a specific department, and employee and department are two different entities. So we can't store the information of the department in the employee table. That's why we link these two tables through the primary key of one table. • We add the primary key of the DEPARTMENT table, Department_Id as a new attribute in the EMPLOYEE table. • Now in the EMPLOYEE table, Department_Id is the foreign key, and both the tables are related.
  • 3. NEED OF DATABASE DESIGN • For any organization a bit complex and challenging task is to analyze and organize the data in required format which becomes database design for the system. • It requires technical database design methods such as Entity modeling method and Normalization which helps to put every datA of data structure in its perspective and provides neat and well defined & designed database. • Entity:-Everything that is having individual existence which can be recognized by its characteristics is called as entity. • Characteristics or properties of an entity represent its attributes.
  • 4. ER MODEL • Rules For E-R Model: Every entity must be represented in the model. Every entity must have at least one relationship{1-1,1-m,m-n} Every entity must have a unique identifier. Many to many relationships are to be avoided. Entity models are logical, not physical; they represent logical groups of data Called entities and the relationships between the entities. The technique complements data flow diagram. Note that many to many relationships can be split as N-1 &1-M relationships.
  • 5. Illustrative Case For E-R Model • Draw E-R diagram for the computer course conducted for the students which involves some compulsory subjects and some optional subjects. Students refer different books for studying those subjects. • Solution: • Entities: course, students, subjects, books • Relationships: 1) course counducted for students 2) course includes subjects 3) students refer books 4) subjects have books
  • 6. Attributes of Entities 1) Course Table: course_no, course_name, University_name, 2) Subject Table: sub_no, Sub_name, 3)Students Table: stu_no, Stu_name, address 4) Books Table: book_no, book_name,
  • 7. ER DIAGRAM OF CASE STUDY
  • 8. Mapping E-R to Table 1] Each entity is mapped into a table. The name of the entity becomes the name of the table. 2] The attributes of the entity becomes the fields of the table. 3] The key attribute of the entity becomes the primary key of the table. 4] The table which is mapped from the weak entity will have the key attribute of weak entity and also have the key attribute of the strong entity on what it depends. This attribute is known as foreign key. 5] In case of 1: m relationship the entity having the ‘m’ relationship borrows the key attribute from the ‘1’ relationship. In illustrative case: 1] Course table {strong entity}: course no (pk), course –nm, uni-nm, sub_no(fk), stu_nm(fk) 2] Student table {weak entity}: stu-id (Pk), stu-nm, stu-add, ph-no, course-no (fk), sub_no(fk). 3] Subject table: sub-cd (pk), sub-nm, cors-cd, book-pres-no, stu-id (fk). 4] Book table: Book-no (pk), book-nm, sub-cd (fk),course_no(fk).
  • 9. CONVERSION OF E-R DIAGRAM TO E-R DATA MODEL • To convert E-R diagram to setoff relationship (E-R data model) we replace each set in E-R diagram by a table. Thus each entity set and each relationship set becomes a table or relation, the name of the set becomes the name of the table and the attributes of the set become the table columns.
  • 13. WHAT IS NORMALIZATION? • Normalization is the decomposition of complex data structures into ‘flat files’ called relations. Decomposition refers to the breaking down of one table into multiple tables. • The main difference between decomposition and normalization is that decomposition can not be used for redundancy if it leads loss of information. • If we are not able to take back the data in original forms means there is loss of information from original database design. Normalization is not very different from decomposition. The only difference between the two is that decomposition is not abide by any formal rules, where as normalization does . • When we apply a normalization rile the database design takes the next original form called the normal form
  • 14. NORMALIZATION • Normalization is the process of organizing the data in the database. • Normalization is used to minimize the redundancy from a relation or set of relations. It is also used to eliminate the undesirable characteristics like Insertion, Update and Deletion Anomalies. • Normalization divides the larger table into the smaller table and links them using relationship. • The normal form is used to reduce redundancy from the database table.
  • 15. WHY IS NORMALIZATION NECESSARY? • Following Normalization is necessary to structure the data for following reasons 1. Data structure should be easily understood by user. 2. New data items, records and associations can be added to the data structure without changing the existing structure. 3. It provides maximum flexibility to different levels of users to handle the queries. 4. To provide maximum flexibility and ease for data maintenance.
  • 16. LEVELS OF NORMALIZATION • We are going to focus mainly three levels of normalization: 1. 1NF: First normal form – It is data structure without internal repeating groups. 2. 2NF: Second normal form- It is data structure in which all non key elements are fully and functionally dependent on the primary key. 3. 3NF: Third normal form- Third normal form eliminates transitive dependencies. That is the dependencies of some non key elements on other non key elements.
  • 17. Illustrative Case study • Consider a case where a order is placed by a customer for some items. Order is fulfilled and on the basis of rate & quantity bill is generated. Now for this case the data in raw state that is in un - normalized form is as follows: Ord-no,ord-dt,cust-no,cust-nm,cust- add,item-no,item-nm,rate,qty,amt,fax.
  • 19. 1] 1NF:- In first normal form we eliminate repeating data groups, means redundancy is eliminated. • This is the case of decomposition of data where we loose the data due to lack of integrity, since there is no commonality between two tables. So we can add another column to second table so that item sold can be linked up with particular order. Thus referential integrity relationship is achieved .In simple words adding the joining column to another table means foreign key. SO modified table structure is as follows
  • 20. 2] 2NF: In second normal form , we move all columns to another table that do not fully and functionally depend on primary key. So now the data in 2NF form is as follows
  • 21. 3) 3NF: For 3NF transitive dependencies are eliminated. To find out the non key elements depending upon some other no key elements, extract the elements which can be directly calculated. In this case we can get rid of the field amt which can be calculated with the help of rate and quantity. So the data structure in 3 NF Form is
  • 22. FINAL DATABASE TABLES AFTER NORMALIZATION
  • 23. EXAMPLE OF NORMALIZATION: 1NF • A relation will be 1NF if it contains an atomic value. • It states that an attribute of a table cannot hold multiple values. It must hold only single-valued attribute. • First normal form disallows the multi-valued attribute, composite attribute, and their combinations. • Example: Relation EMPLOYEE is not in 1NF because of multi-valued attribute EMP_PHONE.
  • 24. 1NF
  • 25. Second Normal Form (2NF) • In the 2NF, relational must be in 1NF. • In the second normal form, all non-key attributes are fully functional dependent on the primary key • Example: Let's assume, a school can store the data of teachers and the subjects they teach. In a school, a teacher can teach more than one subject. • In the given table, non-prime attribute TEACHER_AGE is dependent on TEACHER_ID which is a proper subset of a candidate key. That's why it violates the rule for 2NF.
  • 26. 2NF
  • 27. Third Normal Form (3NF) • A relation will be in 3NF if it is in 2NF and not contain any transitive partial dependency. • 3NF is used to reduce the data duplication. It is also used to achieve the data integrity. • If there is no transitive dependency for non-prime attributes, then the relation must be in third normal form. • A relation is in third normal form if it holds atleast one of the following conditions for every non-trivial function dependency X → Y. • X is a super key. • Y is a prime attribute, i.e., each element of Y is part of some candidate key.
  • 28. 3NF
  • 29. 3NF • Super key in the table above: • {EMP_ID}, {EMP_ID, EMP_NAME}, {EMP_ID, EMP_NAME, EMP_ZIP}....so on • Candidate key: {EMP_ID} • Non-prime attributes: In the given table, all attributes except EMP_ID are non-prime. • Here, EMP_STATE & EMP_CITY dependent on EMP_ZIP and EMP_ZIP dependent on EMP_ID. The non-prime attributes (EMP_STATE, EMP_CITY) transitively dependent on super key(EMP_ID). It violates the rule of third normal form. • That's why we need to move the EMP_CITY and EMP_STATE to the new <EMPLOYEE_ZIP> table, with EMP_ZIP as a Primary key.