SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Lecture 3:
Basic Database Analysis
ISOM3260, Spring 2014
2
Where we are now
• Database environment
– introduction to database
• Database development process
– steps to develop a database
• Conceptual data modeling
– entity-relationship (ER) diagram; enhanced ER
• Logical database design
– transforming ER diagram into relations; normalization
• Physical database design
– technical specifications of the database
• Database implementation
– Structured Query Language (SQL), Advanced SQL
• Advanced topics
– data and database administration
3
Database development activities during SDLC
Top-down
analysis
4
Basic Database Analysis
• Business Rules
• E-R Model
• Entities
• Attributes
• Relationships
5
Business Rules
• Statements that define or constrain some aspect of the
business
• Include
– names and definitions of entity types, attributes, and
relationships
– constraints on above data objects
• Expressed in terms familiar to end users
– e.g. Every student in the university must have a faculty
advisor
• Automated through DBMS software
• Some business rules cannot be represented in E-R
diagram; instead they are stated in natural language
6
Figure 2-1: Sample E-R Diagram
7
Figure 2-2: Basic E-R Notation
Entity
symbols
Relationship
symbols
Attribute
symbols
A special
entity that is
also a
relationship
8
E-R Model Constructs
• Entity - person, place, object, event, concept
• Entity Type versus Entity Instance
9
What Should an Entity Be?
• SHOULD BE:
– an object that will have many instances in the
database
– an object that will be composed of multiple attributes
– an object that we are trying to model
• SHOULD NOT BE:
– a user of the database system
– an output of the database system (e.g. a report)
10
Inappropriate entities
System user System output
Appropriate entities
Figure 2-4
11
Strong vs. Weak Entity Type
• Strong entity
– exists independently of other types of entities
– has its own unique identifier
– represented with single-line rectangle
• Weak entity
– dependent on a strong entity…cannot exist on its own
– does not have a unique identifier
– represented with double-line rectangle
• Identifying relationship
– links strong entities to weak entities
– represented with double line diamond
12
Figure 2-5: Strong and weak entities
13
Attributes
• Attribute
– property or characteristic of an entity type
• Classifications of attributes
– Simple versus Composite Attribute
– Single-Valued versus Multivalued Attribute
– Stored versus Derived Attributes
– Identifier Attributes
14
Figure 2-7: A composite attribute
An attribute
broken into
component parts
15
Figure 2-8: Entity with a multivalued attribute (Skill) and
derived attribute (Years_Employed)
Derived
from date employed and current date
Multivalued:
an employee can have
more than one skill
16
Identifier Attribute
• Identifier (or key)
– an attribute (or combination of attributes) that
uniquely identifies individual instances of an entity
type
• Simple Key versus Composite Key
• Candidate Key
– an attribute that could be a key…satisfies the
requirements for being a key
17
Characteristics of Identifiers
• Will not change in value
• Will not be null
• No intelligent identifiers
– e.g. containing locations that might change
• Substitute new, simple keys for long, composite keys
– e.g. Game_Number instead of Home_Team and
Visiting_Team
18
Figure 2-9a: Simple key attribute
The key is underlined
19
Figure 2-9b: Composite key attribute
The key is composed
of two subparts
20
Relationships
• Relationship Types vs. Relationship Instances
– the relationship type is modeled as the diamond
and lines between entity types…the instance is
between specific entity instances
• Relationships can have attributes
– these describe features pertaining to the
association between the entities in the relationship
21
Figure 2-10a: Relationship type (Completes)
Figure 2-10b: Relationship instances
22
Figure 2-11a: A binary relationship with an attribute
Here, the Date_Completed attribute refers to the employee’s
completion of a course…it is an attribute of the relationship
23
Associative Entities
• It’s an entity – it has attributes
• AND it’s a relationship – it links entities together
• When should a relationship with attributes instead be an
associative entity?
– all relationships for the associative entity should be many
– the associative entity could have meaning independent of the other
entities
– the associative entity preferably has a unique identifier, and should
also have other attributes
– the associative entity may be participating in other relationships other
than the entities of the associated relationship
– ternary relationships should be converted to associative entities
24
Figure 2-11b: An associative entity (CERTIFICATE)
Associative entity involves a rectangle with a diamond inside.
Note that the many-to-many cardinality symbols face toward
the associative entity and not toward the other entities.
25
Degree of a Relationship
• Degree of a Relationship is the number
of entity types that participate in it
– Unary Relationship (degree 1)
– Binary Relationship (degree 2)
– Ternary Relationship (degree 3)
26
Figure 2-2: Degree of relationships
One entity
related to
another of
the same
entity type
Entities of
two different
types related
to each other
Entities of three
different types
related to each
other
27
Figure 2-12a: Unary relationships
28
Representing a bill-of -materials structure
Figure 2-13a: A unary relationship with an attribute. This
has a many-to-many relationship
29
(b) Two instances
30
Figure 2-13c: An associative entity – bill of materials structure
31
Figure 2-12b: Binary relationships
32
Figure 2-12c: Ternary relationships
33
Figure 2-14: Ternary relationships as an associative entity
34
Cardinality of Relationships
• One–to–One
– each entity instance in the relationship will have
exactly one related entity instance
• One–to–Many
– an entity instance on one side of the relationship can
have many related entity instances, but an entity
instance on the other side will have a maximum of
one related entity instance
• Many–to–Many
– entity instances on both sides of the relationship can
have many related entity instances on the other side
35
Cardinality Constraints
• Cardinality Constraints
– the number of instances of one entity that can or must
be associated with each instance of another entity
• Minimum Cardinality
– if zero, then optional
– if one or more, then mandatory
• Maximum Cardinality
– the maximum number
36
Figure 2-2: Cardinality
37
Figure 2-16a: Basic relationship with only maximum cardinalities
showing
Figure 2-17a: Mandatory cardinalities
38
Figure 2-17b: One optional, one mandatory cardinality
39
Figure 2-17c: Optional cardinalities
40
Figure 2-18: Cardinality constraints in a ternary relationship
41
More about Relationships
• Modeling Time-Dependent Data
– Time Stamps (such as date and time)
• Multiple Relationships
– more than one relationship between the same
entity types
42
Figure 2-19: Example of time stamping
43
Examples of multiple relationships – entities can be related to
one another in more than one way
Figure 2-21a: Employees and departments
44
Figure 2-21b: Professors and courses (fixed upon constraint)
Maximum
cardinality
constraint is 4
45
Figure 2-22: E-R diagram for Pine Valley Furniture

