Minggu, 19 April 2009

DATABASE AND ER-DIAGRAM

DATABASE AND ER-DIAGRAM
DATA BASE DEFINITION
· Stored nest of data in magnetic disk, optical disk or another secondary storage
· Inwrought collection from dates that mutual related from a enterprise (companies, government resort or private)
Manufacturing business –> Production planning data, recent production data, materials order data, etc
Hospital –> Patient data, doctor, nurse, etc.

DATABASE MANAGEMENT SYSTEM
DBMS is a system and the data base on the computer. This system is designed to be able to do a variety of data with some reference data are the same? DBMS is able to access various applications.
BIT, BYTE, FIELD
1. Bit is the smallest pieces of data that contains the value 0 or 1
2. Byte is a set of bit-bit similar
3. Field is a set of byte-byte similar, in the database used the term attribute



ATRIBUT/FIELD

· Is a character or characteristics from an entity that prepare detail explanation about that entity
· A relation also can has an attribute
· Attribute example:
o MAHASISWA: NIM, NAMA, ALAMAT
o MOBIL: NOMOR_PLAT, WARNA, JENIS, CC
TIPE-TIPE ATRIBUT
Single vs. multivalent
Single > can only be filled at most one value
Multivalent > can be filled with more than one value with the same type of
Atomic vs. composition
Atomic > can’t be divided into the attributes of smaller
composition > is a combination of several attributes of a smaller
Derived Attribute
attribute value can be derived from other attribute values, for example: age of the attributes generated from the date of birth.
Null Value Attribute
Attributes that have no value to a record
Mandatory Value Attribute
Attributes must have values
RECORD/TUPLE
· Is a data line in a relation
· Consist of a collection of attributes where that attributes mutual connected to give an information about an entity/relation completely
ENTITY/FILE
File is a collection of similar records and have the same elements, the same attributes but different data value.
ENTITY/FILE
· File is collection of a kind record and has same element , same attribute but has deferent data value.
· File type
· In application processing, file can classified as follows:
· Parent file
· Transaction file
· Report file
· History file
· Patron file
· Work file
DOMAIN
Domain is collection from values that permitted to stay in one or more attribute. Every attribute in a relational data base is defined as a domain.
KEY DATA ELEMENT
Key elements of record which is used to find these records at the time of access, or can also be used to identify each entity / record / line.
KINDS OF KEY
Super Key is one or more attribute from a table that can be used to identify entity/record from table uniquely (not all attributes can be super key)
Candidate Key is Super Key with minimal attribute. Candidate key can not full with attribute from other table so that Candidate Key is super key certainty but not yet certain on the contrary.
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
ERD (ENTITY RELATIONSHIP DIAGRAM)
· ERD is a network model that use wording that kept in system according to abstract.
· Difference between DFD and ERD :
o DFD is a function network model that would carried out by the system
o ERD is a data network model that emphasized in 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
Cardinalities
Type indicates the maximum number that can be borealis with entities on the other entity
RELATIONSHIP DEGREE
· Unary Relationship
Is a relationship model that happen between entities that come from it set entity.
· Binary Relationship
Is a relationship model that between 2 entity.
· Ternary Relationship
Is a relationship between instances from 3 types of entity unilaterally?
KARDINALITAS
There are 3 cardinalities 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 relationships is the same as the one to many depending on the direction from which the relationship is viewed. 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 have only one incident relationship with the first entity.
Many To Many:
If any incident occurs in an entity has many relationships with other entities in the incident.
EXEMPLARY KARDINALITAS




NOTATION ER-DIAGRAM
Symbolic notation in diagram ER is:
1. Long square that declares collection of entity
2. Circle that declares attribute
3. Trapezoid declares relation collection
4. Line as liaison between relation collection with entity collection and entity





Reference:
1. ER Ngurah Agus Sanjaya. Slide Part 5 - DATABASE DAN ER-DIAGRAM.

Minggu, 05 April 2009

DFD QUIS

Data Flow Diagram

