Saturday, April 18, 2009

Database and Entity Relationship Diagram

I. Database

The definition of a database is a structured collection of records or data that is stored in a computer system. In order for a database to be truly functional, it must not only store large amounts of records well, but be accessed easily. In addition, new information and changes should also be fairly easy to input.
Database can meaning a collection of interconnection data for a enterprise (company, government institution or private sector).

II. Database Management System (DBMS)

A database management system (DBMS) is computer software that manages databases. DBMSes may use any of a variety of database models, such as the network model or relational model. In large systems, a DBMS allows users and other software to store and retrieve data in a structured way.
Example of DBMS :

  • MySQL
  • PostgreSQL
  • Oracle

III. Bit, Byte and Field
  • A bit is a binary digit, taking a value of either 0 or 1. Binary digits are a basic unit of information storage and communication in digital computing and digital information theory.
  • A byte is a basic unit of measurement of information storage in computer science. In many computer architectures it is a unit of memory addressing. There is no standard but a byte most often consists of eight bits.
  • Field is a group of same byte, in database used by attribute.

IV. Attribute / Field

Attribute or Field is a characteristic from entity, which preparing detailed explanation about that's entity.
A relation could have atribute too.
Example of Attribute :
  • Student : NIM, Name, Sex, Address
  • Car : Plat Number, Color, CC
  • Book : ID, title, author

Type of Attribute

Single value Vs Multi value Attributes
  1. Single Value : only can fill at most one value
  2. Multi Value : can fill with interest from one value with same type
Composite Vs Atomic Attributes
  1. Composite : cluster from some smaller attribute. For example: Name ( First name, middle name, and last name)
  2. Atomic : can not divide into smaller attribute. For example: ID
Derived Attribute : Value of attribute result from other attribute value. For example: age from attribute date of birthday

Null Value Attribute : Attribute that doesn’t have any value for a record

Mandatory Value Attribute : Attribute must have value

V. Record / Tuple
Record is a data line in an relation. Consist of attributes where there attribute can interaction to completely information a entity / relation.

VI. Entity / File
File is a group of same record and have same element, same attribute but different of each data value.
In application process, file can be categorized as :
  • Main file
  • Transaction file
  • Report file
  • History file
  • Protector file
  • Activity file

VII. Domain

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

VIII. Data Element Key

Key is record's element that is used to find record that on access time or can also be utilized to identify each entity / record / the line.

Types of Key
  • Super Key : superkey is defined in the relational model of database organization as a set of attributes of a relation variable (relvar) for which it holds that in all relations assigned to that variable there are no two distinct tuples (rows) 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.
  • Candidate Key : candidate key is a minimal set of columns necessary to identify a row, this is also called a minimal superkey.
  • 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. One of attribute from candidate keys to get is chosen / is determined as primary keys with three criterions as follows:
  1. that key is more natural to been utilized as basis
  2. that key is simpler
  3. that key its uniqueness indemnity bond
  • Alternate Key : Alternate keys is attribute from candidate keys that don't be chosen becomes primary key.
  • Foreign Key : foreign key is a referential constraint between two tables.The foreign key identifies a column or a set of columns in one (referencing) table that refers to a column or set of columns in another (referenced) table. The columns in the referencing table must be the primary key or other candidate key in the referenced table.
  • External Key : External keys to constitute a lexical attribute (or lexical gathering attribute) one that its point do ever identify one object instance.

IX. Entity Relationship Diagram

ERD is a model of a network that uses word order is stored in the abstract system.
The difference among DFD and ERD :
  • DFD is a model of network functions that will be implemented by the system
  • ERD is a model that emphasizes the network data on the structure and relationship data
Elements Of ERD
  • 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
A relationship is some association between entities. In this section we shall concentrate on binary relationships. That is, associations between two entities. In section 16.4 we shall introduce other N-ary relationships. That is, relationships between one, three, four or N entities. In the E–R approach, more than one relationship can exist between any two entities.
  • Relationship Degree
Are total entity who participated in one relationship. Degree that frequent being used on ERD
  • Attribute
Are character or characteristic of every entity and also relationship.
  • Cardinality
Pointing out record optimum that relations can with entity on entity another one.

X. Relationship Degree
  • Unary Relationship is a relationship model between entity coming from same entity set.
  • Binary Relationship is a relationship model between 2 entity.
  • Ternary Relationship is a relationship between instance from 3 type of entitas unilaterally.

XI. Cardinality

There are 3 cardinalities relations :
  • 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 seen .for an incident on the first entity can have any relationship with more incident on the second entity, if the one incident on the entity the second can only have one relation with the incident on the first entity.
  • Many To Many: if any incident occurs in an entities have relationships with other entities in the incident.

Artikel Terkait

No comments:

Post a Comment