Weitere ähnliche Inhalte

Was ist angesagt?

2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
ER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSRubal Sagwal
 
Entity Relationship Diagram2
Entity Relationship Diagram2Entity Relationship Diagram2
Entity Relationship Diagram2sadeenedian08
 
Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Edwin Ayernor
 
Lecture 03 data abstraction and er model
Lecture 03 data abstraction and er modelLecture 03 data abstraction and er model
Lecture 03 data abstraction and er modelemailharmeet
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship ModellingBhandari Nawaraj
 
Ch 6 Logical D B Design
Ch 6  Logical D B  DesignCh 6  Logical D B  Design
Ch 6 Logical D B Designguest8fdbdd
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...Mustafa Kamel Mohammadi
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramShakila Mahjabin
 
Desigining of Database - ER Model
Desigining of Database - ER ModelDesigining of Database - ER Model
Desigining of Database - ER ModelAjay Chhimpa
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 

Was ist angesagt? (20)

Erd chapter 3
Erd chapter 3Erd chapter 3
Erd chapter 3
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
ER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMS
 
E r model
E r modelE r model
E r model
 
Entity Relationship Diagram2
Entity Relationship Diagram2Entity Relationship Diagram2
Entity Relationship Diagram2
 
Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Entity relationship modelling - DE L300
Entity relationship modelling - DE L300
 
