SlideShare a Scribd company logo
1 of 40
Download to read offline
Perancangan Basis Data
        6 Oktober 2011
Chapter Outline
    ο‚— Example Database Application (COMPANY)
    ο‚— ER Model Concepts
         ο‚— Entities and Attributes
         ο‚— Entity Types, Value Sets, and Key Attributes
         ο‚— Relationships and Relationship Types
         ο‚— Weak Entity Types
         ο‚— Roles and Attributes in Relationship Types
    ο‚— ER Diagrams - Notation
    ο‚— ER Diagram for COMPANY Schema
    ο‚— Alternative Notations – UML class diagrams, others




Chapter 3-2           Perancangan Basis Data
Motivating Example
ο‚— Mencari jadwal kelas pengganti
ο‚— Setiap mahasiswa memiliki jadwal kuliah
ο‚— Cari irisan waktu kosong di antara semua mahasiswa
       Nama    Senin       Selasa       Rabu   Kamis   Jumat
       Joey    ##                       ##             ##
       Tyler   ##                       ##     ##
       Joel    ##                                      ##
       Lee                 ##                  ##
       Boer                             ##
       Amir                ##                  ##      ##

               Perancangan Basis Data                          3
Motivating Example
ο‚— Bagaimana menemukan jawaban informasinya?
ο‚— Gunakan konsep himpunan




            Perancangan Basis Data            4
Example COMPANY Database

 ο‚— Requirements of the Company (oversimplified for
     illustrative purposes)
      ο‚— The company is organized into DEPARTMENTs. Each
        department has a name, number and an employee
        who manages the department. We keep track of the
        start date of the department manager.
      ο‚— Each department controls a number of PROJECTs.
        Each project has a name, number and is located at a
        single location.


Chapter 3-5       Perancangan Basis Data
Example COMPANY Database (Cont.)


      ο‚—We store each EMPLOYEE’s social security number,
       address, salary, sex, and birthdate. Each employee
       works for one department but may work on several
       projects. We keep track of the number of hours per
       week that an employee currently works on each
       project. We also keep track of the direct supervisor of
       each employee.
      ο‚—Each employee may have a number of DEPENDENTs.
       For each dependent, we keep track of their name, sex,
       birthdate, and relationship to employee.

Chapter 3-6       Perancangan Basis Data
ER Model Concepts
    ο‚— Entities and Attributes
         ο‚— Entities are specific objects or things in the mini-world that are
           represented in the database. For example the EMPLOYEE John
           Smith, the Research DEPARTMENT, the ProductX PROJECT
         ο‚— Attributes are properties used to describe an entity. For
           example an EMPLOYEE entity may have a Name, SSN, Address,
           Sex, BirthDate
         ο‚— A specific entity will have a value for each of its attributes. For
           example a specific employee entity may have Name='John
           Smith', SSN='123456789', Address ='731, Fondren, Houston, TX',
           Sex='M', BirthDate='09-JAN-55β€˜
         ο‚— Each attribute has a value set (or data type) associated with it –
           e.g. integer, string, subrange, enumerated type, …



Chapter 3-7           Perancangan Basis Data
Types of Attributes (1)
     ο‚— Simple
          ο‚— Each entity has a single atomic value for the attribute. For
               example, SSN or Sex.
     ο‚— Composite
          ο‚— The attribute may be composed of several components. For
               example, Address (Apt#, House#, Street, City, State, ZipCode,
               Country) or Name (FirstName, MiddleName, LastName).
               Composition may form a hierarchy where some components
               are themselves composite.
     ο‚— Multi-valued
          ο‚— An entity may have multiple values for that attribute. For
               example, Color of a CAR or PreviousDegrees of a STUDENT.
               Denoted as {Color} or {PreviousDegrees}.



 Chapter 3-8             Perancangan Basis Data
Types of Attributes (2)
     ο‚— In general, composite and multi-valued attributes may be
         nested arbitrarily to any number of levels although this is
         rare. For example, PreviousDegrees of a STUDENT is a
         composite multi-valued attribute denoted by
         {PreviousDegrees (College, Year, Degree, Field)}.




 Chapter 3-9         Perancangan Basis Data
Entity Types and Key Attributes
    ο‚— Entities with the same basic attributes are grouped or
      typed into an entity type. For example, the EMPLOYEE
      entity type or the PROJECT entity type.
    ο‚— An attribute of an entity type for which each entity must
      have a unique value is called a key attribute of the entity
      type. For example, SSN of EMPLOYEE.
    ο‚— A key attribute may be composite. For example,
      VehicleTagNumber is a key of the CAR entity type with
      components (Number, State).
    ο‚— An entity type may have more than one key. For example,
      the CAR entity type may have two keys:
         ο‚— VehicleIdentificationNumber (popularly called VIN) and
         ο‚— VehicleTagNumber (Number, State), also known as
               license_plate number.

Chapter 3-10             Perancangan Basis Data
ENTITY SET corresponding to the
ENTITY TYPE CAR
                                              CAR
Registration(RegistrationNumber, State), VehicleID, Make, Model, Year, (Color)

                                  car1
 ((ABC 123, TEXAS), TK629, Ford Mustang, convertible, 1999, (red, black))
                                  car2
   ((ABC 123, NEW YORK), WP9872, Nissan 300ZX, 2-door, 2002, (blue))
                                  car3
   ((VSY 720, TEXAS), TD729, Buick LeSabre, 4-door, 2003, (white, blue))
                                               .
                                               .
                                               .


 Chapter 3-11        Perancangan Basis Data
