DATABASE AND E-R DIAGRAM

1. Database Definition


The database (English language: a database), or often also spelled database, is the collection of information stored in the computer so that it can be systematically examined using a computer program to obtain information from the data base. Software used to manage and call the query (query) of data base is called the database management system (DBMS).
Basic concept of the database is a collection of records, or snippets of knowledge. A database has a structured explanation of the types of facts stored in it: this description is called the scheme. Scheme describes the objects that represented a data base, and the relationship between these objects. There are many ways to organize the scheme, or structure model of the database: this is known as the database model or data model. Model that is now commonly used relational model, according to Layman: the term represents all the information in the form of table-related tables where each table consists of rows and columns (using the definition of the actual mathematical terminology). In this model, the relationship between the table represented by using the same value across the table. The other models, such as the hierarkis network model and use a more explicit way to represent relationships between tables.


2. Database Management System

A Database Management System (DBMS) is an organised set of facilities for accessing and maintaining one or more databases. A DBMS is a shell which surrounds a database or series of databases and through which all interactions take place with the database. The interactions catered for by most existing DBMS fall into four main groups:
a. Data definition – defining new data structures for a database, removing data structures from the database, modifying the structure of existing data.


b. Data maintenance – inserting new data into existing data structures, updating data in existing data structures, deleting data from existing data structures.
c. Data retrieval – querying existing data by end-users and extracting data for use by application programs.
d. Data control – creating and monitoring users of the database, restricting access to data in the database and monitoring the performance of databases.


3. Data Definition

A database is effectively a set of data structures for organising and storing data. In any data model, and consequently in any DBMS, we must have a set of principles for exploiting such data structures for information systems applications within organisations. Data definition is the process of exploiting the inherent data structures of a data model for a particular organisational application.

3.1 Relations

There is only one data structure in the relational data model – the relation. Because the idea of a relation is modelled on a mathematical construct, a relation is a table which obeys a certain restricted set of rules:
  • Every relation in a database must have a distinct name.
  • Every column in a relation must have a distinct name within the relation.
  • All entries in a column must be of the same kind. They are said to be defined on the same domain.
  • The ordering of columns in a relation is not significant.
  • Each row in a relation must be distinct. In other words, duplicate rows are not allowed in a relation.
  • The ordering of rows is not significant.
  • Each cell or column/row intersection in a relation should contain only a socalled atomic value. In other words, multiple-values are not allowed in the cells of a relation


3.2 Primary Key

Each relation must have a primary key. This is to enforce the property that duplicate rows are forbidden in a relation. A primary key is one or more columns of a table whose values are used to uniquely identify each of the rows in a table. In any relation there may be a number of candidate keys; that is, a column or group of columns which can act in the capacity of a unique identifier. The primary key is chosen from one of the candidate keys.
Example:
Consider the relation named Lecturers above. The attributes staffNo, staffName and status are currently candidate keys since the values in these columns are currently unique. We know in practice, of course, that as the size of the lecturers table grows, we may store information about more than one lecturer named Evans R, and more than one lecturer is likely to be a senior lecturer – an SL. This leaves staffNo – a unique code for each lecturer of a university – as the only practicable primary key.

Any candidate key, and consequently any primary key, must have two properties. It must be unique, and it must not be null – a special character being used to indicate a missing or incomplete datum. First, by definition any candidate key must be a unique identifier. Hence, there can be no duplicate values in a candidate or primary key column. Second, we must have a primary key value for each row in a table. In other words, we cannot have a null (non-existent)
value within a primary key column or columns. Picture below is example of primary key.



3.3 Domains

The primary unit of data in the relational data model is the data-item. Such data-items are said to be non-decomposable or atomic. A set of such data-items of the same type is said to be a domain. Domains are therefore pools of values from which actual values appearing in the columns of a table are drawn.
Example:
Examples of data-items include a staff number such as 244, a lecturer name such as S Patel or a student’s date of birth such as 1/7/1986. Suppose there are four members of staff in our institution with the staff numbers 244, 386, 534 and 222. The domain of staff numbers is the set of all possible staff numbers, in our case {244, 386, 534, 222}.

3.4 Foreign Key

Foreign keys are the means of interconnecting the data stored in a series of disparate tables. A foreign key is a column or group of columns of some table which draws its values from the same domain as the primary key of some related table in the database.
Example:
Consider the relation named Lecturers above. staffNo is a foreign key in the modules table. This column draws its values from the same domain as the staffNo column – the primary key of the lecturers table. This means that when we know the staffNo of some lecturer we can cross-refer to the lecturers table to see, for instance, the status of that lecturer.