Lecture 03 data abstraction and er model
Lecture 03 data abstraction and er modelLecture 03 data abstraction and er model
Lecture 03 data abstraction and er model
 
DBMS - ER Model
DBMS - ER ModelDBMS - ER Model
DBMS - ER Model
 
Er Modeling
Er ModelingEr Modeling
Er Modeling
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
Ch 6 Logical D B Design
Ch 6  Logical D B  DesignCh 6  Logical D B  Design
Ch 6 Logical D B Design
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
enhanced er diagram
enhanced er diagramenhanced er diagram
enhanced er diagram
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
Ch 3 E R Model
Ch 3  E R  ModelCh 3  E R  Model
Ch 3 E R Model
 
Desigining of Database - ER Model
Desigining of Database - ER ModelDesigining of Database - ER Model
Desigining of Database - ER Model
 
Database design
Database designDatabase design
Database design
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
 

Andere mochten auch (20)

Enhanced ER(database)
Enhanced ER(database)Enhanced ER(database)
Enhanced ER(database)
 
Ch 5 O O Data Modeling Class
Ch 5  O O  Data Modeling ClassCh 5  O O  Data Modeling Class
Ch 5 O O Data Modeling Class
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Solution4 1(database)
Solution4 1(database)Solution4 1(database)
Solution4 1(database)
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Entity relationship
Entity relationshipEntity relationship
Entity relationship
 
E r model
E r modelE r model
E r model
 
Taxonomy 101
Taxonomy 101Taxonomy 101
Taxonomy 101
 
Class363 1
Class363 1Class363 1
Class363 1
 
Databaseconcepts
DatabaseconceptsDatabaseconcepts
Databaseconcepts
 
Ao6 Database
Ao6   DatabaseAo6   Database
Ao6 Database
 
Use Cases Vs User Stories
Use Cases Vs User StoriesUse Cases Vs User Stories
Use Cases Vs User Stories
 
L7 er2
L7 er2L7 er2
L7 er2
 
Use Case diagram-UML diagram-1
Use Case diagram-UML diagram-1Use Case diagram-UML diagram-1
Use Case diagram-UML diagram-1
 
Use case Diagram
Use case Diagram Use case Diagram
Use case Diagram
 
Solution6(database)
Solution6(database)Solution6(database)
Solution6(database)
 
Exercise6(database)
Exercise6(database)Exercise6(database)
Exercise6(database)
 
Source code for search engine(database)
Source code for search engine(database)Source code for search engine(database)
Source code for search engine(database)
 
Exercise3(database)
Exercise3(database)Exercise3(database)
Exercise3(database)
 
Database fundamentals(database)
Database fundamentals(database)Database fundamentals(database)
Database fundamentals(database)
 

Ähnlich wie Basic database analysis(database)

Ähnlich wie Basic database analysis(database) (20)

Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
The Database Environment Chapter 3
The Database Environment Chapter 3The Database Environment Chapter 3
The Database Environment Chapter 3
 
entityrelationshipmodel.pptx
entityrelationshipmodel.pptxentityrelationshipmodel.pptx
entityrelationshipmodel.pptx
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
ERD.ppt
ERD.pptERD.ppt
ERD.ppt
 
ERD.ppt
ERD.pptERD.ppt
ERD.ppt
 
Entity Relationship (ER) Model
Entity Relationship (ER) ModelEntity Relationship (ER) Model
Entity Relationship (ER) Model
 
entity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptentity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.ppt
 
ER model
ER modelER model
ER model
 
Er model
Er modelEr model
Er model
 
18306_lec-2 (1).ppt
18306_lec-2 (1).ppt18306_lec-2 (1).ppt
18306_lec-2 (1).ppt
 
DBMS Class 3
DBMS Class 3DBMS Class 3
DBMS Class 3
 
Erd1
Erd1Erd1
Erd1
 
dbms (database management system )1.pptx
dbms (database management system )1.pptxdbms (database management system )1.pptx
dbms (database management system )1.pptx
 