SUMMARY OF ER-DIAGRAM
NOTATION FOR ER SCHEMAS   Symbol                 Meaning

                                                 ENTITY TYPE

                                                 WEAK ENTITY TYPE

                                                 RELATIONSHIP TYPE

                                                 IDENTIFYING RELATIONSHIP TYPE

                                                 ATTRIBUTE

                                                 KEY ATTRIBUTE

                                                 MULTIVALUED ATTRIBUTE

                                                 COMPOSITE ATTRIBUTE

                                                 DERIVED ATTRIBUTE

         E1     R                      E2        TOTAL PARTICIPATION OF E2 IN R

                    N                            CARDINALITY RATIO 1:N FOR E1:E2 IN R
         E1     R               E2

                    (min,max)                    STRUCTURAL CONSTRAINT (min, max) ON PARTICIPATION
                R                  E             OF E IN R

 Chapter 3-12           Perancangan Basis Data
ER DIAGRAM – Entity Types are:
   EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT




Chapter 3-13    Perancangan Basis Data
Relationships and Relationship Types (1)
     ο‚— A relationship relates two or more distinct entities with a
       specific meaning. For example, EMPLOYEE John Smith
       works on the ProductX PROJECT or EMPLOYEE Franklin
       Wong manages the Research DEPARTMENT.
     ο‚— Relationships of the same type are grouped or typed into a
       relationship type. For example, the WORKS_ON
       relationship type in which EMPLOYEEs and PROJECTs
       participate, or the MANAGES relationship type in which
       EMPLOYEEs and DEPARTMENTs participate.
     ο‚— The degree of a relationship type is the number of
       participating entity types. Both MANAGES and
       WORKS_ON are binary relationships.



 Chapter 3-14       Perancangan Basis Data
Example relationship instances of the WORKS_FOR relationship
between EMPLOYEE and DEPARTMENT
     EMPLOYEE                      WORKS_FOR       DEPARTMENT



            e1   
                                              r1         d1
            e2                               r2
            e3                                          d2
                                              r3
            e4   
                                              r4
            e5                                           d3
                 
                                              r5
            e6   

            e7                                r6
                 

                                              r7


  Chapter 3-15       Perancangan Basis Data
Example relationship instances of the WORKS_ON relationship
between EMPLOYEE and PROJECT


          e1    
                                             r1        p1
          e2                                r2
          e3                                          p2
                                             r3
          e4    
                                             r4
          e5                                           p3
                
                                             r5
          e6    

          e7                                 r6
                

                                             r7


 Chapter 3-16       Perancangan Basis Data
Relationships and Relationship Types (2)
     ο‚— More than one relationship type can exist with the same
         participating entity types. For example, MANAGES and
         WORKS_FOR are distinct relationships between
         EMPLOYEE and DEPARTMENT, but with different
         meanings and different relationship instances.




 Chapter 3-17       Perancangan Basis Data
ER DIAGRAM – Relationship Types are:
   WORKS_FOR, MANAGES, WORKS_ON, CONTROLS,
   SUPERVISION, DEPENDENTS_OF




Chapter 3-18    Perancangan Basis Data
Weak Entity Types
 ο‚— An entity that does not have a key attribute
 ο‚— A weak entity must participate in an identifying
   relationship type with an owner or identifying entity type
 ο‚— Entities are identified by the combination of:
    ο‚— A partial key of the weak entity type
    ο‚— The particular entity they are related to in the
      identifying entity type
 Example:
 Suppose that a DEPENDENT entity is identified by the
   dependent’s first name and birhtdate, and the specific
   EMPLOYEE that the dependent is related to.
   DEPENDENT is a weak entity type with EMPLOYEE as its
   identifying entity type via the identifying relationship
   type DEPENDENT_OF
Chapter 3-19     Perancangan Basis Data
Weak Entity Type is: DEPENDENT
   Identifying Relationship is: DEPENDENTS_OF




Chapter 3-20     Perancangan Basis Data
Constraints on Relationships

 ο‚— Constraints on Relationship Types
      ο‚— ( Also known as ratio constraints )
      ο‚— Maximum Cardinality
        ο‚— One-to-one (1:1)
        ο‚— One-to-many (1:N) or Many-to-one (N:1)
        ο‚— Many-to-many
      ο‚— Minimum Cardinality (also called participation
         constraint or existence dependency constraints)
          ο‚—    zero (optional participation, not existence-dependent)
          ο‚—    one or more (mandatory, existence-dependent)


Chapter 3-21           Perancangan Basis Data
Many-to-one (N:1) RELATIONSHIP
    EMPLOYEE                   WORKS_FOR       DEPARTMENT



          e1                             r1       d1
          e2                             r2
          e3                                      d2
                                          r3
          e4 
                                          r4
          e5                                      d3
                                          r5
          e6 
          e7                             r6

                                          r7


 Chapter 3-22    Perancangan Basis Data
Many-to-many (M:N) RELATIONSHIP


         e1    
                                            r1      p1
         e2                                r2
         e3                                        p2
                                            r3
         e4    
                                            r4
         e5                                         p3
               
                                            r5
         e6    

         e7                                 r6
               

                                            r7


Chapter 3-23       Perancangan Basis Data
Relationships and Relationship Types (3)
     ο‚— We can also have a recursive relationship type.
     ο‚— Both participations are same entity type in different roles.
     ο‚— For example, SUPERVISION relationships between
       EMPLOYEE (in role of supervisor or boss) and (another)
       EMPLOYEE (in role of subordinate or worker).
     ο‚— In following figure, first role participation labeled with 1
       and second role participation labeled with 2.
     ο‚— In ER diagram, need to display role names to distinguish
       participations.




 Chapter 3-24       Perancangan Basis Data
