Académique Documents
Professionnel Documents
Culture Documents
Charumatr Pinthong
What is a Database? Database (DB) is a collection of stored operational data used by the application systems of some particular enterprise.
Pros
Reduce data redundancy and inconsistancy Fast application development Enforce standardization Data independence security
Cons
Expensive Resource comsuming Slow Require experience development team
Files organized in serial manner. Physical data structure essentially the same as logical file structure. Batch-processing with no real-time access. Several copies stored of the same file because previous generations of data are kept. Software handles only input/output operations. Application programmer designs the physical file layouts and embeds them in the application programs. If the data structure or storage device are changed, the application program must be rewritten, recompiled, and retested. Data is usually designed and optimized for one application. Hence the same data is rarely used across applications. High level of redundancy between data files.
Access method
Serial access or random access is possible to records (not fields). Processing is batch, in-line, or real-time. Logical and physical file organization are distinguished but the relationship between them is fairly simple. Storage units can be changed without changing the application program. Data structures are usually serial, indexed sequential, or simple direct access. Multiple-key retrieval is generally not used. Data security measures may be used (but are rarely very secure). Data still tends to be designed and optimized primarily for one application. Much data redundancy still exists. If hierarchical files are used, the programmer usually has to construct the father-son relationships. The software provides "access" methods but not "data management"
Multiple different logical files can be derived from the same physical data. The same data can be accessed in different ways by applications with different requirements. Software provides the means to lessen data redundancy. Data elements are shared between diverse applications. Absence of redundancy facilitates data integrity. The physical storage organization is independent of the application programs. It may be changed often in order to improve the data-base performance without application program modification. The data is addressable at the field or group level. Multiple-key retrieval can be used. Complex forms of data organization are used without complicating the application programs.
Software provides logical as well as physical data independence, allowing a global logical view of the data to exist independently of certain changes in the application programs' views of data or the physical data layouts. The data independence capabilities listed in Fig. 3.2 are provided. The data base may evolve without incurring high maintenance costs. Facilities are provided for a Data-Base Administrator to act as controller and custodian of the data, and ensure that its organization is the best for the users as a whole. Effective procedures are provided for controlling the privacy, security, and integrity of the data. Inverted files are used on some systems to permit rapid data base searching. Data bases are designed to provide answers to unanticipated forms of information request. Data migration is facilitated. The software provides a data description language for the Data-Base Administrator, a command language for the application programmer, and sometimes a data interrogation language for the user.
Clarity
Users can easily know and understand what data are available to them.
Ease of use
Users can gain access to data in a simple fashion. Complexity is hidden from the users by the data-base management system.
Flexible usage
The data can be used or searched in flexible way with different access paths.
Change is easy
The data base can grow and change without interfering with established ways of using the data.
Low cost
Low cost of storing and using data, minimization of the high cost of making changes.
Performance
Data requests can be satisfied with speed suitable to the usage of the data.
Privacy
Unauthorized access to the data will be prevented. The same data may be restricted in different ways from different uses.
Availability
Data are quickly available to users at almost all times when they need them.
Controlled redundancy
Data items will be stored only once except where there are technical or economic reasons for redundant storage.
Data dictionary
A data dictionary, defining all data items used, is needed.
Integrity controls
Range checks and other controls should detect data inaccuracies where possible.
Tunability
The data base should be tunable, to improve performance without causing application program rewriting.
Three levels databases system Internal level Conceptual level External level
Relational Database?
Simplicity
User Design
Relational Model
Mathematical foundation Basic component a RELATION Relation-at-a-time processing Non-procedural languages
Data structure
Relation two dimension table with ROW and COLUMN Tuple values that form one row Domain set of all possible values for attributes Primary and candidate keys
Data Integrity
Entity integrity Referential integrity
Requirement definition DATA Modeling System design Program development System testing Installation & Maintenance
Data Modeling
Data modeling is a technique to build the data model which is a map to show how data are associated. WHEN? HOW?
Integration System
Conceptual Design An Example
Integration System
Integration System
An Example
Data Modeling
A simplified
Reduce change
Reduce cost
Because the business activity itself is more stable than the organization
Data Modeling
Is a technique to build the data model which is a map to show how data are associated.
DATA is an important resource within the company & It belongs to the whole organization
Unique key Exists independently/meaningful Required by the application Unique key The whole key Nothing but the key