Sabtu, 18 April 2009

Entity Relationship Diagram (ERD)

1.1 Definition

Database a set of data stored in the magnetic disk, optical disk or other secondary storage.

1.2 DATABASE MANAGEMENT SYSTEM

· Collection / database combined with software-based database applications.

· Application programme are used to access and maintain databases

· The main purpose DBMS is to provide an environment that is efficient and easy to use, with draw and storage of data and information

1.3 Attribute / Field

  • It is the nature or characteristics of an entity that provides provide detail on these entities
  • A relationship can also have attributes
  • Example attributes:
    STUDENTS: NIM, NAME, ADDRESS
    CAR: NOMOR_PLAT, COLOR, TYPE, CC

Type-Type Attribute :

  • Single vs. multivalue
    Single àcan be filled only at most one valueà
    Multivalue à can be filled with more than one value with the same type.
  • Atomic vs. composition
    Atomic à can not be divided into the attributes of smallerà
    composition àis a combination of several attributes of a smaller.
  • Derived attribute
    attributes resulting from the date of birthàattribute value can be derived from the value of other attributes, example age
  • Null Value attribute
    Attributes that have no value to a record
  • Mandatory attribute Value
    Attributes must have values

1.4 Record / Tuple

  • It is a line of data in a relationship
  • Consists of the set of attributes where the attribute-attribute-attribute is to inform each other entity / relationship fully

1.5 Entity / File

File is a collection of similar records and have the same elements, the same attributes but different data value.

1.6 Domain
Domain is the set of values that are allowed to reside in one or more attributes. Each attribute in a database relasional is defined as a domain

1.7 Element Key Data
Key elements of record which is used to find these records at the time of access, or can also be used to identify each entity / record / line.

Species Of Key

  • Superkey is one or more attributes of a table that can be used to identify entityty / record of the table are unique (not all attributes can be superkey)
  • Candidate Key is a super key with minimal attributes. Candidate must not contain a key attribute of the table so that the other candidate key is certain superkey but not necessarily vice versa.
  • Primary Key
    One of the key attributes of the candidate can be selected / specified a primary key
  • Alternate Key is an attribute of the candidate key is not selected to be primary key.
  • Foreign Key is any attribute that points to the primary key in another table. Foreign key will be going on a relationship that has kardinalitas one to many (one to many) or many to many (many to many). Foreign key is usually always put on the table that point to many.
  • External Key is a lexical attribute (or set of lexical attributes) that values are always identify an object instance.

1.8 ERD

Entity relationship is a network that uses the order of the data stored in the abstract of the system. Entity-relationship model consists of elements of the entity and entity-relationship between these entitiy.

Component Entity Relationship :
1. Entity, a collection of object or something that can be identified or can be unique.
Collection of similar entities called entity set.
2. Relationship, the relationship between one entity or more.
3. Attribute, the collection of data elements that form a entity

4. Relationship Degree is the number of entities participating in a relationship. Degree which is often used in the ERD.

Degree of relationship:

  • Unary Relationship
    model is the relationship between the entity originating from the same entity set.
  • Binary Relationship
    model is the relationship between 2 entities.
  • Ternary Relationship
    is a relationship between the instance of 3 types of entities are unilateral.

5. Cardinalitas tupel indicates the maximum number that can be entity with entities on the other entity.

There are 3 kardinalitas relations, namely :

  • One to One: Level one to one relationship with the one stated in the entity's first event, only had one relationship with one incident in which the two entities and vice versa.
  • One to Many or Many to One: Level one to many relationship is the same as the one to many depending on the direction from which the relationship dilihat.Untuk an incident on the first entity can have any relationship with many incident on the second entity, if the one incident on the entity the second can only have one hubugan with the incident on the first entity.
  • Many To Many: if any incident occurs in an entity most have relationships with other entities in the incident.


1.9 Notation (E-R diagram)
Symbolic notation, notation in the diagram in the E-R can be used are:

  • Square long, shows the basic object / set entity
  • Circle / ellipse, declares attributes (attributes do work as the key is underlined)
  • rhomb (diamon), states Himpunan Relations
  • Lines, as the relations between the Association
  • Association with the Association and the Entity Entity with Atribute.





1.10 Phase Development E-R Diagram

  • There are 2 groups of phasing the usual place, namely:
    1. Phase Diagram of making E-R initial (preliminary design).
    2. Phase Diagram otimasi E-R (final design)
  • The first stage is to obtain the design minimal database that can accommodate the needs data storage to the system that is being reviewed.
  • The second phase, attention to aspects of efficiency,performance and flexibility.

1.11 Making E-R Diagram Start
Technical steps to create ER Diagram Start is:
1. Identify and define the entire set of entity that will be involved.
2. Determining attribute-key attribute of each collective entities.
3. Identify and define the entire set of relations between the collective entity, the collective entity with no foreign-key it.
4. Determine the degree / kardinalitas relation to each the collective.
5. Complete set of entities and collective relations with attribute-attribute descriptive (non-key).

1.12 Case Studies
In the scope of the system indeed lecture (real word) there are many entities that we can Involve such as Student, College, Pratikum, Lecturer, Assistant, Room, Department, Literarur and others.

  • To step-1, Identify and define all set of entities that will be involved.




  • To Step-2, Determining attribute-key attribute of each set of entities.






  • To step-3, Identify and define whole set of relationships between the collective entity collective entities that have foreign-key with it.






  • To step-4, Determining degrees / kardinalitas relations for each set of relationships.






  • To step-5, Complete set of entities and set of relations with the attribute-descriptive attributes (non key).










1.13 E-R Diagram with the data dictionary

E-R Diagram with the data dictionary is The bolt main objective of E-R diagram is to show the objects (the collective entity) is just want to be involved in a data base and What's going on in the relationship between objects it.

  • In the space of a system-wide and lingkupnya complex, drawing attributes-attributes in a E-R diagram often even with the objective who want to achieve it.
  • separation attribute-attribute of ER diagram can be expressed in a Data Dictionary
  • The data dictionary contains a list of attributes that diapit brackets brace ((and)).
  • Attribute that functions as a key to be the non-key attribute is the underline.





Data Dictionary:

  • Mahasiswa = { nim, nama_mhs, alamat_mhs, tgl_lahir }
  • Kuliah = { kode_kul, nama_kul, sks, semester }
  • Dosen = { nama_dos, alamat_dos }
  • Mempelajari = { nim, kode_kul, indeks_nil }
  • Mengajar = { kode_kul, nama_dos, waktu, tempat }



















Tidak ada komentar:

Posting Komentar