A RECURSIVE RELATIONSHIP
SUPERVISION
                EMPLOYEE                                                SUPERVISION



                  e1                                2
                                                                           r1
                                                    1
                  e2                                           2
                                                        1                   r2
                  e3                        2
                                      1                                     r3
                  e4   
                                                        2
                  e5                                                1
                                                           1               r4
                  e6   
                                             2
                                                                1
                                                                            r5
                  e7   
                                                                    2
                                                                            r6


 Chapter 3-25              Perancangan Basis Data
Recursive Relationship Type is: SUPERVISION
   (participation role names are shown)




Chapter 3-26     Perancangan Basis Data
Attributes of Relationship types

ο‚— A relationship type can have attributes; for example,
  HoursPerWeek of WORKS_ON; its value for each
  relationship instance describes the number of hours per
  week that an EMPLOYEE works on a PROJECT.




Chapter 3-27   Perancangan Basis Data
Attribute of a Relationship Type is:
   Hours of WORKS_ON




Chapter 3-28      Perancangan Basis Data
Structural Constraints –
   one way to express semantics
   of relationships
    Structural constraints on relationships:
       Cardinality ratio (of a binary relationship): 1:1, 1:N,
        N:1, or M:N
          SHOWN BY PLACING APPROPRIATE NUMBER ON THE
           LINK.
       Participation constraint (on each participating entity
        type): total (called existence dependency) or partial.
           SHOWN BY DOUBLE LINING THE LINK

    NOTE: These are easy to specify for Binary Relationship
     Types.

Chapter 3-29         Perancangan Basis Data
Alternative (min, max) notation for relationship structural
    constraints:
 Specified on each participation of an entity type E in a relationship type
  R
 Specifies that each entity e in E participates in at least min and at most
  max relationship instances in R
 Default(no constraint): min=0, max=n

 Must have minο‚£max, minο‚³0, max ο‚³1

 Derived from the knowledge of mini-world constraints

Examples:
 A department has exactly one manager and an employee can manage at
  most one department.
        ο‚—   Specify (0,1) for participation of EMPLOYEE in MANAGES
        ο‚—   Specify (1,1) for participation of DEPARTMENT in MANAGES
   An employee can work for exactly one department but a department can
    have any number of employees.
        ο‚—    Specify (1,1) for participation of EMPLOYEE in WORKS_FOR
Chapter 3-30 Specify (0,n) for participation of DEPARTMENT in WORKS_FOR
         ο‚—                 Perancangan Basis Data
COMPANY ER Schema Diagram
using (min, max) notation




Chapter 3-31   Perancangan Basis Data
Relationships of Higher Degree


   Relationship types of degree 2 are called binary
   Relationship types of degree 3 are called ternary and
    of degree n are called n-ary
   In general, an n-ary relationship is not equivalent to n
    binary relationships
   Higher-order relationships discussed further in
    Chapter 4

Chapter 3-32     Perancangan Basis Data
Data Modeling Tools
 A number of popular tools that cover conceptual
  modeling and mapping into relational schema
  design. Examples: ERWin, S- Designer (Enterprise
  Application Suite), ER- Studio, etc.
 POSITIVES: serves as documentation of application
  requirements, easy user interface - mostly graphics
  editor support




Chapter 3-33   Perancangan Basis Data
Some of the Currently Available Automated Database
                                      Design Tools

    COMPANY                      TOOL                                 FUNCTIONALITY
Embarcadero         ER Studio                        Database Modeling in ER and IDEF1X
Technologies
                    DB Artisan                       Database administration and space and security
                                                     management
Oracle              Developer 2000 and Designer      Database modeling, application development
                    2000
Popkin Software     System Architect 2001            Data modeling, object modeling, process modeling,
                                                     structured analysis/design
Platinum            Platinum Enterprice              Data, process, and business component modeling
Technology          Modeling Suite: Erwin,
                    BPWin, Paradigm Plus
Persistence Inc.    Pwertier                         Mapping from O-O to relational model

Rational            Rational Rose                    Modeling in UML and application generation in C++
                                                     and JAVA
Rogue Ware          RW Metro                         Mapping from O-O to relational model

Resolution Ltd.     Xcase                            Conceptual modeling up to code maintenance

Sybase              Enterprise Application Suite     Data modeling, business logic modeling
Visio               Visio Enterprise                 Data modeling, design and reengineering Visual Basic
                                                     and Visual C++

Chapter 3-34                Perancangan Basis Data
Notasi Alternatif
ο‚— IDEF1X
ο‚— Class Diagram




             Perancangan Basis Data   35
IDEF1X




         Perancangan Basis Data   36
ER DIAGRAM FOR A BANK
DATABASE




               Β© The Benjamin/Cummings Publishing Company, Inc. 1994, Elmasri/Navathe, Fundamentals of Database Systems, Second Edition



Chapter 3-37                  Perancangan Basis Data
Which one is true?
ο‚— Pemodelan ER bersifat subjektif
ο‚— Tidak ada model ER yang 'benar'
ο‚— Melalui proses berulang
ο‚— Intuition dan Reasonable reasoning
ο‚— Pengalaman
ο‚— Latihan, latihan, latihan, latihan




               Perancangan Basis Data   38
Pustaka
ο‚— Elmasri, et.al. "Fundamentals of Database Systems"
ο‚— http://tjerdastangkas.blogspot.com/search/label/ikd312




               Perancangan Basis Data                      39
Kamis, 6 Oktober 2011

More Related Content

