Minggu, 19 April 2009

DATABASE AND ER-DIAGRAM

Data Base Definition
data base of vital importance for one who know computer more, especially for a programmer. because database can also be called with the heart of from system at make by a programmer or one who make system

data base definition as follows:
• stored data nest in magnetic disk, optical disk or another secondary storage inwrought
• collection from data mutual related from a enterprise (companies, government resort or private)
1. manufacturing business à production planning data, recent production data, materials order data, etc
2. hospital? patient data, doctor, nurse, etc

database management system :

• database collection/federation with application software based on database
• these application program is used to accessing and take care database
• principal aim dbms prepares a easy environment and efficient for use, withdrawal and data storage and information

beet, byte, field :
• beet -> be smallest data part value containing 0 or 1
• byte -> collection from beets of a kind
• field -> nest byte of a kind, in data base is used attribute term



attribute/field :

• be character or characteristics from a entity that prepare to prepare detail explanation about entity
• a also can has attribute
• attribute example:
1. student university: nim, name, address
2. car: nomor_plat, colour, kind, cc

attribute types :
• single vs multivalue :
1. single -> only can loaded at most one value
2. multivalue? can loaded with interest from one value with same type
• atomic vs composition :
1. atomic à indiscrete into attribute smaller
2. composition? be federation from several attributes smaller

• derived attribute
1. attribute the value can be produced from attribute value other, example à age that produced from date attribute born
• null value attribute
1. attribute doesn't has value to a record
• mandatory value attribute
2. attribute that must has value

record/tuple :
• be a data line in a customer
• consist of where is attributes mutual connected to information entity/customer in its entirety

entity/file:
• file is collection from record of a kind and has element same, attribute same but vary data value.
• file type
in application processing, file can category as follows:
1. mother file
2. transaction file
3. report file
4. history file
5. patron file
6. work file
Domain :
• domain be collection from values that permitted to stay in one or more attribute. every attribute in a data base relation defined as a(n) domain

data element key :
• key element record that worn to find record when does access or can also be used to identify every entity/record/line.

kinds key :
• superkey be one or more attribute from a table that can be used to identify entityty/record from table uniquely (not all attributes be superkey)
• cadidate key super key with minimal attribute. candidate key can not full attribute from other table so that candidate key beyond question superkey but not yet sure on the contrary.
• primary key
• one of [the] attribute from candidate key can be choose/determined to be primary key with three criteria as follows:
1. key more natural to be used as reference
2. key simpler
3. key well guarantee the uniqueness

• alternate key attribute from candidate key not chosen be primary key.
• foreign key be just any attribute that indicate to primary key in other table. foreign key will happen at one particular customer that has kardinalitas one to many (one to many) or many to many (many to many). foreign key usually always put in table that aim to many.
• external key be a lexical attribute (or collection lexical attribute) the values always identify one object instance.

ERD (entity relationship diagram):
• ERD a network model that use wording that kept in system according to abstract.
• difference between DFD and ERD :
1. DFD will be a function network model that be carried out by system
2. ERD be data network model that emphasized in structure and relationship data

elements ERD :
• entity -> in ER diagram entity described with long square form. entity something that there in real system also where does stored data or where found data.
• relationship ->in ER diagram relationship can be described with a lozenged. relationship natural connection that between entity. in general given name with verb base so that make easy to do the customer reading.
• relationship degree -> total entity that participate in one relationship. degree often worn in ERD.
• attribute ->character or characteristics from every entity also relationship
• kardinalitas -> show optimum tupel that can relation with entity in entity other

degree relationship
• unary relationship -> model relationship that between entity that come from entity set same.
• binary relationship ->model relationship that between 2 entity.
• ternary relationship -> be relationship between instance from 3 types entity unilaterally.

Kardinalitas :
• found 3 kardinalitas customer that is :
1. one to one: connection level one to one declared with one incident in entity first, has only one connection with one incident in entity second and on the contrary.
2. one to many or many to one: connection level one to many equal to many to one depending from which direction connection seen. to one incident in entity first can has many connection with incident in entity second, if on the contrary one incident in entity second only can has relation with one incident in entity first.
3. many to many: happen if every incident in a entity has many connection with incident in entity another.

example kardinalitas :


notation (diagram e-r) :
• symbolic notation in diagram ER
1. long square declares collection entity
2. circle declares attribute
3. slit ketupat declare customer collection
4. line as liaison between customer collection with collection entity and collection entity with the attribute

Tidak ada komentar:

Posting Komentar