ERD(2).ppt
ERD(2).pptERD(2).ppt
ERD(2).ppt
 
Dbms basics 02
Dbms basics 02Dbms basics 02
Dbms basics 02
 
ER MODEL.pptx
ER MODEL.pptxER MODEL.pptx
ER MODEL.pptx
 
Database Management System
Database Management System Database Management System
Database Management System
 
database
databasedatabase
database
 

Mehr von welcometofacebook

Quantitative exercise-toasty oven
Quantitative exercise-toasty ovenQuantitative exercise-toasty oven
Quantitative exercise-toasty ovenwelcometofacebook
 
EVC exercise-novel motor oil
EVC exercise-novel motor oilEVC exercise-novel motor oil
EVC exercise-novel motor oilwelcometofacebook
 
cltv calculation-calyx corolla
cltv calculation-calyx corolla cltv calculation-calyx corolla
cltv calculation-calyx corolla welcometofacebook
 
competing in a global market(4210)
competing in a global market(4210)competing in a global market(4210)
competing in a global market(4210)welcometofacebook
 
distribution strategies calyx and corolla(4210)
distribution strategies calyx and corolla(4210)distribution strategies calyx and corolla(4210)
distribution strategies calyx and corolla(4210)welcometofacebook
 
distribution strategies(4210)
distribution strategies(4210)distribution strategies(4210)
distribution strategies(4210)welcometofacebook
 
product and brand strategies(4210)
product and brand strategies(4210)product and brand strategies(4210)
product and brand strategies(4210)welcometofacebook
 
overview of marketing strategy(4210)
overview of marketing strategy(4210)overview of marketing strategy(4210)
overview of marketing strategy(4210)welcometofacebook
 
Class+3+ +quantitative+analysis+exercise+answer+key
Class+3+ +quantitative+analysis+exercise+answer+keyClass+3+ +quantitative+analysis+exercise+answer+key
Class+3+ +quantitative+analysis+exercise+answer+keywelcometofacebook
 

Mehr von welcometofacebook (20)

Quantitative exercise-toasty oven
Quantitative exercise-toasty ovenQuantitative exercise-toasty oven
Quantitative exercise-toasty oven
 
EVC exercise-novel motor oil
EVC exercise-novel motor oilEVC exercise-novel motor oil
EVC exercise-novel motor oil
 
jones blair calculations
jones blair calculationsjones blair calculations
jones blair calculations
 
EVC exercise-odi case
EVC exercise-odi caseEVC exercise-odi case
EVC exercise-odi case
 
cltv calculation-calyx corolla
cltv calculation-calyx corolla cltv calculation-calyx corolla
cltv calculation-calyx corolla
 
consumer behavior(4210)
consumer behavior(4210)consumer behavior(4210)
consumer behavior(4210)
 
competing in a global market(4210)
competing in a global market(4210)competing in a global market(4210)
competing in a global market(4210)
 
promotion strategies(4210)
promotion strategies(4210)promotion strategies(4210)
promotion strategies(4210)
 
pricing strategies(4210)
pricing strategies(4210)pricing strategies(4210)
pricing strategies(4210)
 
Pharmasim
PharmasimPharmasim
Pharmasim
 
distribution strategies calyx and corolla(4210)
distribution strategies calyx and corolla(4210)distribution strategies calyx and corolla(4210)
distribution strategies calyx and corolla(4210)
 
distribution strategies(4210)
distribution strategies(4210)distribution strategies(4210)
distribution strategies(4210)
 
the birth of swatch(4210)
the birth of swatch(4210)the birth of swatch(4210)
the birth of swatch(4210)
 
product and brand strategies(4210)
product and brand strategies(4210)product and brand strategies(4210)
product and brand strategies(4210)
 
stp case jones blair(4210)
stp case jones blair(4210)stp case jones blair(4210)
stp case jones blair(4210)
 
stp(4210)
stp(4210)stp(4210)
stp(4210)
 