What's hot

Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution ManualData Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manualendokayle
Β 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesJafar Nesargi
Β 
Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)
Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)
Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)Rai University
Β 
27 f157al5enhanced er diagram
27 f157al5enhanced er diagram27 f157al5enhanced er diagram
27 f157al5enhanced er diagramdddgh
Β 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Typesaakanksha s
Β 
Schema relationship to E-R diagram
Schema relationship to E-R diagramSchema relationship to E-R diagram
Schema relationship to E-R diagramBadrul Alam
Β 
Test presentation
Test presentationTest presentation
Test presentationnuvole
Β 
Database Management System
Database Management System Database Management System
Database Management System FellowBuddy.com
Β 
ER model
ER modelER model
ER modelpaddu123
Β 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Maniguest1e0229a
Β 

What's hot (19)

dbms
dbmsdbms
dbms
Β 
Chapter3
Chapter3Chapter3
Chapter3
Β 
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution ManualData Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Β 
Chapter2
Chapter2Chapter2
Chapter2
Β 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databases
Β 
Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)
Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)
Bsc cs ii-dbms- u-iii-data modeling using e.r. model (entity relationship model)
Β 
27 f157al5enhanced er diagram
27 f157al5enhanced er diagram27 f157al5enhanced er diagram
27 f157al5enhanced er diagram
Β 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Types
Β 
Schema relationship to E-R diagram
Schema relationship to E-R diagramSchema relationship to E-R diagram
Schema relationship to E-R diagram
Β 
Test presentation
Test presentationTest presentation
Test presentation
Β 
Database Management System
Database Management System Database Management System
Database Management System
Β 
ER model
ER modelER model
ER model
Β 
Database Chapter 3
Database Chapter 3Database Chapter 3
Database Chapter 3
Β 
E r model
E r modelE r model
E r model
Β 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Mani
Β 
1869495 er diagrams
1869495 er diagrams1869495 er diagrams
1869495 er diagrams
Β 
Kul 2
Kul 2Kul 2
Kul 2
Β 
Chapter2
Chapter2Chapter2
Chapter2
Β 
dbms er model
dbms er modeldbms er model
dbms er model
Β 

Viewers also liked

MRLC MR/SR Oct 2016
MRLC MR/SR Oct 2016MRLC MR/SR Oct 2016
MRLC MR/SR Oct 2016Faye Brownlie
Β 
Investment decisions for pension funds by intangible value capital
Investment decisions for pension funds by intangible value capitalInvestment decisions for pension funds by intangible value capital
Investment decisions for pension funds by intangible value capitalJAYARAMAN IYER
Β 
Langley primary
Langley primaryLangley primary
Langley primaryFaye Brownlie
Β 
Ralph Capabilities Deck RR
Ralph Capabilities Deck RRRalph Capabilities Deck RR
Ralph Capabilities Deck RRJay Armitage
Β 
Rupert.Reading.Jan 2015
Rupert.Reading.Jan 2015 Rupert.Reading.Jan 2015
Rupert.Reading.Jan 2015 Faye Brownlie
Β 
Innovation mentoring grant proposal 100113 rev 1
Innovation mentoring grant proposal 100113 rev 1Innovation mentoring grant proposal 100113 rev 1
Innovation mentoring grant proposal 100113 rev 1John Michitson
Β 
Office 365 + Windows Azure (del 2)
Office 365 + Windows Azure (del 2)Office 365 + Windows Azure (del 2)
Office 365 + Windows Azure (del 2)Wictor WilΓ©n
Β 
Planetario 2ΒΊ ciclo 2013
Planetario 2ΒΊ ciclo 2013Planetario 2ΒΊ ciclo 2013
Planetario 2ΒΊ ciclo 2013XXX XXX
Β 
UX / CX in the context of creative & marketing industry
UX / CX in the context of creative & marketing industryUX / CX in the context of creative & marketing industry
UX / CX in the context of creative & marketing industryKaKi Law
Β 
Jornada de puertas abiertas 2016
Jornada de puertas abiertas 2016Jornada de puertas abiertas 2016
Jornada de puertas abiertas 2016XXX XXX
Β 
Sph 107 Ch 14
Sph 107 Ch 14Sph 107 Ch 14
Sph 107 Ch 14Bryant Hall
Β 
O que Γ© o Foto na Parede?
O que Γ© o Foto na Parede?O que Γ© o Foto na Parede?
O que Γ© o Foto na Parede?Foto na Parede
Β 
In Memoriam Octavian Paler
In Memoriam Octavian PalerIn Memoriam Octavian Paler
In Memoriam Octavian Palerpuicarmariana
Β 
SPH 106 Ch 1
SPH 106 Ch 1SPH 106 Ch 1
SPH 106 Ch 1Bryant Hall
Β 

Viewers also liked (20)

