SlideShare a Scribd company logo
1 of 43
LECTURE 4



slide 4
Relationship
(Unary)

(Binary)

(Ternary)
N-ary Relationship
(Connectivity)
             -   -
  1:1
             -   -
  1:M
             -   -
  M:N
Entity A             Entity B

           Entity
            Entity

      1
                           1
-
-
One-to-
    Many Relationship)

          Entity      A
                     Entity B

Entity
            Entity
-
-
    M
Many-to-
Many Relationship)
Entity A
Entity B
               Entity

 Entity
-   -
M       N
1   M
M   N
Cardinality
EX




     1       M


     0, 3   (1, 1)
EX
           1
          1, 2, 3, 4, 5   6
                              1


     40


Regular
Entity name   Entity

              Weak
              Entity
Regular Entity
                                Strong
 Entity

                               Identity

------------------------------------------------
  ------------------------------------
                  Weak Entity


                                   Parent
 Entity
                              Parent Entity
Identity


    Identity


               -
Employee
EmpID      Name    Sex   Saraly
  001              M     8,500

  002              M     9,000

Time_in_out
  003               F   12,000
EmpID     Date  Time_in Time_o
                          ut
 001    15/2/52   7.30   17.30
 002    15/2/52   8.00   18.00
 003    15/2/52   7.45   17.45
 001    16/2/52   8.00   18.00
 002    16/2/52   7.30   17.00
 003    16/2/52   8.00   17.30
Student                   Subject
 (Strong)                  (Strong)
45001                         01
                              02
45002
                  Regis_Det
                  ail(Weak)



            450     1/45       01
            01
            450     1/45       01
            02
            450     1/45       02
            01
Composite
Composite Entity
          Entity Entity

    Entity
Many to Many
Key Attribute     Composite Entity
          M             N
     Key Attribute    Entity


 M:M     1:M
         1 M           M   1
:
-


-


-   ER
29
ER
      1:1
 ER
ER
                  1:1 (   )

primary key : pk)
foreign key : fk)
ER
                1:M

                      ER
Diagram
                            M
          ER        M
               primary key: pk)
                              M
                  foreign key :
fk)            M
ER
  1:M (   )
ER
        M:N
       ER Diagram

M: N
ER
                M:N (   )
      ER Diagram
M:N
M:N
M   1:M       N



     ER
          1:M
1   M     M   1
E-R
     Diagram
1.
2.

3.

4.

5.




    (Attribute)


    Domain

RelationCardinality    =
 PERSONS
  Name Addres Phone
         s
   Manee   Phitsanulo    1111111
                k                  Tuple
   John    Chaingmai     2222222
   Peter    Bangkok      3333333
   Tata        Tak       4444444
Degree =     Attribute
Domain

Attribute




       salary   integer    8 digits
Data Type
     Emp_name
                     Format chars
                string    15
        sex     string       M,F
ER Diagram









ER Diagram

More Related Content

What's hot

Functional dependencies in Database Management System
Functional dependencies in Database Management SystemFunctional dependencies in Database Management System
Functional dependencies in Database Management SystemKevin Jadiya
 
Fd & Normalization - Database Management System
Fd & Normalization - Database Management SystemFd & Normalization - Database Management System
Fd & Normalization - Database Management SystemDrishti Bhalla
 
Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Shriya agrawal
 
Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalizationVisakh V
 

What's hot (8)

Exploring radicals
Exploring radicalsExploring radicals
Exploring radicals
 
Functional dependencies in Database Management System
Functional dependencies in Database Management SystemFunctional dependencies in Database Management System
Functional dependencies in Database Management System
 
Fd & Normalization - Database Management System
Fd & Normalization - Database Management SystemFd & Normalization - Database Management System
Fd & Normalization - Database Management System
 
Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf
 
Normalization
NormalizationNormalization
Normalization
 
Relation base model
Relation base modelRelation base model
Relation base model
 
Chapter10
Chapter10Chapter10
Chapter10
 
Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalization
 

Viewers also liked