situational analysis(4210)
situational analysis(4210)situational analysis(4210)
situational analysis(4210)
 
quantitative analysis(4210)
quantitative analysis(4210)quantitative analysis(4210)
quantitative analysis(4210)
 
overview of marketing strategy(4210)
overview of marketing strategy(4210)overview of marketing strategy(4210)
overview of marketing strategy(4210)
 
Class+3+ +quantitative+analysis+exercise+answer+key
Class+3+ +quantitative+analysis+exercise+answer+keyClass+3+ +quantitative+analysis+exercise+answer+key
Class+3+ +quantitative+analysis+exercise+answer+key
 

Kürzlich hochgeladen

Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projectssmsksolar
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086anil_gaur
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf203318pmpc
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 

Kürzlich hochgeladen (20)

Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 

Basic database analysis(database)

  • 1. Lecture 3: Basic Database Analysis ISOM3260, Spring 2014
  • 2. 2 Where we are now • Database environment – introduction to database • Database development process – steps to develop a database • Conceptual data modeling – entity-relationship (ER) diagram; enhanced ER • Logical database design – transforming ER diagram into relations; normalization • Physical database design – technical specifications of the database • Database implementation – Structured Query Language (SQL), Advanced SQL • Advanced topics – data and database administration
  • 3. 3 Database development activities during SDLC Top-down analysis
  • 4. 4 Basic Database Analysis • Business Rules • E-R Model • Entities • Attributes • Relationships
  • 5. 5 Business Rules • Statements that define or constrain some aspect of the business • Include – names and definitions of entity types, attributes, and relationships – constraints on above data objects • Expressed in terms familiar to end users – e.g. Every student in the university must have a faculty advisor • Automated through DBMS software • Some business rules cannot be represented in E-R diagram; instead they are stated in natural language
  • 6. 6 Figure 2-1: Sample E-R Diagram
  • 7. 7 Figure 2-2: Basic E-R Notation Entity symbols Relationship symbols Attribute symbols A special entity that is also a relationship
  • 8. 8 E-R Model Constructs • Entity - person, place, object, event, concept • Entity Type versus Entity Instance
  • 9. 9 What Should an Entity Be? • SHOULD BE: – an object that will have many instances in the database – an object that will be composed of multiple attributes – an object that we are trying to model • SHOULD NOT BE: – a user of the database system – an output of the database system (e.g. a report)
  • 10. 10 Inappropriate entities System user System output Appropriate entities Figure 2-4
  • 11. 11 Strong vs. Weak Entity Type • Strong entity – exists independently of other types of entities – has its own unique identifier – represented with single-line rectangle • Weak entity – dependent on a strong entity…cannot exist on its own – does not have a unique identifier – represented with double-line rectangle • Identifying relationship – links strong entities to weak entities – represented with double line diamond
  • 12. 12 Figure 2-5: Strong and weak entities
  • 13. 13 Attributes • Attribute – property or characteristic of an entity type • Classifications of attributes – Simple versus Composite Attribute – Single-Valued versus Multivalued Attribute – Stored versus Derived Attributes – Identifier Attributes
  • 14. 14 Figure 2-7: A composite attribute An attribute broken into component parts
  • 15. 15 Figure 2-8: Entity with a multivalued attribute (Skill) and derived attribute (Years_Employed) Derived from date employed and current date Multivalued: an employee can have more than one skill
  • 16. 16 Identifier Attribute • Identifier (or key) – an attribute (or combination of attributes) that uniquely identifies individual instances of an entity type • Simple Key versus Composite Key • Candidate Key – an attribute that could be a key…satisfies the requirements for being a key
  • 17. 17 Characteristics of Identifiers • Will not change in value • Will not be null • No intelligent identifiers – e.g. containing locations that might change • Substitute new, simple keys for long, composite keys – e.g. Game_Number instead of Home_Team and Visiting_Team
  • 18. 18 Figure 2-9a: Simple key attribute The key is underlined
  • 19. 19 Figure 2-9b: Composite key attribute The key is composed of two subparts
  • 20. 20 Relationships • Relationship Types vs. Relationship Instances – the relationship type is modeled as the diamond and lines between entity types…the instance is between specific entity instances • Relationships can have attributes – these describe features pertaining to the association between the entities in the relationship
  • 21. 21 Figure 2-10a: Relationship type (Completes) Figure 2-10b: Relationship instances
  • 22. 22 Figure 2-11a: A binary relationship with an attribute Here, the Date_Completed attribute refers to the employee’s completion of a course…it is an attribute of the relationship
  • 23. 23 Associative Entities • It’s an entity – it has attributes • AND it’s a relationship – it links entities together • When should a relationship with attributes instead be an associative entity? – all relationships for the associative entity should be many – the associative entity could have meaning independent of the other entities – the associative entity preferably has a unique identifier, and should also have other attributes – the associative entity may be participating in other relationships other than the entities of the associated relationship – ternary relationships should be converted to associative entities
  • 24. 24 Figure 2-11b: An associative entity (CERTIFICATE) Associative entity involves a rectangle with a diamond inside. Note that the many-to-many cardinality symbols face toward the associative entity and not toward the other entities.
  • 25. 25 Degree of a Relationship • Degree of a Relationship is the number of entity types that participate in it – Unary Relationship (degree 1) – Binary Relationship (degree 2) – Ternary Relationship (degree 3)
  • 26. 26 Figure 2-2: Degree of relationships One entity related to another of the same entity type Entities of two different types related to each other Entities of three different types related to each other
  • 27. 27 Figure 2-12a: Unary relationships
  • 28. 28 Representing a bill-of -materials structure Figure 2-13a: A unary relationship with an attribute. This has a many-to-many relationship
  • 30. 30 Figure 2-13c: An associative entity – bill of materials structure
  • 31. 31 Figure 2-12b: Binary relationships
  • 32. 32 Figure 2-12c: Ternary relationships
  • 33. 33 Figure 2-14: Ternary relationships as an associative entity
  • 34. 34 Cardinality of Relationships • One–to–One – each entity instance in the relationship will have exactly one related entity instance • One–to–Many – an entity instance on one side of the relationship can have many related entity instances, but an entity instance on the other side will have a maximum of one related entity instance • Many–to–Many – entity instances on both sides of the relationship can have many related entity instances on the other side
  • 35. 35 Cardinality Constraints • Cardinality Constraints – the number of instances of one entity that can or must be associated with each instance of another entity • Minimum Cardinality – if zero, then optional – if one or more, then mandatory • Maximum Cardinality – the maximum number
  • 37. 37 Figure 2-16a: Basic relationship with only maximum cardinalities showing Figure 2-17a: Mandatory cardinalities
  • 38. 38 Figure 2-17b: One optional, one mandatory cardinality
  • 39. 39 Figure 2-17c: Optional cardinalities
  • 40. 40 Figure 2-18: Cardinality constraints in a ternary relationship
  • 41. 41 More about Relationships • Modeling Time-Dependent Data – Time Stamps (such as date and time) • Multiple Relationships – more than one relationship between the same entity types
  • 42. 42 Figure 2-19: Example of time stamping
  • 43. 43 Examples of multiple relationships – entities can be related to one another in more than one way Figure 2-21a: Employees and departments
  • 44. 44 Figure 2-21b: Professors and courses (fixed upon constraint) Maximum cardinality constraint is 4
  • 45. 45 Figure 2-22: E-R diagram for Pine Valley Furniture

Hinweis der Redaktion

  1. 3
  2. 8
  3. 5
  4. 12
  5. 13
  6. 6
  7. 7
  8. 14
  9. 15
  10. 17
  11. 20
  12. 21
  13. 16
  14. 8
  15. 22
  16. 25
  17. 27
  18. 23
  19. 24
  20. 29
  21. 8
  22. 1
  23. 34
  24. 36
  25. 37
  26. 40
  27. 41