18 April 2009

Information Systems Analysis and Design [Part-5]

Database and entity relationship diagram

The definition of database

Database can be definition by collection of data which stored in magnetic disk, optical disk or other secondary storage. In other word database is collection of data which is linked one to other of an enterprise (factory, governmental institution, or private section). For example is in manufacture company, the database include production planning data, actual production data, data ordering material. And in hospital database include of data of patient, doctor, nurse, etc.

Database management system (DBMS)

Database management System is database collection with software application in based of database. This application programs is use for accessing and maintaining the database. The first aim of DBMS is to preparing an easy and efficient environment for using, collecting and storing data and information.

Definition of bit, byte, field

>> Bit: is the smaller part of data, which contain of value 1 or 0

>> Byte: collection of bits that of a kind

>> filed: collection of byte that of a kind, which in database is called "attribute".


Attribute or field


Attribute or field is a characteristic of entity, which preparing detailed explanation about that's entity. A relation also could have attributed.

Example of attribute:

- Attribute of motor cycle is number plate, color, kind, etc.

- Attribute of book is title, kind, total page, author, etc.


Type of attribute

1. Single vs. multivalued

Single: only can fill by one value

multivalued: can fill with more one value with the same of kind

2. Atomic vs. composition

Atomic: can not divided into smaller attribute

Composition: boundless from some smaller attribute

3. Derived attribute

Derived attribute is an attribute which its value can be produced from other attribute

4. Null value attribute

Null value attribute is an attribute with no value for a record

5. Mandatory value attribute is an attribute which must have value


Record or Tuple

Record is a line of data in a relationship. It does consist of collection attribute, where the attributes is related one to other to give detailed information of the entity or relation.


Entity or file

File is a collection of record that of a kind and having same element, same attribute however different in their data value.

Type of file:

In processing application, file can be categorized such as:

- Parented file

- Transaction file

- Report file

- History file

- Protector file

- Work file


Domain

Domain is collection of values which enabled to stay in one or more attribute. Every attribute in a relational database is defined as a domain

Key of element data

Key is the element of record which used to find the record when accessing or can also used to identify every entity / record / row.

Kind of key:

* Super key is one or more attribute from a table which can be used for identifying entity / record from table uniquely

* Candidate key is super key with minimum attribute. Candidate key may not contain attribute of other table so that the candidate is super key, but not the contrary

* Primary key

One of the attribute of candidate key can be selected / determined into primary key with 3 criteria:

- The key is more natural for use as reference

- The key is simpler

- The key is unique

* Alternate key

Alternate key is attribute of candidate key which is not chosen become primary key

* Foreign key

Foreign key is any attribute subjecting to primary key at other tables. Foreign key will be happened in a relation which have one to many cardinality or many to many cardinality. Foreign key usually put at the table which direct to many cardinality.

* External key

External key is lexical attribute or collection of lexical attribute which values always identify one object instance


ERD (entity relationship diagram)

ERD is a network model that uses word order is stored in the system of abstract

The different between DFD and ERD:

- DFD is a network functions model that will be implemented by the system

- ERD is a network data model that emphasizes the on the structure and relationship data


Elements in ERD

Elements in ERD include:

* Entity

In the ER Diagram, entity is described with the form of a rectangle. Entity is something that exists in the real system and the abstract where the data stored or where there are data.

* Relationship

In the ER diagram, the relationship can be described with a rhomb. Relationship is a natural relation that occurs between entities. In a general way given by name by vocabulary so that making it easier to do the reading of relation.

* Relationship degree

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

* Attribute

Attribute is the nature or characteristics of each entity and relationship

* Cardinality

Cardinality indicates the maximum number of record/tuple that can be relation with the entity on the other entity


Degree of relationship

* Unary relationship is the relationship model between the entity originating from the same entity set.

* Binary relationship is the relationship model between 2 entities

* Ternary relationship is a relationship between the instances of 3 types of entities is unilateral


Cardinality

There are three of cardinality relationship, which is:

* One to one

Level one to one relationship stated with one event in the first entity, only had one relationship with one event in the second entities and conversely.

Example:



*One to many or many to one

Level one to many relationship is the same as the many to one depending on the direction from which the relationship have to seen. For an event on the first entity, it can have many relationships with the event on the second entity, if conversely the event in second entities only gets a relationship with one event on the first entity.

Example:



* Many to many

happening if each event on one entities has a many relationship with event on another entities.

Example:


Notation in ER-Diagram

The notation symbol of ER-Diagram is:


• Length square declare for entities gathering

• Circle declares for attribute

• Rhomb declares for relationship gathering

• Lining as connecting among relationship gathering with entities gathering and Entities Gathering with its attribute


References:
1. Agus Sanjaya ER, S.Kom, M.Kom, slide presentation : Database and ER-Diagram

No comments:

Post a Comment