Sabtu, 18 April 2009

DATABASE

Database is a collection of data from a related one with the other stored in the computer and necessary software to manipulate. Or, organizing the collection of data related to each other to facilitate activities to obtain information.


DBMS (DATABASE MANAGEMENT SYSTEM)

System that is specifically created to make it easier to manage users in the database. The main purpose DBMS is to provide an environment that is efficient and easy to use, withdrawal and storage of data and information.

Advantages of DBMS:

• Data independence

• Access to the data of the Efficient

• Security and Data Integrity

• Data Administration

• Access Alongside and to the failure recovery

• Time of Application Development shortened.


ATRIBUTE
Entity is the object or objects in the real world is represented in the database. Entity objects that can be physically seen, such as cars, houses, employees, and can also form a physical concept is not visible, such as lectures, corporate, employment.


Attribute is a character or situation that is used to describe an entity.
For example, an employee has a name, SSN, address, gender, date of birth.

One entity will have specific values for each attribute. For example, employees have a certain name Wira, SSN: 1234567 Address: Klungkung Sex: Male Birthdate: 12 August1988
Each attribute has a set of values associated with it. This value is a set of data types, such as integer, string, and the other.


TYPE ATRIBUTE

• Simple / Single

Each entity has a single atomic value. Example: SSN, Sex.

• Composite

attribute consists of several components. Example: Address (Street, City, State, ZipCode, Country), Name (firstname, MiddleName, LastName). The composition can be a hierarchy where the attribute is also a component of composite attribute.

• Multi-valued

An entity can have multiple values. Example: color of a car, degree of employees, expressed in: (color), (title).


• Attributes composite multi-valued and can make a nest (nested). Example: (Previous Degrees (College, Year, Degree, Field)).


• PreviousDegrees attribute is a composite and multi-value.


Stored vs. derived Attibutes

- Stored: regular attribute

- Derived: attribute is derived / calculated from the stored attribute

Example: Birthdate vs Age


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

KEY
In a collective entity, or entity type, between one entity with another entity must be distinguished. Make how an entity is unique? We need to find an attribute that can be deference.
For example, for the employee, SSN is unique because no two people have the same SSN. For the company, the name can be unique as there is no company that has the same name with another company.

For the payment slip, may have two attributes as pembeda, eg date and time.
Attribute whose value is called a unique key attribute .. An entity can have one key attribute, can also better than one


TYPE 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)
  • Cadidate 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 with the three following criteria:

1. Key is more natural to use as reference

2. Key is more simple

3. Key is guaranteed unique

· 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.


ERD (Entity Relationship Diagram)

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

Differences between the 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 the 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
ER diagram on the relationship can be described with a lozenge. Relationship is a natural relationship that occurs between entities. In general, the name given to the verb base making it easier to do readings relationships. Relationship Degree is the number of entities participating in a relationship. Degree which is often used in the ERD.



Attribute
is the nature or characteristics of each entity and relationship


Kardinalitas
tupel indicates the maximum number that can be associated with entities on the other entity


RELATIONSHIP DEGREE


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.


KARDINALITAS
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 is reviewed. For one incident in the first entity can have many relationships with the incident on the second entity, if the one incident in which two entities can only have a relationship with one incident in which the first entity.

- Many To Many: if any incident occurs in an entity has many relationships with other entities in the incident.


Notation (E-R diagram)

Symbolic notation in the ER diagram is

- Rectangle represent the collective entity

- Circle represent the attributes

- rhomb is represent collective relationships

- Line as the link of relationships between the entity and the collective entity with collection of attribute


Tidak ada komentar:

Posting Komentar