SlideShare a Scribd company logo
1 of 30
1.5 Data Modeling:
• The process of analysis of data and their relationships to other
data objects is known as data modeling.
• It defines how data is connected to each other and how they are
processed and stored inside the system.
• A data model provides a way to describe the design of a database
at the physical, logical, and view levels.
• Underlying the structure of a database is the data model: a
collection of conceptual tools for describing data, data
relationships, data semantics, and consistency constraints.
Mrs. Ujjwala Sachin Patil (SITCOE)
Types of data Model:
1. Record Based Logical Model:
• Relational data Model
• Network Model
• Hierarchical Model
2. E-R Model(Entity Relationship Model)
Mrs. Ujjwala Sachin Patil (SITCOE)
1.Record based Logical Model:
i. Relational Model:
• Relational model is called as record based logical model because the
database is structured in fixed format of different types.
• The relational model uses a collection of tables to represent both data
and the relationships among those data.
• Each table has multiple columns, and each column has a unique name.
• Tables are also known as relations.
• The columns of the table correspond to the attributes of the record type.
• The relational data model is the most widely used data model, and a vast
majority of current database systems are based on the relational model.
• This model is simple and it has all the properties and capabilities
required to process data with storage efficiency.
Mrs. Ujjwala Sachin Patil (SITCOE)
• Tables − In relational data model, relations are saved in the
format of Tables. This format stores the relation among entities. A
table has rows and columns, where rows represents records and
columns represent the attributes.
• Tuple − A single row of a table, which contains a single record for
that relation is called a tuple.
• Relation instance − A finite set of tuples in the relational
database system represents relation instance. Relation instances do
not have duplicate tuples.
• Relation schema − A relation schema describes the relation name
(table name), attributes, and their names.
• Relation key − Each row has one or more attributes, known as
relation key, which can identify the row in the relation (table)
uniquely.
• Attribute domain − Every attribute has some pre-defined value
scope, known as attribute domain.
Mrs. Ujjwala Sachin Patil (SITCOE)
Relational Model represents how data is stored in Relational
Databases. A relational database stores data in the form of relations
(tables). Consider a relation STUDENT with attributes ROLL_NO,
NAME, ADDRESS, PHONE and AGE shown in Table below.
ROLL_NO NAME ADDRESS PHONE AGE
1 RAM DELHI 9455123451 18
2 RAMESH GURGAON 9652431543 18
3 SUJIT ROHTAK 9156253131 20
4 SURESH DELHI 18
Tuple
Attributes/ columns
Mrs. Ujjwala Sachin Patil (SITCOE)
ii. Network Model:
This is an extension of the Hierarchical model. In this model data is
organized more like a graph, and are allowed to have more than one
parent node (many-to-many relationship)
In this database model data is more related as more relationships
are established in this database model.
Mrs. Ujjwala Sachin Patil (SITCOE)
iii. Hierarchical Model:
In hierarchical model, data is organized into tree-like structure with
one one-to-many relationship between two different types of data.
This structure allows repeating information using parent and child
relationships.
In this structure parents can have many children but child can have
only one parent.
for example, one department can have many courses, many
professors and of-course many students.
Mrs. Ujjwala Sachin Patil (SITCOE)
Example of Hierarchical Model:
Mrs. Ujjwala Sachin Patil (SITCOE)
1.6 Data Model Using E-R Model:
• The Entity Relationship(ER) model was originally proposed by
Peter in 1976. E-R model is a way to combine network and
relational database ideas.
• In short ER model is a conceptual data model than views the real
world as entities and relationships.
• This diagram is mainly used to represent data objects in the
pictorial or visual form.
• The main advantage of the entity relationship model is that, when
once it is drawn it can be easily converted into relation or
relational model. The construction done in ER model can easily be
transformed into relational tables.
Mrs. Ujjwala Sachin Patil (SITCOE)
ER Model is based on −
• Entities and their attributes.
• Relationships among entities.
• Entity-Relationship (ER) Model is based on the notion of real-
world entities and relationships among them. While formulating
real-world scenario into the database model, the ER Model creates
entity set, relationship set, general attributes and constraints.
• ER Model is best used for the conceptual design of a database.
Mrs. Ujjwala Sachin Patil (SITCOE)
Entity and Relationship:
• Entity − An entity in an ER Model is a real-world entity having
properties called attributes. Every attribute is defined by its set
of values called domain. For example, in a school database, a
student is considered as an entity. Student has various attributes
like name, age, class, etc.
• Relationship − The logical association among entities is
called relationship. Relationships are mapped with entities in
various ways. Mapping cardinalities define the number of
association between two entities.
Mrs. Ujjwala Sachin Patil (SITCOE)
Mapping cardinalities −
• one to one
• one to many
• many to one
• many to many
Cardinality defines the number of entities in one entity set,
which can be associated with the number of entities of other set
via relationship set.
Mrs. Ujjwala Sachin Patil (SITCOE)
One-to-one − One entity from entity set A can be
associated with at most one entity of entity set B and vice
versa.
Mrs. Ujjwala Sachin Patil (SITCOE)
One-to-many − One entity from entity set A can be
associated with more than one entities of entity set B
however an entity from entity set B, can be associated with
at most one entity.
Mrs. Ujjwala Sachin Patil (SITCOE)
Many-to-one − More than one entities from entity set A can
be associated with at most one entity of entity set B,
however an entity from entity set B can be associated with
more than one entity from entity set A.
Mrs. Ujjwala Sachin Patil (SITCOE)
Many-to-many − One entity from A can be associated with
more than one entity from B and vice versa.
Mrs. Ujjwala Sachin Patil (SITCOE)
Strong and Weak Entity Set:
Strong Entity Set:
The strong entity has a primary key. Weak entities are dependent on
strong entity. Its existence is not dependent on any other entity.
Strong Entity is represented by a single rectangle:
Mrs. Ujjwala Sachin Patil (SITCOE)
Weak Entity
A weak entity is an entity that depends on the existence of another
entity. In other words it can not be identified by itself. It uses
foreign key combined with its attributed to form the primary key.
The weak entity in DBMS do not have a primary key and are
dependent on the parent entity. It mainly depends on other entities.
Weak Entity is represented by double rectangle:
Mrs. Ujjwala Sachin Patil (SITCOE)
Example of Strong and Weak Entity
The example of strong and weak entity can be understood by the
below figure.
The Strong Entity is Professor, whereas Dependent is a Weak
Entity.
ID is the primary key (represented with a line) and Name
in Dependent entity is called Partial Key (represented with a
dotted line).
Mrs. Ujjwala Sachin Patil (SITCOE)
Relationship:
Relationships are represented by diamond-shaped box. Name of the
relationship is written inside the diamond-box. All the entities
(rectangles) participating in a relationship, are connected to it by a
line.
Binary Relationship and Cardinality
A relationship where two entities are participating is called
a binary relationship. Cardinality is the number of instance of an
entity from a relation that can be associated with the relation.
One-to-one
One-to-many
Many-to-one
Many-to-many
Mrs. Ujjwala Sachin Patil (SITCOE)
One-to-one − When only one instance of an entity is
associated with the relationship, it is marked as '1:1'. The
following image reflects that only one instance of each
entity should be associated with the relationship. It depicts
one-to-one relationship.
Mrs. Ujjwala Sachin Patil (SITCOE)
One-to-many − When more than one instance of an entity is
associated with a relationship, it is marked as '1:N'. The
following image reflects that only one instance of entity on
the left and more than one instance of an entity on the
right can be associated with the relationship. It depicts
one-to-many relationship.
Mrs. Ujjwala Sachin Patil (SITCOE)
Many-to-one − When more than one instance of entity is
associated with the relationship, it is marked as 'N:1'. The
following image reflects that more than one instance of an
entity on the left and only one instance of an entity on the
right can be associated with the relationship. It depicts
many-to-one relationship.
Mrs. Ujjwala Sachin Patil (SITCOE)
Many-to-many − The following image reflects that more
than one instance of an entity on the left and more than
one instance of an entity on the right can be associated
with the relationship. It depicts many-to-many relationship.
Mrs. Ujjwala Sachin Patil (SITCOE)
Attributes:
Attributes are the properties of entities. Attributes are represented
by means of ellipses. Every ellipse represents one attribute and is
directly connected to its entity (rectangle).
Attributes
Mrs. Ujjwala Sachin Patil (SITCOE)
Types of Attributes:
• Simple attribute
• Composite attribute
• Derived attribute
• Single-value attribute
• Multi-value attribute
Mrs. Ujjwala Sachin Patil (SITCOE)
Simple attribute − Simple attributes are atomic values, which
cannot be divided further. For example, a student's phone number is
an atomic value of 10 digits.
Composite attribute − Composite attributes are made of more than
one simple attribute. For example, a student's complete name may
have first_name and last_name.
If the attributes are composite, they are further divided in a tree like
structure. Every node is then connected to its attribute. That is,
composite attributes are represented by ellipses that are connected
with an ellipse.
e.g.
Mrs. Ujjwala Sachin Patil (SITCOE)
Derived attribute − Derived attributes are the attributes that do not
exist in the physical database, but their values are derived from
other attributes present in the database. For example,
average_salary in a department should not be saved directly in the
database, instead it can be derived. For another example, age can be
derived from data_of_birth.
Derived attributes are depicted by dashed ellipse.
Mrs. Ujjwala Sachin Patil (SITCOE)
Single-value attribute − Single-value attributes contain single
value. For example − Social_Security_Number.
Multi-value attribute − Multi-value attributes may contain more
than one values. For example, a person can have more than one
phone number, email_address, etc.
Multivalued attributes are depicted by double ellipse.
Mrs. Ujjwala Sachin Patil (SITCOE)
Mrs. Ujjwala Sachin Patil (SITCOE)