3.5 Super Key

Superkey is one or more attributes of a table that can be used to identify the entity / record from the table which are unique (not all attributes can be superkey).

3.6 Candidate Key

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


4. Entity Relationship Model

Entity-Relationship Model (ERM) is an abstract and conceptual representation of data. Entity-relationship modeling is a database modeling method, used to produce a type of conceptual schema or semantic data model of a system, often a relational database, and its requirements in a top-down fashion.

Diagrams created using this process are called entity-relationship diagrams, or ER diagrams or ERDs for short. The definitive reference for entity relationship modelling is generally given as Peter Chen's 1976 paper[1]. However, variants of the idea existed previously (see for example A.P.G. Brown[2]) and have been devised subsequently.




5. Data Models

5.1 Entities

An entity may be defined as a thing which an organisation recognises as being capable of an independent existence and which can be uniquely identified. An entity is an abstraction from the complexities of some domain. When we speak of an entity we normally speak of some aspect of the real world which can be distinguished from other aspects of the real world. An entity may be a physical object such as a house or a car, an event such as a house sale or a car service, or a concept such as a customer transaction or order. Although the term entity is the one most commonly used, following Chen (1976) we should really distinguish between an entity and an entitytype.
An entity-type is a category. An entity, strictly speaking, is an instance of a given entity-type. There are usually many instances of an entity-type. It must be remembered however that whenever we refer to an entity we normally mean an entity-type. Entities are by their very nature interesting things because entities are normally used to define logical data groupings. In conventional information systems jargon the term logical data grouping normally means a file. One rule of thumb to apply in identifying suitable entities for a given application is therefore the following:

If you need to store data about many properties of some thing, then that thing is likely to be an entity.

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

5.3 Attributes

As a real-world aspect, an entity is characterised by a number of properties or attributes. Values assigned to attributes are used to distinguish one entity from another. We also choose one or more attributes to act as identifiers for instances of an entity.

This picture below is the examples of entities, relationship, and attributes.



6. Cardinality

Cardinality (or degree) concerns the number of instances involved in a relationship. A relationship can be said to be either a 1:1 (one-to-one) relationship, a 1:M (one-to-many) relationship, or a M:N (many-to-many) relationship.
Example:
The relationship between a Bankaccount entity and a Customer entity can be said to be one-to-one (1:1) if it can be defined in the following way:

A bank account is held by at most one customer
A customer may hold at most, one bank account


In contrast, the relationship between Bankaccount and Customer is one-to-many (1:M) if it is defined as:

A customer holds many bank accounts
A bank account is held by at most one customer


Finally, we are approaching a realistic representation of the relationship when we describe it as being many-to-many (M:N). That is:

A customer holds many bank accounts
A bank account may be held by many customers



The other example of Cardinality:




7. E-R Notation


DATA FLOW DIAGRAM

The idea of a chart to represent data in a system that is not new. In the year 1967, Martin and Estrin introduce an algorithm program by using the circle and arrow symbols to represent data flow. E. Yourdan and L.L. Constantine also use this notation symbols to describe the flow of data in the design program. GE Whitehouse 1973 also use the notation to make this kind of model system
mathematics. The use of notation in the data flow diagram is very helpful to understand at all levels complexity such as that expressed by Chris Gane and Trish Sarson. The data flow diagram describing the system modules in a smaller part. Easily the less understood areas of the computer to understand the system that will be done.


Context Diagram
Context diagram consists of a process and describe the scope of a system and it is the highest level of the DFD that describes the input to and output from the entire system. The system is limited by boundary (depicted by broken lines) and there is no storage (storage).


Zero Diagram
Zero diagram describes the process of the DFD. It's provides a view of the overall system, showing the main function or process that is, and the showing the flow of data and external entity. At this level, the data storage is possible. The process is no longer detailed on the next level then added the symbol '*' or 'P' at the end of the process. The input and output balance between zero diagram and context diagram should be maintained.


Detailed Diagram
Detailed diagram is a diagram which explain the process in the zero diagram or above. Numbering level in the DFD is as follows:






Symbols That Used to DFD

Some of the symbols used in the DFD are as follows:
1. external entity or boundary
2. data flow
3. process
4. data store