Westminster MPs = Economic National Security Public Interest Case
Westminster MPs = Economic National Security Public Interest CaseWestminster MPs = Economic National Security Public Interest Case
Westminster MPs = Economic National Security Public Interest CasePublic Interests Case
 
Undg multi donor trust funds - 13 may 2010
Undg multi donor trust funds - 13 may 2010Undg multi donor trust funds - 13 may 2010
Undg multi donor trust funds - 13 may 2010Anders Thomsen
 
Russia Kremlin Global Security Interests
Russia Kremlin Global Security InterestsRussia Kremlin Global Security Interests
Russia Kremlin Global Security InterestsPublic Interests Case
 
Undg itf gateway update_30 june 2010
Undg itf gateway update_30 june 2010Undg itf gateway update_30 june 2010
Undg itf gateway update_30 june 2010Anders Thomsen
 
US Senate = Subcommittee Homeland Security = FBI Headquarters Carroll Marylan...
US Senate = Subcommittee Homeland Security = FBI Headquarters Carroll Marylan...US Senate = Subcommittee Homeland Security = FBI Headquarters Carroll Marylan...
US Senate = Subcommittee Homeland Security = FBI Headquarters Carroll Marylan...Public Interests Case
 
10 Downing Street Sir Peter Ricketts Confronts Spectre Rising Carroll Marylan...
10 Downing Street Sir Peter Ricketts Confronts Spectre Rising Carroll Marylan...10 Downing Street Sir Peter Ricketts Confronts Spectre Rising Carroll Marylan...
10 Downing Street Sir Peter Ricketts Confronts Spectre Rising Carroll Marylan...Public Interests Case
 
Maryland Annapolis = "Powers" = Carroll Foundation Charitable Trust Interests
Maryland Annapolis = "Powers" =  Carroll Foundation Charitable Trust InterestsMaryland Annapolis = "Powers" =  Carroll Foundation Charitable Trust Interests
Maryland Annapolis = "Powers" = Carroll Foundation Charitable Trust InterestsPublic Interests Case
 

Viewers also liked (8)

Westminster MPs = Economic National Security Public Interest Case
Westminster MPs = Economic National Security Public Interest CaseWestminster MPs = Economic National Security Public Interest Case
Westminster MPs = Economic National Security Public Interest Case
 
Undg multi donor trust funds - 13 may 2010
Undg multi donor trust funds - 13 may 2010Undg multi donor trust funds - 13 may 2010
Undg multi donor trust funds - 13 may 2010
 
Russia Kremlin Global Security Interests
Russia Kremlin Global Security InterestsRussia Kremlin Global Security Interests
Russia Kremlin Global Security Interests
 
Undg itf gateway update_30 june 2010
Undg itf gateway update_30 june 2010Undg itf gateway update_30 june 2010
Undg itf gateway update_30 june 2010
 
Slide3 relational-stu
Slide3 relational-stuSlide3 relational-stu
Slide3 relational-stu
 
US Senate = Subcommittee Homeland Security = FBI Headquarters Carroll Marylan...
US Senate = Subcommittee Homeland Security = FBI Headquarters Carroll Marylan...US Senate = Subcommittee Homeland Security = FBI Headquarters Carroll Marylan...
US Senate = Subcommittee Homeland Security = FBI Headquarters Carroll Marylan...
 
10 Downing Street Sir Peter Ricketts Confronts Spectre Rising Carroll Marylan...
10 Downing Street Sir Peter Ricketts Confronts Spectre Rising Carroll Marylan...10 Downing Street Sir Peter Ricketts Confronts Spectre Rising Carroll Marylan...
10 Downing Street Sir Peter Ricketts Confronts Spectre Rising Carroll Marylan...
 
Maryland Annapolis = "Powers" = Carroll Foundation Charitable Trust Interests
Maryland Annapolis = "Powers" =  Carroll Foundation Charitable Trust InterestsMaryland Annapolis = "Powers" =  Carroll Foundation Charitable Trust Interests
Maryland Annapolis = "Powers" = Carroll Foundation Charitable Trust Interests
 

Slide4 er-stu