DATABASE AND ER-DIAGRAM
Database Definition
A group of data which is saved in magnetic disk, optical disk or other secondary depository·
Inwrought collection of data which is interconnected between each other from enterprise ( company, governmental institution or private sector )
For example:
- Manufacture company >>> data of production planning, data of actual produce, data of ordering material, etc
- Hospital >>> patient data, doctor, nurse, etc
DATABASE MANAGEMENT SYSTEM
- database Corps / database alliance with application software which is based on database
- This application programs are used to access and look after database
- Especial target of DBMS is to provide an efficient and easy environment for the usage, withdrawal and depository of information and data
BIT, BYTE, FIELD
Beet >> representing part of smallest data which is contain value 0 or 1
Byte >> corps of a kind of beets
Field >> a group of a kind of bytes, in database using attribute term
ATTRIBUTE / FIELD
- Representing the nature or characteristic from an entity which is providing detail of clarification about that entity
- A relationship also can having an attribute
ATRIBUTE TYPES
Single Vs multi value
- Single >> can only fill at most one value
- Multi value >> can fill my more than one value with same type
Atomic Vs composition
- Atomic >> indiscrete into smaller attribute
- Composition >> representing alliance of some smaller attribute
Derived Attribute
- Attribute which is its value can be conducted from other attribute value, for example >> age which is conducted by birthday attribute
Null Value Attribute
Attribute which is not has value to record
Mandatory Value Attribute
Attribute which must has value
RECORD
Record represent a data line in a relationship
Record consist of a corps of attributes which is interacted to give information about entity / relationship completely
ENTITY / file
File represent corps of a kind of record and has same element, attribute is same but its data value different each other
Type File
In application processing, file can be categorized:
- Mains file
- Transaction File
- Report File
- Activity File; etc
DOMAIN
Domain represents corps of values which is enabled to stay in one or more attribute. Each attribute in a relational data bases defined as a domain
KEY OF DATA ELEMENT
Key is element of record which is used to find the record when accessing or also can used to identify each entity / record / Line
TYPES OF KEY
Super key represent one or more attribute from a tables which is able to be used to identify entity / record of tables uniquely ( not all of attribute can become super key)
Candidate Key is super key with minimum attribute. Candidate Key may not contain attribute of other tables so that candidate key beyond super key but of course not yet on contrary.
Primary Key is one of the attribute of candidate key can be selected /determined to become primary key with three criterions:
1. The Key more natural to be used as reference 2. The Key more simple 3. The unique of Key have to guaranteed.
Alternate Key is attribute of candidate key which is not chosen become primary key.
Foreign Key represent any attribute subjecting to primary key at other tables. Foreign Key will happened in relationship which is has cardinality one to many or many to many. Foreign Key usually is always put down at tables which is flange to many.
External Key represent a lexical attribute ( or gathering of lexical attribute) which is its values always identify one instance object.
ERD (ENTITY RELATIONSHIP DIAGRAM)
ERD is a network model which is using word formation which is kept abstractly in system.
Difference between DFD and of ERD:
- DFD represent a function network model which is to be executed by system
- ERD represent data network model which is emphasizing at structure and data relationship
ELEMENTS OF ERD
Entity
At ER Diagram. Entity depicted with rectangle. Entity is something that there is in real system and also abstraction where data saved or where data exist.
Relationship
At ER Diagram relationship can be depicted with a rhomb. Relationship is natural relation that happened between entity. In general it called with elementary vb. so make it easy to read its relationship.
Relationship Degree
is amount of entity that participating in one relationship. The degree which is often used in ERD.
Attribute
is the nature or characteristic of each entity and also relationship
Cardinality
show optimum of record which is able to make a relationship with entity at other entity
Relationship Degree
Unary Relationship
is model of relationship that happened between entity coming from same set of entity .
Binary Relationship
is model of relationship that happened 2 entity.
Ternary Relationship
representing relationship among 3 type of entity unilaterally.
CARDINALITY
There are 3 relationship cardinality that is
One to One :Level of Relation one to one expressed with one occurrence at first entity, only having one relation with one occurrence at second entity.
One To Many or Many to One :Level of Relation one to many is equal to many to one .For one occurrence at first entity can have many relation with occurrence at second entity, if on the contrary one occurrence at second entity only can has relation with one occurrence at first entities.
Many To Many : happened if each occurrence at an entity has many relation with occurrence at other entity
NOTATION OF ER DIAGRAM
Symbolic notation in diagram of ER are:
rectangle express gathering of entities
Radian express attribute
Rhombic express relationship gathering
lines as link between with gathering of relationship with Gathering of Entity and gathering of entity with its attribute