1. External Entity
Each system has certain boundaries that separate a system with the environment outside the system. The system will receive input and produce output to the outside environment. External entity is an entity in environment outside the system that can be a human being, organization, or the other system. Most external entity is one of the following:

  1. An office, department or division in the company but outside the system that is being developed.
  2. Person or a group of people in the organization but outside of that system is being developed.
  3. An organization or a person outside the organization such as customer and supplier.
  4. Other information systems outside the system that is being developed.
  5. Original source of a transaction.
  6. Recipient of a final report produced by the system.

External entity can symbolized with a notation box.





2. Data Flow
Data flow is a place of information flow. Data flow depicted with a straight line connecting the components of the system. Data flow is shown with the direction arrows and the name on the flow of data that flows. The data flow is pour between processes, storage data, and its indicates that the form of data input for the system.
Here are some examples of data flow:
a. Forms or documents used in the company.
b. Printed reports generated by the system.
c. Display or output on a computer screen generated by the system.
d. Input to the computer.
e. Speech communication.
f. Letter or memo.
g. Data is read or recorded to a file.
h. A field note book on the agenda.
i. Transmitting data from one computer to another.
Flow data should be given the name and have a clear meaning. The name of the data flow in addition to the written its arrow. Following example:



Guidelines for naming:
1. The flow of data flow consists of several words associated with the line speed
2. No data flow of the same name and should reflect the contents
3. Flow of data that consists of several elements can be expressed with the group element
4. Avoid using the word 'data' and 'information' to give a name to the flow of data
5. Wherever possible the complete flow of data is written



3. Process
A process is an activity or work done by the person, machine or a computer from the result of data flow into the process for generated data that will flow out of the process. The process is what is done by the system and then can process data flows or data entry into the flow of data out. The transform function of one or more of data input into one or more of the output data in accordance with the desired specifications so each process has one or more inputs and produce one or more output. The process is also called bubble.
A process can be indicated with a circle symbol or rectangle with straight corners blunt.


Each process must be given a full explanation include the following.
  1. Identification process. This included the identification of a number that indicates the number of reference and the process is written at the top of the symbol in the process.
  2. Name of the process. The name indicates that the process is done by the process. Name of the process must be clear and complete.
  3. Processor. The processor may not be listed.

Guidelines naming of the process:
  1. The process consists of a verb and noun, which reflects the function of the process.
  2. Do not use the process as part of the name of a bubble.
  3. There may be some process that has the same name.
  4. The process must be given a number. Order number wherever possible to follow the flow of the process or sequence, but the sequence number does not mean that the absolute is a process in chronological order.



4. Data Store
Data storage is a storage place for data that exists in the system.
Symbolized with a pair of parallel lines or two lines with one side open side. The process can retrieve data from or provide data to the database.
Guidelines for naming:
1. The name should reflect the data storage.
2. When its name more than one word must be marked with the number.

Data store can be as follows:
a. A file or database in the computer system.
b. An archive or records manual.
c. A box of data.
d. A table reference manual.
e. Agenda or a book.



DFD SYMBOL






Type of Data Flow Diagram
There are 2 forms of DFD, the physical data flow diagram and logical data flow diagram. Physical data flow diagram more emphasis on how the process of the system is applied while
logical data flow diagram is to emphasize the process of what is found in the system.
  1. Physical Data Flow Diagram, more appropriately used to describe the existing system. The emphasis on this diagram is how the processes of the system is applied. PDFP must include the following:
    1. Manual processes are also described.
    2. Name of the flow data must indicate the number of such application form and the medium.
    3. Savings data can show savings of non-computer.
    4. The name of saving the data type of application must show, whether manual or computerized.
    5. The process must show the name of the processor, the man, ministry, computer system or computer program to access the process.
  2. Logical Data Flow Diagram, more appropriately used to describe the system that will be proposed. LDFD does not emphasize on how the system implemented, but the emphasis only on the logic of the needs of the system.
For computerized systems, drawing LDFD that shows only the needs of the proposed logic of system, usually the processes described is only the computer proces only.



Data Dictionary


Data dictionary is to help the system to interpret the application in detail and organize all elements of the data used in the system precisely so that the system analyst have a basic understanding of the same input, output, storage and process.
At analysis step, the data dictionary is used as a means of communication between the systems analyst with the user, and at the design stage of the system, the data dictionary is used to design input, reports and databases. Load the data dictionary as follows:
  1. The flow of data: should be noted that readers who need further explanation about a flow of data can find it easily.
  2. Alias: alias or other name of the data can be written when it is existence.
  3. The form of data: used to segment the data dictionary to use when designing the system.
  4. Data flow: indicates from which data flows and where the data goes.
  5. Description: provides an explanation about the meaning of the data flow.



