Chapter 5 ; Database and ERD

on Saturday, April 18, 2009

Database and Entity Relationship Diagram (ERD)

A. Definition of Database
1. Group of data, that is to be kept in disk magnetic, optical disk or other secondary storage.
2. Integrated collection of data, that is to hook one another from a enterprise (company, goverment institute or owned)
- Manufacture company : planning production data, production actual data, data ordering material, etc.
- Hospital : data of patient's, doctor, nurse, etc.

B. Database Management System
1. Collection of database by software application in based of database.
2. This application programs, to use for activate and protect the database.
3. The main purpose of DBMS is to prepare a easy domain and efficient for using, drawing and saving data and information.



C. Bit, Byte, Field
1. Bit : is a part of smallest data, which it is a 0 or 1.
2. Byte : collection of same bits.
3. Field : collection of same bytes.



D. Attribute / Field
1. Is adjective or characteristic of a entity that is to prepare the explanation about entity.
2. A relation can have attribute too.
3. Example of attribute :
- Student : NIM, name, address
- Car : number plate, color, kind, cc
- Officer : NIP, name, address

E. Kinds of attribute

1. Single vs multivalue
- Single : the contain maximal is one value.
- Multivalue : the contain maximal is more than one value, but must the same kind.
2. Atomic vs composisi
- Atomic : can not divided to smaller attribute.
- Compossisi : is association of some smaller attribute.
3. Derived attribute
- Attribute, the value is result from other attribute's value, foe example : old, which it is a result from date born.
4. Null value attribute
- Attribute, which have not a value for a record.
5. Mandatory value attibute
- The attribute must have value.

F. Record / Tuple
1. Is a row data in a relation.
2. Consist of collection attributes, where is that attribute give a information of relation.

G. Entity / file
1. File is a collection of same kind of record and having same element, same attribute however different in their data value.
2. Type file
In application process, file can be categorized as :
- Main file
- Transaction file
- Report file
- History file
- Protector file
- Activity file

H. Domain
Domain is collection of value that can be inside one or more attribute. Each attribute in database relation defined as domain.

I. Key of Element Data
Key is element record, that is use for a find record in a time's access or can to identify every entity / record / row.

J. Kind of Key
1. Superkey
A superkey is defined in the relational model of database organization as a set of attributes of a relation variable for
which it holds that in all relations assigned to that variable there are no two distinct tuples that have the same values
for the attributes in this set. Equivalently a superkey can also be defined as a set of attributes of a relvar upon which
all attributes of the relvar are functionally dependent.
2. Candidate Key
Since a superkey is defined as a set of attributes for which holds, we can also define a candidate key as a minimal superkey,
a superkey of which no proper subset can also be called as a candidate key.
3. Primary Key
Primary key is a candidate key to uniquely identify each row in a table. A unique key or primary key comprises a single column
or set of columns. No two distinct rows in a table can have the same value (or combination of values) in those columns. Depending
on its design, a table may have arbitrarily many unique keys but at most one primary key.
4. Alternate Key
Is any candidate key which is not selected to be the primary key.
5. Foreign Key
Foreign key is a field that links one table to another table. A table can have an unlimited number of foreign keys linking to other tables.
We use a dashed underline for foreign keys.
6. External Key
External key is a lexical attribute that its value always identification one object instance.

K. Entity Relationship Diagram (ERD)
1. ERD is a model of a network that uses word order is stored in the system of abstract.
2. The different of DFD and ERD is :
- DFD is a function network model that will executed by system.
- ERD is a model that emphasizes the network data on the structure and relationship data.

L. Elements of ERD
1. Entity : an entity is an object or concept about which you want to store information.
2. Relationship : relationships illustrate how two entities share information in the database structure.
3. Relationship degree : is the number of entities which participating in a relationship. Degree is unit which is often used in the ERD.
4. Attribute : attribute is the unique, distinguishing characteristic of the entity or relationship.
5. Cardinality : cardinality specifies how many instances of an entity relate to one instance of another entity.

M. Relationship Degree
1. Unary Relationship is model relationship that happening among entity what do come from same entity set.
2. Binary Relationship is model of relationship that happened between 2 entities.
3. Ternary relationship constituting relationship among instance of 3 entitas's types unilateral.

N. Cardinality
Cardinality is the term used in database relations to denote the occurrences of data on either side of the relation. In the common data architecture, cardinality is documented with data integrity but not with data structure.
1. One to One : level one to one expressed with one occurence at first entitas, only having one relation with one occurence at second entitas conversely
2. One to Many/Many to One : relationship degree one to many is equal many to one dependent from where that relationship seen. For one event in first entity can have many relationship with event in second entity, the other way, one event in second entity only have relationship with one event in first entity.
3. Many to many : if any incident occurs in an entity has many relationships with other entities in the incident.
Example of Cardinality :


O. Notation (ERD)
1. Rectangle declare for entitas's gathering.
2. Circle declare for attribute.
3. Diamond shaped declare for collective relationships.
4. Mark with lines as link between relationship gathering with gathering of entitas Gathering and of Entitas with its attribute.

Ref :
ER Ngurah Agus Sanjaya, S.KOM, M.KOM. Slide Part 5 - DATABASE DAN ER-DIAGRAM
http://en.wikipedia.org/wiki/Superkey
http://en.wikipedia.org/wiki/Alternate_key

0 comments:

Post a Comment