ikh311-02
ikh311-02ikh311-02
ikh311-02
Β 
MRLC MR/SR Oct 2016
MRLC MR/SR Oct 2016MRLC MR/SR Oct 2016
MRLC MR/SR Oct 2016
Β 
Investment decisions for pension funds by intangible value capital
Investment decisions for pension funds by intangible value capitalInvestment decisions for pension funds by intangible value capital
Investment decisions for pension funds by intangible value capital
Β 
Langley primary
Langley primaryLangley primary
Langley primary
Β 
Ralph Capabilities Deck RR
Ralph Capabilities Deck RRRalph Capabilities Deck RR
Ralph Capabilities Deck RR
Β 
Navidad2011 jc
Navidad2011 jcNavidad2011 jc
Navidad2011 jc
Β 
ikp321-05
ikp321-05ikp321-05
ikp321-05
Β 
ikd312-05-sqlite
ikd312-05-sqliteikd312-05-sqlite
ikd312-05-sqlite
Β 
The Ride of Your Life
The Ride of Your LifeThe Ride of Your Life
The Ride of Your Life
Β 
Rupert.Reading.Jan 2015
Rupert.Reading.Jan 2015 Rupert.Reading.Jan 2015
Rupert.Reading.Jan 2015
Β 
Innovation mentoring grant proposal 100113 rev 1
Innovation mentoring grant proposal 100113 rev 1Innovation mentoring grant proposal 100113 rev 1
Innovation mentoring grant proposal 100113 rev 1
Β 
Office 365 + Windows Azure (del 2)
Office 365 + Windows Azure (del 2)Office 365 + Windows Azure (del 2)
Office 365 + Windows Azure (del 2)
Β 
Planetario 2ΒΊ ciclo 2013
Planetario 2ΒΊ ciclo 2013Planetario 2ΒΊ ciclo 2013
Planetario 2ΒΊ ciclo 2013
Β 
UX / CX in the context of creative & marketing industry
UX / CX in the context of creative & marketing industryUX / CX in the context of creative & marketing industry
UX / CX in the context of creative & marketing industry
Β 
Jornada de puertas abiertas 2016
Jornada de puertas abiertas 2016Jornada de puertas abiertas 2016
Jornada de puertas abiertas 2016
Β 
Sph 107 Ch 14
Sph 107 Ch 14Sph 107 Ch 14
Sph 107 Ch 14
Β 
O que Γ© o Foto na Parede?
O que Γ© o Foto na Parede?O que Γ© o Foto na Parede?
O que Γ© o Foto na Parede?
Β 
ikh311-04
ikh311-04ikh311-04
ikh311-04
Β 
In Memoriam Octavian Paler
In Memoriam Octavian PalerIn Memoriam Octavian Paler
In Memoriam Octavian Paler
Β 
SPH 106 Ch 1
SPH 106 Ch 1SPH 106 Ch 1
SPH 106 Ch 1
Β 

Similar to ikd312-03-design

03 Ch3 Notes Revised
03 Ch3 Notes Revised03 Ch3 Notes Revised
03 Ch3 Notes Revisedguest6f408c
Β 
3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) model3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) modelKumar
Β 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship modelJafar Nesargi
Β 
enhanced er diagram
enhanced er diagramenhanced er diagram
enhanced er diagramCHANDRA BHUSHAN
Β 
Chapter03.pdf
Chapter03.pdfChapter03.pdf
Chapter03.pdfHughMungus22
Β 
Chapter03 (2).ppt
Chapter03 (2).pptChapter03 (2).ppt
Chapter03 (2).pptabhilashbachu5
Β 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdffikadumola
Β 
Free video lectures for mca
Free video lectures for mcaFree video lectures for mca
Free video lectures for mcaEdhole.com
Β 
Introduction to database-ER Model
Introduction to database-ER ModelIntroduction to database-ER Model
Introduction to database-ER ModelAjit Nayak
Β 
Unit02 dbms
Unit02 dbmsUnit02 dbms
Unit02 dbmsarnold 7490
Β 
Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013Prosanta Ghosh
Β 
Conceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-modelsConceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-modelsShailaja Jayaprakash
Β 

Similar to ikd312-03-design (20)

03 Ch3 Notes Revised
03 Ch3 Notes Revised03 Ch3 Notes Revised
03 Ch3 Notes Revised
Β 
Chapter3
Chapter3Chapter3
Chapter3
Β 
ER Diagram
ER DiagramER Diagram
ER Diagram
Β 
3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) model3 data modeling using the entity-relationship (er) model
3 data modeling using the entity-relationship (er) model
Β 
G U I Stud
G U I StudG U I Stud
G U I Stud
Β 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
Β 
Database Modeling
Database ModelingDatabase Modeling
Database Modeling
Β 
02er
02er02er
02er
Β 
Chapter03
Chapter03Chapter03
Chapter03
Β 
enhanced er diagram
enhanced er diagramenhanced er diagram
enhanced er diagram
Β 
Chapter03.pdf
Chapter03.pdfChapter03.pdf
Chapter03.pdf
Β 
Chapter03 (2).ppt
Chapter03 (2).pptChapter03 (2).ppt
Chapter03 (2).ppt
Β 
3. Chapter Three.pdf
3. Chapter Three.pdf3. Chapter Three.pdf
3. Chapter Three.pdf
Β 
Free video lectures for mca
Free video lectures for mcaFree video lectures for mca
Free video lectures for mca
Β 
Introduction to database-ER Model
Introduction to database-ER ModelIntroduction to database-ER Model
Introduction to database-ER Model
Β 
Chap08
Chap08Chap08
Chap08
Β 
DBMS UNIT1
DBMS UNIT1DBMS UNIT1
DBMS UNIT1
Β 
Unit02 dbms
Unit02 dbmsUnit02 dbms
Unit02 dbms
Β 
Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013
Β 
Conceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-modelsConceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-models
Β 

More from Anung Ariwibowo

More from Anung Ariwibowo (20)