Balancing in DFD

Balancing in DFD means flow of data 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. Besides then the flow of data into and out of the process must match the name of the flow of data into and out of the details of the process. The number and name of an entity outside the process must be equal to the number of names and entities outside of the details of the process.
There are some issues that must be considered in the DFD which have more than one level:
  1. Must be balance between input and output of one level and next level.
  2. Balance between level 0 and level 1 at the input / output of stream data to or from the terminal on level 0, while the balance between level 1 and level 2 is seen on the input / output of stream data to / from the process concerned.
  3. The flow of data, the data storage and the terminals at each level must be the same if its the same object.


Prohibition in DFD
  1. Flow data may not be from outside the entity directly to other outside entities without going through a process.
  2. Flow data may not be from the savings directly to the data to outside entities without going through a process.
  3. Flow data may not be saving the data directly from the other savings data without going through a process.
  4. Flow of data from one process directly to the other without going through the process of saving data should or be avoided as much as possible.

FIRST OBSERVATION, ANALISYS REQUIREMENT

CONCEPT OF INVESTIGATION SYSTEM
There are some point about Investigation System Concept, which the following:

1. Discrepancy between the objective of system and the real condition of system
2. Problem detection report is not real, because:
- the objective is too ideal
- lack of attitude and resources
- system measuring is not accurate
- the objective of system which have to be left behind
- difference between the idle system and the temporary system
3. The Problem solving
- investigation to the system which is running
- getting the ideal system consensus
- choose the best alternative
4. The objective of investigation have to show the problem which in fact is happened


PROBLEMS IN INVESTIGATION SYSTEM
There are some problems when conduct the investigation:
- Time
- Cost
- Science
- Politics
- Intervention


RECOMENDATION

A result from investigation is a recomendation which are the following:
- Does not take any action if the problem does not exist
- Perform system maintenance of the small problems
- Increasing the ability or skills
- Consider modifications to total system
- Putting the problem to occur in the development plan system which immediately made



INVESTIGATION TACTICS

Why we need tactics?
- to find all issues
- Knowing the causes of the emergence of problems
- to determine the appropriate solution
- Done so that all elements of the system can receive a solution without disrupting their activities.

Some of the tactics that can be done:
- Listen to opinions the subject of system
- Do not give the early breakthrough
- Compare the stories from the subject of system concerning in the same case
- Note the logical inconsistency problem



INVESTIGATION TECHNIQUE

Directly:
- The questionnaire
- FAQ
- Observations
Not directly:
- Flow of procedure
- Reviewing documents
- Sample
- Tabular


RECENTLY SYSTEM DESCRIPTION

- Input
- Output
- File
- Data elements
- Transaction volume and document action
- Data flow diagram



ANALYSIS REQUIREMENT
Stage of intensive interaction between the systems analyst with the end user where the system development team show their expertise to get feedback and trust so that the user get a good participation.

4 purpose that want to achieved:
- Explain the complete system
- describing the ideal Information System
- Bringing the ideal information system to a condition at this time to pay attention to the constraints of resources
- Providing encouragement to the confidence of user in the system development

Method:
- FAQ
- Kuisioner
- Observation
- Analysis procedure
- Document observation

Resources problems:
- Time
- Money
- Expertise
- Technology
- External Factors

Document requirement:
- Analysis direction: Relationships with end users, the observation process, problems in data collection
- User Requirements: actual requirement, reporting requirements, training requirement and the influence of the new system
- System Obstacle: Explaining the cost and time constraints, expertise, technology, and external factors
- Document form data collection instruments, statistical consensus, flow of the logical data and physical data, data elements in the initial data dictionary.



GENERATING SYSTEMS ALTERNATIVES

How to approach the condition of the system at this time with the condition of the ideal system?
- Create an alternative to solve the problem of information system
- The best alternative is applied wisely

Options Strategies
- Distributed versus centralized processing
Changes in information decision-making from the centralized data processing to the decentralized end user responsibility center
- Integrated versus dispersed database
System designer must consider the data which are entered in the database and into the file
- Surround Strategy of System Development
About important environmental strategy in the case of company takeovers because the information system of other companies may vary with the company at this time.

Options Tactics
- The design is done before the selection operation