Data flow diagram also called Data Flow Diagram (DFD). DFD is to describe the system modules in a smaller and less easy for the user to understand to understand the field of computer systems that will be done.
DFD also serves to describe the existing system or the new system will be developed logically without considering the physical environment where the data flows, or where data are stored. DFD is a tool that is used in the system development methodology is structured (structured analysis and design). DFD can describe the flow of data within the system with a structured and clear.

The result is a series of diagrams that represent the business activities in a way that is clear and easy to communicate. A business model comprises one or more data flow diagrams (also known as business process diagrams). Initially a context diagram is drawn, which is a simple representation of the entire system under investigation. This is followed by a level 1 diagram; which provides an overview of the major functional areas of the business. Don't worry about the symbols at this stage, these are explained shortly. Using the context diagram together with additional information from the area of interest, the level 1 diagram can then be drawn.

The level 1 diagram identifies the major business processes at a high level and any of these processes can then be analyzed further - giving rise to a corresponding level 2 business process diagram. This process of more detailed analysis can then continue – through level 3, 4 and so on. However, most investigations will stop at level 2 and it is very unusual to go beyond a level 3 diagram.


Data Flow Diagrams

There are only five symbols that are used in the drawing of business process diagrams (data flow diagrams). These are now explained, together with the rules that apply to them.

Symbol DFD




External Entity

is considered to be important to help the analysis.
Data Flow Diagrams – The Rules
External Entities
It is normal for all the information represented within a system to have been obtained from, and/or to be passed onto, an external source or recipient. These external entities may be duplicated on a diagram, to avoid crossing data flow lines. Where they are duplicated a stripe is drawn across the left hand corner, like this.

The addition of a lowercase letter to each entity on the diagram is a good way to uniquely identify them.

Processes

When naming processes, avoid glossing over them, without really understanding their role. Indications that this has been done are the use of vague terms in the descriptive title area - like 'process' or 'update'.

The most important thing to remember is that the description must be meaningful to whoever will be using the diagram.

Data Flows

Double headed arrows can be used (to show two-way flows) on all but bottom level diagrams. Furthermore, in common with most of the other symbols used, a data flow at a particular level of a diagram may be decomposed to multiple data flows at lower levels.

Data Stores

Each store should be given a reference letter, followed by an arbitrary number. These reference letters are allocated as follows:


'D' - indicates a permanent computer file
'M' - indicates a manual file
'T' - indicates a transient store, one that is deleted after processing.

Data Flows

For data flows the rules are as follows:
Data flows and resource flows are allowed between external entities and processes. Data flows are also allowed between different external entities. However, data flows and resource flows are not allowed between external entities and data stores.

Processes

For processes the data flow rules are as follows:
Data flows and resource flows are allowed between processes and external entities and between processes and data stores. They are also allowed between different processes. In other words processes can communicate with all other areas of the business process diagram.

Data Stores

For data stores the data flow rules are as follows:
Data flows and resource flows are allowed between data stores and processes. However, these flows are not allowed between data stores and external entities or between one data store and another. In practice this means that data stores cannot initiate a communication of information, they require a process to do this.

Data Flow Diagrams – Context Diagrams

The context diagram represents the entire system under investigation. This diagram should be drawn first, and used to clarify and agree the scope of the investigation.

The components of a context diagram are clearly shown on this screen. The system under investigation is represented as a single process, connected to external entities by data flows and resource flows.

The context diagram clearly shows the interfaces between the system under investigation and the external entities with which it communicates. Therefore, whilst it is often conceptually trivial, a context diagram serves to focus attention on the system boundary and can help in clarifying the precise scope of the analysis.

The context diagram shown on this screen represents a book lending library. The library receives details of books, and orders books from one or more book suppliers.
Books may be reserved and borrowed by members of the public, who are required to give a borrower number. The library will notify borrowers when a reserved book becomes available or when a borrowed book becomes overdue.

In addition to supplying books, a book supplier will furnish details of specific books in response to library enquiries.