More Related Content

Similar to Dada Modeling.pptx

Similar to Dada Modeling.pptx (20)

Er model
Er modelEr model
Er model
 
Database design
Database designDatabase design
Database design
 
Unit iv dbms
Unit   iv dbmsUnit   iv dbms
Unit iv dbms
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
 
ERD(2).ppt
ERD(2).pptERD(2).ppt
ERD(2).ppt
 
RDBMS ERD
RDBMS ERDRDBMS ERD
RDBMS ERD
 
Entity relationship-diagrams
Entity relationship-diagramsEntity relationship-diagrams
Entity relationship-diagrams
 
Data Models & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML
 
Entity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptxEntity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptx
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptx
 
database.pptx
database.pptxdatabase.pptx
database.pptx
 
18306_lec-2 (1).ppt
18306_lec-2 (1).ppt18306_lec-2 (1).ppt
18306_lec-2 (1).ppt
 
Data Models
Data ModelsData Models
Data Models
 
erdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdferdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdf
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
 
ER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docxER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docx
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
 

Recently uploaded

Scouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring methodScouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring methodvimal412355
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Stationsiddharthteach18
 
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfssuserded2d4
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)ChandrakantDivate1
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxhublikarsn
 
DFT - Discrete Fourier Transform and its Properties
DFT - Discrete Fourier Transform and its PropertiesDFT - Discrete Fourier Transform and its Properties
DFT - Discrete Fourier Transform and its PropertiesShiny Christobel
 