Designing Operational Options
The design options can be grouped into:
a. Input
- Online Vs Off Line Data Entry
- Keyed Vs Machine Readable Data Entry
- Centralized Vs Decentralized Data Entry
b. Processing
- Batch Vs Realtime record update
- Sequential Vs Direct Access to records
- Single Vs Multiple Users update of records
c. Output
- Traditional Vs Turn Around Documents
- Structured Vs Inquiry-based reports



SELECTING THE PROPER SYSTEM

a. Comparing tactics: System comparison based on the costs and benefits relatively; There are 3 ways a system is superior to the other, if:
- A's cost is lower than B and both are the same benefits.
- A's cost is lower than B and A yield more advantage than B.
- A and B have the same but the A's cost advantage more than B.

b. Some methods of comparison system
- Break Even point Analyisis
- Payback Period
- Discounted PayBack period
- Internal Rate of Return

c. Category Cost
- Hardware
- Software
- People
- Suppliers
- Teleccommunications
- Physical sites

d. Fee Details
Comparing the cost of information systems through the life of the system, analysis is calculating the cost changes for the future and there are 3 models of cost of information system, namely Linear, and exponentially Step Function.

e. Cost of information system can occur only once and can also occur continously.
- The cost of information systems that occur only once is ontime cost and development cost that occur during the development of the system.
- The cost of information systems that occur on a continual basis are reccuring cost and operational cost where the cost of this is happened when the information system operates every day.



INFORMATION SYSTEM FACTORS
Qualitative factors that lead the performance of a good information system are:
- Reduce errors
- Reduce the time to fix errors
- Reducing the response time from the alternative workstation
- Accelerating the provision of information
- Increase the security system
- Have active update source record
- Increase user satisfaction



CORPORATE STRATEGY FACTORS
- Customer satisfaction
- Level sales increased
- Commitment of consumers and vendors
- Information of marketing products


PRESENTING LEARNING OF SYSTEM

- Conduct a brief presentation
- Reduce technical explanation in detail
- Presenting clearly with visual aids
- If using a model using a tool such as a laptop so that more informative
- Emphasize the benefits of the proposed information system with some alternative that is appropriate conditions experienced by the company.



CONTINUING THE DECISION OR NOT
- If the company decided to develop the system, the information department will do next, namely the System Design Process.
- If the other way then the System Development Life Cycle (SDLC) will be terminated.
- Often a problem will be found with the study system and then usually top management will ask for the re-employment the study system.
- Model will describe some of the stages of the repeated and sometimes the information will make a decision before the repeat stage system of study.
- With the alternative, the decision to repeat a previous stage SDLC or not is called Go-No-Go Decision.

Base Concept of Information.

Information can be defined as follows:

Information is processed data become more good form for and more meaning to accepting its source of information. Data represent plural form called datum. Data is fact depicting an events and unity of reality.


Quality of information depended from three things, these are information have to be accurate, punctual, and relevant.
Accurate : meaning the information have to free from mistake and express its intention.
Punctual : meaning the incoming information at receiver may not lose time.
Relevantly : meaning the information have benefit for its user.

Base Concept of System

There are two approach groups in defining system, that is emphasizing at its procedure and emphasizing at component or its element. Approach of more emphasizing at system of procedure define the following system:

System are network work from procedures which is interaction, gathering together to conduct an activity or to finish an certain target.


Approach of system representing network work from procedure more emphasizing of medley operate for in system.
Procedure defined by Richard F. Neuschel the following :

A procedure is medley operate for clerical, usually entangle some people in one or more departmental, applied to guarantee uniform handling of business.
transactions that happened.




While approach of more emphasizing at system of element or its component define the following system:

System is corps of elements which is have interaction to reach a specific-purpose.


A system have characteristic or nature of is certain, that is:

1. Components
Component which interact, work along to form one unity

2. Boundary
Limiting system with other system or with external environment

3. Environment
Everything beyond the bounds of the system cause influence operation system

4. Interface
Link between one sub system with other sub system

5. Input
Something entered into system can be the form of treatment input and signal input

6. Output
Result of from something processed and classified to become output which good for

7. Process
Change input become output

8. Objectives and Goal
System told to succeed if or when have hit target or its target


System can be classified from some viewpoint, among others shall be as follows:
1. System classified as abstraction system and physical system
2. System classified as natural system and system made in human being
3. System classified as certain system and indefinite system
4. System classified as closed system and open system