Note, that communications involving external entities are only included where they involve the 'system' process. Whilst a book supplier would communicate with various agencies, for example, publishers and other suppliers - these data flow are remote from the 'system' process and so this is not included on the context diagram.

Data Flow Diagrams – Context Diagram Guidelines

Firstly, draw and name a single process box that represents the entire system.
Next, identify and add the external entities that communicate directly with the process box. Do this by considering origin and destination of the resource flows and data flows.

Finally, add the resource flows and data flows to the diagram.

In drawing the context diagram you should only be concerned with the most important information flows. These will be concerned with issues such as: how orders are received and checked, with providing good customer service and with the paying of invoices. Remember that no business process diagram is the definitive solution - there is no absolute right or wrong.

Zero Diagram

Zero diagram is a chart that describes the process of DFD. This diagram provides a view of the overall system shows that the main function of the process or the flow of data and the external entity. At this level there is a data storage.

Detailed Diagram

Is a diagram that decipher what is the process in the diagram zero level or above.
Numbering level in the DFD:

In one level there should be no more than 7 units and the maximum of 9, when more should be done in the decomposition.

Process Specification

Each process in DFD must have the process specification. in top level method used to describe process by using descriptive sentence. At more level detailed that is under process (functional primitive) required the specification structure.Process Specification will become guide to programmer in coding. Method used in the process specification : * description process in the story * decision table * decision tree

Data flow diagram levels

DFD Levels
The Context and Top Level diagrams in the example start to describe 'Home Catalogue' type sales system. The two diagrams are just the first steps in creating a model of the system. (By model we mean a co-ordinated set of diagrams which describe the target system and provide answers to questions we need to ask about that system).As suggested the diagrams presented in the example will be reworked and amended many times - until all parties are satisfied. But the two diagrams by themselves are not enough; they only provide a high level description. On the other hand, the initial diagrams do start to break down, decompose, what might be quite a complex system into manageable parts.






A revision of the example Top Level DFD





The next step - the Next Level(s)
Each Process box in the Top Level diagram will itself be made up of a number of processes, and will need to be decomposed as a second level diagram.




Data Dictionary

Data dictionary is a reserved space within a database which is used to store information about the database itself. Data dictionary is also called with a system data dictionary is a catalog of facts and data information needs of an information system. In function to help system agent to interpreting application in detail and organization all of data element that utilized by system exactly so user and system analyst have same understanding basic about entry, output, storage and process. In analysis phase, data dictionary used as communication between system analyst with user. in development system phase, data dictionary used to design input, and report database. Data flow in DFD have the character of globally, boldness more detailed can be seen in data dictionary.
Data dictionary load the followings :
• Name of data current: must note that readers who need further explanation about a flow of data can find it easily
• Alias: alias or other name of the data can be written when there is
• Forms of data: used to segment the data dictionary to use when designing the system
• Flow data: indicates from which data flows and where the data
• Description: to give an explanation of the meaning of the data flow

Balancing in DFD
Data flow into and out of a process must be the same as the flow of data into and out of the details of the process on the level / levels below. Name of the data flow into and out of the process must match the name of the flow of data into and out of the details of the process. Number and the name of an entity outside the process must be equal to the number of names and entities outside of the details of the process.
Things which must be gave attention to DFD owning than one level:
• There are must input balance and output between one level and level next
• Balance between level 0 and level 1 seen at input / output of data stream to or from terminal in level 0, while balance between level 1 and level 2 seen at input / output of data stream to/from pertinent process
• Data flow name, data of storage terminal and every level must be same if its same object

Prohibition in DFD
• Data flow may not from external entity directly to wend another external entity without passing a process.
• Data flow may not from direct data deposit go to external entity without passing a process
• Data flow may not from direct data deposit go to other data deposit without passing a process
• Data flow from one direct process go to other process without passing a data deposit better possible avoided.
References:
- Slide Part 4 - DATA FLOW DIAGRAM by ER Ngurah Agus Sanjaya