isd314-06-association-mining
isd314-06-association-miningisd314-06-association-mining
isd314-06-association-mining
Β 
ikp213-unifikasi
ikp213-unifikasiikp213-unifikasi
ikp213-unifikasi
Β 
ikp213-06-horn-clause
ikp213-06-horn-clauseikp213-06-horn-clause
ikp213-06-horn-clause
Β 
ikp213-01-pendahuluan
ikp213-01-pendahuluanikp213-01-pendahuluan
ikp213-01-pendahuluan
Β 
ikd312-05-kalkulus-relasional
ikd312-05-kalkulus-relasionalikd312-05-kalkulus-relasional
ikd312-05-kalkulus-relasional
Β 
ikd312-04-aljabar-relasional
ikd312-04-aljabar-relasionalikd312-04-aljabar-relasional
ikd312-04-aljabar-relasional
Β 
ikd312-02-three-schema
ikd312-02-three-schemaikd312-02-three-schema
ikd312-02-three-schema
Β 
ikp213-02-pendahuluan
ikp213-02-pendahuluanikp213-02-pendahuluan
ikp213-02-pendahuluan
Β 
ikh311-08
ikh311-08ikh311-08
ikh311-08
Β 
ikh311-07
ikh311-07ikh311-07
ikh311-07
Β 
ikh311-06
ikh311-06ikh311-06
ikh311-06
Β 
ikh311-05
ikh311-05ikh311-05
ikh311-05
Β 
ikp321-svn
ikp321-svnikp321-svn
ikp321-svn
Β 
imsakiyah-jakarta-1433-09
imsakiyah-jakarta-1433-09imsakiyah-jakarta-1433-09
imsakiyah-jakarta-1433-09
Β 
ikh311-03
ikh311-03ikh311-03
ikh311-03
Β 
ikp321-04
ikp321-04ikp321-04
ikp321-04
Β 
ikp321-03
ikp321-03ikp321-03
ikp321-03
Β 
ikp321-02
ikp321-02ikp321-02
ikp321-02
Β 
ikp321-01
ikp321-01ikp321-01
ikp321-01
Β 
ikh311-01
ikh311-01ikh311-01
ikh311-01
Β 

Recently uploaded

Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
Β 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
Β 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
Β 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
Β 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
Β 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
Β 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
Β 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
Β 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
Β 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
Β 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
Β 
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ9953056974 Low Rate Call Girls In Saket, Delhi NCR
Β 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
Β 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
Β 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
Β 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
Β 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
Β 

Recently uploaded (20)

Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
Β 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
Β 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
Β 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
Β 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
Β 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
Β 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
Β 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
Β 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
Β 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
Β 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
Β 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
Β 
Model Call Girl in Bikash Puri Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Bikash Puri  Delhi reach out to us at πŸ”9953056974πŸ”Model Call Girl in Bikash Puri  Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Bikash Puri Delhi reach out to us at πŸ”9953056974πŸ”
Β 
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
Β 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
Β 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Β 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
Β 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
Β 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
Β 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
Β 

