ERD
DATABASE
Database is structured group of records (magnetic disk, optical disk, or other secondary store).
Database can indicate a group of interconnection data for venture (company, government institution).
Database example:
In School –> data of Student, Teacher, etc
DATABASE MANAGEMENT SYSTEM (DBMS)
Collection / database combined with software-based database applications. Application programmed 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
BIT, BYTE, AND FIELD
Bit is a part of contain smallest data value 0 or 1. Byte is a collection of same bit.
1 byte = 8 bit.
Field is a group of same byte, in database used by attribute.
ATTRIBUTE / FIELD
It is the nature or characteristics of an entity that provides provide detail on these entities. A relation can have attribute too.
Attribute example:
Table MAHASISWA : NIM, NAMA, ALAMAT
Table PENDUDUK : NOMOR PENDUDUK, NAMA, AGAMA, JENIS KELAMIN
Table BUKU : ID, JUDUL, PENERBIT, PENGARANG
TYPE OF ATTRIBUTE
Single value Vs. Multi value Attributes
- Single value –> only can fill at most one value. For example: NIM
- Multi value –> can fill with interest from one value with same type. For example:
Dislike(Reading, Snake, Spider)
Composite Vs Atomic Attributes
- Atomic –> can’t divide into smaller attribute. For example: NIM
- Composite –> group from some smaller attribute. For example: Name ( First name, middle name, and last name)
Derived Attribute
- Value of attribute result from other attributes value. For example: age from attribute date of birthday
Null Value Attribute
- The Attribute that have not value to an record
Mandatory Value Attribute
- Attribute must have value
RECORD / TUPLE
Record is a data line in a relation. Consist of attributes where there attribute can interface to fully information an entity / relation.
ENTITY / FILE
A group of same record and have same element, same attribute but different of each data value. Type File In application process, category of file such as:
- File Mains
- File Transaction
- File Report
- File History
- File Protected
- File Activity
DOMAIN
Domain is collection of values enabled to stay in one or more attribute. Each attribute in database relational defined as a domain.
KEY OF ELEMENT DATA
Domain is the set of values that are allowed to reside in one or more attributes. Each attribute in a database relational is defined as a domain
TYPE OF KEY
- Super Key is or more attributes of a table that can be used to identify entity / record of the table are unique (not all attributes can be super key).
- 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 super key but not necessarily vice versa.
- Primary Key One of the attribute from candidate key can be selected / to be determined to become primary key with three criteria:
1. The Key more natural to be used as reference
2. The Key more simple
3. The Key well guarantee
- Alternate Key is an attribute of the candidate key is not selected to be primary key.
- Foreign Key is any attribute subjecting to primary key at other tables. Foreign key will happened at one particular at a relation is owning many to one cardinality (one to many) or many to many. Foreign key usually put at table to many table.
- External Key is a lexical attribute (or set of lexical attributes) that values are always identifying an object instance.
ERD (ENTITY RELATIONSHIP DIAGRAM)
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 entities.
Differences between DFD and of ERD DFD represent a function network model to be executed by system, while ERD represent data network model emphasizing at structure and relationship data.
ELEMENT OF ERD
Entity
An entity is a concept which you want to store information. In ER Diagram, Entity draws with form a rectangle.
Relationship
Relationship illustrates how two entities share information in the database structure. Relationship is a natural relation between entities.
Relationship Degree
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
Relationship between the instances of 3 types of entities is unilateral.
Attribute
Attribute is the collection of data elements that form an entity
Cardinality
Can showing optimum of record to relationship with entity at other entity.
There are three cardinalities, that is:
1. One-to-One (1: 1)
Both entities can participate in only one relationship instance.
2. One-to-Many, 3. Many-to-One (1: N, N: 1)
One entity can participate in many relationship instances and contrary.
4. Many-to-Many (N: M)
Both entities can participate in many relationship instance.
For Example:
How many Employees can work in a Department?
One employee can work in only one department
How many Employees can be employed by a Department?
One department can employ many employees
How many managers can a department have?
One department can have only one manager
How many departments can an employee manage?
One employee can have manage only one department
NOTATION OF ERD
Symbolic notation in ERD:
1. Rectangle express gathering of entity
2. Radian express attribute
3. Rhombic express relationship gathering
4. Line as link between relationship gathering with gathering of entity Gathering and
Entity with its attribute
PHASE DEVELOPMENT ER DIAGRAM
- There are 2 groups of phasing the usual place, namely:
1. Phase Diagram of making E-R initial (preliminary design).
2. Phase Diagram optimize 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.
MAKING ER DIAGRAM START
Technical steps:
1. Identify and define the entire set of entity.
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 / cardinalities relation to each the collective.
5. Complete set of entities and collective relations with attribute-attribute descriptive (non-key).
CASE STUDIES
In the scope of the system indeed lecture (real word) there are many entities that we can involve such as Mahasiswa, Kuliah, Pratikum, Dosen, Asisten, Kelas, 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 / cardinalities relations for each set of relationships.
- To step-5, Complete set of entities and set of relations with the attribute-descriptive attributes (non key).
ER DIAGRAM WITH THE DATA DICTIONARY
ER Diagram with the data dictionary is The bolt main objective of ER 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 complex, drawing attributes-attributes in an ER 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 wedge in brackets brace.
- 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 }