Fundamentals of Structure in C Programming
Fundamentals of Structure in C ProgrammingFundamentals of Structure in C Programming
Fundamentals of Structure in C ProgrammingChandrakantDivate1
 
Danikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfDanikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfthietkevietthinh
 
Presentation on Slab, Beam, Column, and Foundation/Footing
Presentation on Slab,  Beam, Column, and Foundation/FootingPresentation on Slab,  Beam, Column, and Foundation/Footing
Presentation on Slab, Beam, Column, and Foundation/FootingEr. Suman Jyoti
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdfVinayVadlagattu
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesChandrakantDivate1
 
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
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxMustafa Ahmed
 
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Payal Garg #K09
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptjigup7320
 
Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2ChandrakantDivate1
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelDrAjayKumarYadav4
 

Recently uploaded (20)

Scouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring methodScouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring method
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Station
 
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
TMU_GDSC_20240509.pdfTMU_GDSC_20240509.pdf
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
 
DFT - Discrete Fourier Transform and its Properties
DFT - Discrete Fourier Transform and its PropertiesDFT - Discrete Fourier Transform and its Properties
DFT - Discrete Fourier Transform and its Properties
 
Fundamentals of Structure in C Programming
Fundamentals of Structure in C ProgrammingFundamentals of Structure in C Programming
Fundamentals of Structure in C Programming
 
Danikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfDanikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdf
 
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
 