ikd312-03-design

  • 1. Perancangan Basis Data 6 Oktober 2011
  • 2. Chapter Outline ο‚— Example Database Application (COMPANY) ο‚— ER Model Concepts ο‚— Entities and Attributes ο‚— Entity Types, Value Sets, and Key Attributes ο‚— Relationships and Relationship Types ο‚— Weak Entity Types ο‚— Roles and Attributes in Relationship Types ο‚— ER Diagrams - Notation ο‚— ER Diagram for COMPANY Schema ο‚— Alternative Notations – UML class diagrams, others Chapter 3-2 Perancangan Basis Data
  • 3. Motivating Example ο‚— Mencari jadwal kelas pengganti ο‚— Setiap mahasiswa memiliki jadwal kuliah ο‚— Cari irisan waktu kosong di antara semua mahasiswa Nama Senin Selasa Rabu Kamis Jumat Joey ## ## ## Tyler ## ## ## Joel ## ## Lee ## ## Boer ## Amir ## ## ## Perancangan Basis Data 3
  • 4. Motivating Example ο‚— Bagaimana menemukan jawaban informasinya? ο‚— Gunakan konsep himpunan Perancangan Basis Data 4
  • 5. Example COMPANY Database ο‚— Requirements of the Company (oversimplified for illustrative purposes) ο‚— The company is organized into DEPARTMENTs. Each department has a name, number and an employee who manages the department. We keep track of the start date of the department manager. ο‚— Each department controls a number of PROJECTs. Each project has a name, number and is located at a single location. Chapter 3-5 Perancangan Basis Data
  • 6. Example COMPANY Database (Cont.) ο‚—We store each EMPLOYEE’s social security number, address, salary, sex, and birthdate. Each employee works for one department but may work on several projects. We keep track of the number of hours per week that an employee currently works on each project. We also keep track of the direct supervisor of each employee. ο‚—Each employee may have a number of DEPENDENTs. For each dependent, we keep track of their name, sex, birthdate, and relationship to employee. Chapter 3-6 Perancangan Basis Data
  • 7. ER Model Concepts ο‚— Entities and Attributes ο‚— Entities are specific objects or things in the mini-world that are represented in the database. For example the EMPLOYEE John Smith, the Research DEPARTMENT, the ProductX PROJECT ο‚— Attributes are properties used to describe an entity. For example an EMPLOYEE entity may have a Name, SSN, Address, Sex, BirthDate ο‚— A specific entity will have a value for each of its attributes. For example a specific employee entity may have Name='John Smith', SSN='123456789', Address ='731, Fondren, Houston, TX', Sex='M', BirthDate='09-JAN-55β€˜ ο‚— Each attribute has a value set (or data type) associated with it – e.g. integer, string, subrange, enumerated type, … Chapter 3-7 Perancangan Basis Data
  • 8. Types of Attributes (1) ο‚— Simple ο‚— Each entity has a single atomic value for the attribute. For example, SSN or Sex. ο‚— Composite ο‚— The attribute may be composed of several components. For example, Address (Apt#, House#, Street, City, State, ZipCode, Country) or Name (FirstName, MiddleName, LastName). Composition may form a hierarchy where some components are themselves composite. ο‚— Multi-valued ο‚— An entity may have multiple values for that attribute. For example, Color of a CAR or PreviousDegrees of a STUDENT. Denoted as {Color} or {PreviousDegrees}. Chapter 3-8 Perancangan Basis Data
  • 9. Types of Attributes (2) ο‚— In general, composite and multi-valued attributes may be nested arbitrarily to any number of levels although this is rare. For example, PreviousDegrees of a STUDENT is a composite multi-valued attribute denoted by {PreviousDegrees (College, Year, Degree, Field)}. Chapter 3-9 Perancangan Basis Data
  • 10. Entity Types and Key Attributes ο‚— Entities with the same basic attributes are grouped or typed into an entity type. For example, the EMPLOYEE entity type or the PROJECT entity type. ο‚— An attribute of an entity type for which each entity must have a unique value is called a key attribute of the entity type. For example, SSN of EMPLOYEE. ο‚— A key attribute may be composite. For example, VehicleTagNumber is a key of the CAR entity type with components (Number, State). ο‚— An entity type may have more than one key. For example, the CAR entity type may have two keys: ο‚— VehicleIdentificationNumber (popularly called VIN) and ο‚— VehicleTagNumber (Number, State), also known as license_plate number. Chapter 3-10 Perancangan Basis Data
  • 11. ENTITY SET corresponding to the ENTITY TYPE CAR CAR Registration(RegistrationNumber, State), VehicleID, Make, Model, Year, (Color) car1 ((ABC 123, TEXAS), TK629, Ford Mustang, convertible, 1999, (red, black)) car2 ((ABC 123, NEW YORK), WP9872, Nissan 300ZX, 2-door, 2002, (blue)) car3 ((VSY 720, TEXAS), TD729, Buick LeSabre, 4-door, 2003, (white, blue)) . . . Chapter 3-11 Perancangan Basis Data
  • 12. SUMMARY OF ER-DIAGRAM NOTATION FOR ER SCHEMAS Symbol Meaning ENTITY TYPE WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING RELATIONSHIP TYPE ATTRIBUTE KEY ATTRIBUTE MULTIVALUED ATTRIBUTE COMPOSITE ATTRIBUTE DERIVED ATTRIBUTE E1 R E2 TOTAL PARTICIPATION OF E2 IN R N CARDINALITY RATIO 1:N FOR E1:E2 IN R E1 R E2 (min,max) STRUCTURAL CONSTRAINT (min, max) ON PARTICIPATION R E OF E IN R Chapter 3-12 Perancangan Basis Data
  • 13. ER DIAGRAM – Entity Types are: EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT Chapter 3-13 Perancangan Basis Data
  • 14. Relationships and Relationship Types (1) ο‚— A relationship relates two or more distinct entities with a specific meaning. For example, EMPLOYEE John Smith works on the ProductX PROJECT or EMPLOYEE Franklin Wong manages the Research DEPARTMENT. ο‚— Relationships of the same type are grouped or typed into a relationship type. For example, the WORKS_ON relationship type in which EMPLOYEEs and PROJECTs participate, or the MANAGES relationship type in which EMPLOYEEs and DEPARTMENTs participate. ο‚— The degree of a relationship type is the number of participating entity types. Both MANAGES and WORKS_ON are binary relationships. Chapter 3-14 Perancangan Basis Data
  • 15. Example relationship instances of the WORKS_FOR relationship between EMPLOYEE and DEPARTMENT EMPLOYEE WORKS_FOR DEPARTMENT e1  r1  d1 e2  r2 e3   d2 r3 e4  r4 e5  d3  r5 e6  e7 r6  r7 Chapter 3-15 Perancangan Basis Data
  • 16. Example relationship instances of the WORKS_ON relationship between EMPLOYEE and PROJECT e1  r1  p1 e2  r2 e3   p2 r3 e4  r4 e5  p3  r5 e6  e7 r6  r7 Chapter 3-16 Perancangan Basis Data
  • 17. Relationships and Relationship Types (2) ο‚— More than one relationship type can exist with the same participating entity types. For example, MANAGES and WORKS_FOR are distinct relationships between EMPLOYEE and DEPARTMENT, but with different meanings and different relationship instances. Chapter 3-17 Perancangan Basis Data
  • 18. ER DIAGRAM – Relationship Types are: WORKS_FOR, MANAGES, WORKS_ON, CONTROLS, SUPERVISION, DEPENDENTS_OF Chapter 3-18 Perancangan Basis Data
  • 19. Weak Entity Types ο‚— An entity that does not have a key attribute ο‚— A weak entity must participate in an identifying relationship type with an owner or identifying entity type ο‚— Entities are identified by the combination of: ο‚— A partial key of the weak entity type ο‚— The particular entity they are related to in the identifying entity type Example: Suppose that a DEPENDENT entity is identified by the dependent’s first name and birhtdate, and the specific EMPLOYEE that the dependent is related to. DEPENDENT is a weak entity type with EMPLOYEE as its identifying entity type via the identifying relationship type DEPENDENT_OF Chapter 3-19 Perancangan Basis Data
  • 20. Weak Entity Type is: DEPENDENT Identifying Relationship is: DEPENDENTS_OF Chapter 3-20 Perancangan Basis Data
  • 21. Constraints on Relationships ο‚— Constraints on Relationship Types ο‚— ( Also known as ratio constraints ) ο‚— Maximum Cardinality ο‚— One-to-one (1:1) ο‚— One-to-many (1:N) or Many-to-one (N:1) ο‚— Many-to-many ο‚— Minimum Cardinality (also called participation constraint or existence dependency constraints) ο‚— zero (optional participation, not existence-dependent) ο‚— one or more (mandatory, existence-dependent) Chapter 3-21 Perancangan Basis Data
  • 22. Many-to-one (N:1) RELATIONSHIP EMPLOYEE WORKS_FOR DEPARTMENT e1  r1  d1 e2  r2 e3   d2 r3 e4  r4 e5   d3 r5 e6  e7  r6 r7 Chapter 3-22 Perancangan Basis Data
  • 23. Many-to-many (M:N) RELATIONSHIP e1  r1  p1 e2  r2 e3   p2 r3 e4  r4 e5  p3  r5 e6  e7 r6  r7 Chapter 3-23 Perancangan Basis Data
  • 24. Relationships and Relationship Types (3) ο‚— We can also have a recursive relationship type. ο‚— Both participations are same entity type in different roles. ο‚— For example, SUPERVISION relationships between EMPLOYEE (in role of supervisor or boss) and (another) EMPLOYEE (in role of subordinate or worker). ο‚— In following figure, first role participation labeled with 1 and second role participation labeled with 2. ο‚— In ER diagram, need to display role names to distinguish participations. Chapter 3-24 Perancangan Basis Data
  • 25. A RECURSIVE RELATIONSHIP SUPERVISION EMPLOYEE SUPERVISION e1 2  r1 1 e2  2 1 r2 e3  2 1 r3 e4  2 e5 1  1 r4 e6  2 1 r5 e7  2 r6 Chapter 3-25 Perancangan Basis Data
  • 26. Recursive Relationship Type is: SUPERVISION (participation role names are shown) Chapter 3-26 Perancangan Basis Data
  • 27. Attributes of Relationship types ο‚— A relationship type can have attributes; for example, HoursPerWeek of WORKS_ON; its value for each relationship instance describes the number of hours per week that an EMPLOYEE works on a PROJECT. Chapter 3-27 Perancangan Basis Data
  • 28. Attribute of a Relationship Type is: Hours of WORKS_ON Chapter 3-28 Perancangan Basis Data
  • 29. Structural Constraints – one way to express semantics of relationships Structural constraints on relationships:  Cardinality ratio (of a binary relationship): 1:1, 1:N, N:1, or M:N SHOWN BY PLACING APPROPRIATE NUMBER ON THE LINK.  Participation constraint (on each participating entity type): total (called existence dependency) or partial. SHOWN BY DOUBLE LINING THE LINK NOTE: These are easy to specify for Binary Relationship Types. Chapter 3-29 Perancangan Basis Data
  • 30. Alternative (min, max) notation for relationship structural constraints:  Specified on each participation of an entity type E in a relationship type R  Specifies that each entity e in E participates in at least min and at most max relationship instances in R  Default(no constraint): min=0, max=n  Must have minο‚£max, minο‚³0, max ο‚³1  Derived from the knowledge of mini-world constraints Examples:  A department has exactly one manager and an employee can manage at most one department. ο‚— Specify (0,1) for participation of EMPLOYEE in MANAGES ο‚— Specify (1,1) for participation of DEPARTMENT in MANAGES  An employee can work for exactly one department but a department can have any number of employees. ο‚— Specify (1,1) for participation of EMPLOYEE in WORKS_FOR Chapter 3-30 Specify (0,n) for participation of DEPARTMENT in WORKS_FOR ο‚— Perancangan Basis Data
  • 31. COMPANY ER Schema Diagram using (min, max) notation Chapter 3-31 Perancangan Basis Data
  • 32. Relationships of Higher Degree  Relationship types of degree 2 are called binary  Relationship types of degree 3 are called ternary and of degree n are called n-ary  In general, an n-ary relationship is not equivalent to n binary relationships  Higher-order relationships discussed further in Chapter 4 Chapter 3-32 Perancangan Basis Data
  • 33. Data Modeling Tools A number of popular tools that cover conceptual modeling and mapping into relational schema design. Examples: ERWin, S- Designer (Enterprise Application Suite), ER- Studio, etc. POSITIVES: serves as documentation of application requirements, easy user interface - mostly graphics editor support Chapter 3-33 Perancangan Basis Data
  • 34. Some of the Currently Available Automated Database Design Tools COMPANY TOOL FUNCTIONALITY Embarcadero ER Studio Database Modeling in ER and IDEF1X Technologies DB Artisan Database administration and space and security management Oracle Developer 2000 and Designer Database modeling, application development 2000 Popkin Software System Architect 2001 Data modeling, object modeling, process modeling, structured analysis/design Platinum Platinum Enterprice Data, process, and business component modeling Technology Modeling Suite: Erwin, BPWin, Paradigm Plus Persistence Inc. Pwertier Mapping from O-O to relational model Rational Rational Rose Modeling in UML and application generation in C++ and JAVA Rogue Ware RW Metro Mapping from O-O to relational model Resolution Ltd. Xcase Conceptual modeling up to code maintenance Sybase Enterprise Application Suite Data modeling, business logic modeling Visio Visio Enterprise Data modeling, design and reengineering Visual Basic and Visual C++ Chapter 3-34 Perancangan Basis Data
  • 35. Notasi Alternatif ο‚— IDEF1X ο‚— Class Diagram Perancangan Basis Data 35
  • 36. IDEF1X Perancangan Basis Data 36
  • 37. ER DIAGRAM FOR A BANK DATABASE Β© The Benjamin/Cummings Publishing Company, Inc. 1994, Elmasri/Navathe, Fundamentals of Database Systems, Second Edition Chapter 3-37 Perancangan Basis Data
  • 38. Which one is true? ο‚— Pemodelan ER bersifat subjektif ο‚— Tidak ada model ER yang 'benar' ο‚— Melalui proses berulang ο‚— Intuition dan Reasonable reasoning ο‚— Pengalaman ο‚— Latihan, latihan, latihan, latihan Perancangan Basis Data 38
  • 39. Pustaka ο‚— Elmasri, et.al. "Fundamentals of Database Systems" ο‚— http://tjerdastangkas.blogspot.com/search/label/ikd312 Perancangan Basis Data 39