Presentation on Slab, Beam, Column, and Foundation/Footing
Presentation on Slab,  Beam, Column, and Foundation/FootingPresentation on Slab,  Beam, Column, and Foundation/Footing
Presentation on Slab, Beam, Column, and Foundation/Footing
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdf
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
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
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 
Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 

Dada Modeling.pptx

  • 1. 1.5 Data Modeling: • The process of analysis of data and their relationships to other data objects is known as data modeling. • It defines how data is connected to each other and how they are processed and stored inside the system. • A data model provides a way to describe the design of a database at the physical, logical, and view levels. • Underlying the structure of a database is the data model: a collection of conceptual tools for describing data, data relationships, data semantics, and consistency constraints. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 2. Types of data Model: 1. Record Based Logical Model: • Relational data Model • Network Model • Hierarchical Model 2. E-R Model(Entity Relationship Model) Mrs. Ujjwala Sachin Patil (SITCOE)
  • 3. 1.Record based Logical Model: i. Relational Model: • Relational model is called as record based logical model because the database is structured in fixed format of different types. • The relational model uses a collection of tables to represent both data and the relationships among those data. • Each table has multiple columns, and each column has a unique name. • Tables are also known as relations. • The columns of the table correspond to the attributes of the record type. • The relational data model is the most widely used data model, and a vast majority of current database systems are based on the relational model. • This model is simple and it has all the properties and capabilities required to process data with storage efficiency. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 4. • Tables − In relational data model, relations are saved in the format of Tables. This format stores the relation among entities. A table has rows and columns, where rows represents records and columns represent the attributes. • Tuple − A single row of a table, which contains a single record for that relation is called a tuple. • Relation instance − A finite set of tuples in the relational database system represents relation instance. Relation instances do not have duplicate tuples. • Relation schema − A relation schema describes the relation name (table name), attributes, and their names. • Relation key − Each row has one or more attributes, known as relation key, which can identify the row in the relation (table) uniquely. • Attribute domain − Every attribute has some pre-defined value scope, known as attribute domain. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 5. Relational Model represents how data is stored in Relational Databases. A relational database stores data in the form of relations (tables). Consider a relation STUDENT with attributes ROLL_NO, NAME, ADDRESS, PHONE and AGE shown in Table below. ROLL_NO NAME ADDRESS PHONE AGE 1 RAM DELHI 9455123451 18 2 RAMESH GURGAON 9652431543 18 3 SUJIT ROHTAK 9156253131 20 4 SURESH DELHI 18 Tuple Attributes/ columns Mrs. Ujjwala Sachin Patil (SITCOE)
  • 6. ii. Network Model: This is an extension of the Hierarchical model. In this model data is organized more like a graph, and are allowed to have more than one parent node (many-to-many relationship) In this database model data is more related as more relationships are established in this database model. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 7. iii. Hierarchical Model: In hierarchical model, data is organized into tree-like structure with one one-to-many relationship between two different types of data. This structure allows repeating information using parent and child relationships. In this structure parents can have many children but child can have only one parent. for example, one department can have many courses, many professors and of-course many students. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 8. Example of Hierarchical Model: Mrs. Ujjwala Sachin Patil (SITCOE)
  • 9. 1.6 Data Model Using E-R Model: • The Entity Relationship(ER) model was originally proposed by Peter in 1976. E-R model is a way to combine network and relational database ideas. • In short ER model is a conceptual data model than views the real world as entities and relationships. • This diagram is mainly used to represent data objects in the pictorial or visual form. • The main advantage of the entity relationship model is that, when once it is drawn it can be easily converted into relation or relational model. The construction done in ER model can easily be transformed into relational tables. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 10. ER Model is based on − • Entities and their attributes. • Relationships among entities. • Entity-Relationship (ER) Model is based on the notion of real- world entities and relationships among them. While formulating real-world scenario into the database model, the ER Model creates entity set, relationship set, general attributes and constraints. • ER Model is best used for the conceptual design of a database. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 11. Entity and Relationship: • Entity − An entity in an ER Model is a real-world entity having properties called attributes. Every attribute is defined by its set of values called domain. For example, in a school database, a student is considered as an entity. Student has various attributes like name, age, class, etc. • Relationship − The logical association among entities is called relationship. Relationships are mapped with entities in various ways. Mapping cardinalities define the number of association between two entities. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 12. Mapping cardinalities − • one to one • one to many • many to one • many to many Cardinality defines the number of entities in one entity set, which can be associated with the number of entities of other set via relationship set. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 13. One-to-one − One entity from entity set A can be associated with at most one entity of entity set B and vice versa. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 14. One-to-many − One entity from entity set A can be associated with more than one entities of entity set B however an entity from entity set B, can be associated with at most one entity. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 15. Many-to-one − More than one entities from entity set A can be associated with at most one entity of entity set B, however an entity from entity set B can be associated with more than one entity from entity set A. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 16. Many-to-many − One entity from A can be associated with more than one entity from B and vice versa. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 17. Strong and Weak Entity Set: Strong Entity Set: The strong entity has a primary key. Weak entities are dependent on strong entity. Its existence is not dependent on any other entity. Strong Entity is represented by a single rectangle: Mrs. Ujjwala Sachin Patil (SITCOE)
  • 18. Weak Entity A weak entity is an entity that depends on the existence of another entity. In other words it can not be identified by itself. It uses foreign key combined with its attributed to form the primary key. The weak entity in DBMS do not have a primary key and are dependent on the parent entity. It mainly depends on other entities. Weak Entity is represented by double rectangle: Mrs. Ujjwala Sachin Patil (SITCOE)
  • 19. Example of Strong and Weak Entity The example of strong and weak entity can be understood by the below figure. The Strong Entity is Professor, whereas Dependent is a Weak Entity. ID is the primary key (represented with a line) and Name in Dependent entity is called Partial Key (represented with a dotted line). Mrs. Ujjwala Sachin Patil (SITCOE)
  • 20. Relationship: Relationships are represented by diamond-shaped box. Name of the relationship is written inside the diamond-box. All the entities (rectangles) participating in a relationship, are connected to it by a line. Binary Relationship and Cardinality A relationship where two entities are participating is called a binary relationship. Cardinality is the number of instance of an entity from a relation that can be associated with the relation. One-to-one One-to-many Many-to-one Many-to-many Mrs. Ujjwala Sachin Patil (SITCOE)
  • 21. One-to-one − When only one instance of an entity is associated with the relationship, it is marked as '1:1'. The following image reflects that only one instance of each entity should be associated with the relationship. It depicts one-to-one relationship. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 22. One-to-many − When more than one instance of an entity is associated with a relationship, it is marked as '1:N'. The following image reflects that only one instance of entity on the left and more than one instance of an entity on the right can be associated with the relationship. It depicts one-to-many relationship. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 23. Many-to-one − When more than one instance of entity is associated with the relationship, it is marked as 'N:1'. The following image reflects that more than one instance of an entity on the left and only one instance of an entity on the right can be associated with the relationship. It depicts many-to-one relationship. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 24. Many-to-many − The following image reflects that more than one instance of an entity on the left and more than one instance of an entity on the right can be associated with the relationship. It depicts many-to-many relationship. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 25. Attributes: Attributes are the properties of entities. Attributes are represented by means of ellipses. Every ellipse represents one attribute and is directly connected to its entity (rectangle). Attributes Mrs. Ujjwala Sachin Patil (SITCOE)
  • 26. Types of Attributes: • Simple attribute • Composite attribute • Derived attribute • Single-value attribute • Multi-value attribute Mrs. Ujjwala Sachin Patil (SITCOE)
  • 27. Simple attribute − Simple attributes are atomic values, which cannot be divided further. For example, a student's phone number is an atomic value of 10 digits. Composite attribute − Composite attributes are made of more than one simple attribute. For example, a student's complete name may have first_name and last_name. If the attributes are composite, they are further divided in a tree like structure. Every node is then connected to its attribute. That is, composite attributes are represented by ellipses that are connected with an ellipse. e.g. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 28. Derived attribute − Derived attributes are the attributes that do not exist in the physical database, but their values are derived from other attributes present in the database. For example, average_salary in a department should not be saved directly in the database, instead it can be derived. For another example, age can be derived from data_of_birth. Derived attributes are depicted by dashed ellipse. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 29. Single-value attribute − Single-value attributes contain single value. For example − Social_Security_Number. Multi-value attribute − Multi-value attributes may contain more than one values. For example, a person can have more than one phone number, email_address, etc. Multivalued attributes are depicted by double ellipse. Mrs. Ujjwala Sachin Patil (SITCOE)
  • 30. Mrs. Ujjwala Sachin Patil (SITCOE)