1 1 File Systems and Databases
1 1 Introducing the Database 4Major Database Concepts u Data and information l Data - Raw facts l Information - Processed data u Data management u Database u Metadata u Database management system (DBMS)
1 1 Historical Roots 4Why Study File Systems? u It provides historical perspective. u It teaches lessons to avoid pitfalls of data management. u Its simple characteristics facilitate understanding of the design complexity of a database. u It provides useful knowledge for converting a file system to a database system.
1 1 Figure 1.3 Contents of the CUSTOMER File
1 1 Table 1.1 Basic File Terminology
1 1 Figure 1.4 Contents of the AGENT File
1 1 A Simple File System Figure 1.5
1 1 File System Critique 4File System Data Management u File systems require extensive programming in a third-generation language (3GL). u As the number of files expands, system administration becomes difficult. u Making changes in existing file structures is important and difficult. u Security features to safeguard data are difficult to program and usually omitted. u Difficulty to pool data creates islands of information.
1 1 File System Critique 4Data Redundancy: Uncontrolled data redundancy sets the stage for u Data Inconsistency (lack of data integrity) u Data anomalies l Modification anomalies l Insertion anomalies l Deletion anomalies
1 1 Figure 1.6
1 1 Figure 1.2 The DBMS Manages the Interaction Between the End User and the Database
1 1 Introducing the Database 4Importance of DBMS u It helps make data management more efficient and effective. u Its query language allows quick answers to ad hoc queries. u It provides end users better access to more and better-managed data. u It promotes an integrated view of organization’s operations -- “big picture.” u It reduces the probability of inconsistent data.
1 1 Database Systems 4DBMS Functions 1.Data Dictionary Management 2.Data Storage Management 3.Data Transformation and Presentation 4.Security Management 5.Multi-User Access Control 6.Backup and Recovery Management 7.Data Integrity Management 8.Database Access Languages (DDL and DML) and Application Programming Interfaces 9.Database Communication Interfaces
1 1 Figure 1.7 The Database System Environment Figure 1.7
1 1 Introducing the Database 4Why Database Design Is Important? u A well-designed database facilitates data management and becomes a valuable information generator. u A poorly designed database is a breeding ground for uncontrolled data redundancies. u A poorly designed database generates errors that lead to bad decisions.
1 1 Database Models 4Three Types of Relationships u One-to-many relationships (1:M) l A painter paints many different paintings, but each one of them is painted by only that painter. –PAINTER (1) paints PAINTING (M) u Many-to-many relationships (M:N) l An employee might learn many job skills, and each job skill might be learned by many employees. –EMPLOYEE (M) learns SKILL (N) u One-to-one relationships (1:1) l Each store is managed by a single employee and each store manager (employee) only manages a single store. –EMPLOYEE (1) manages STORE (1)
1 1 Database Models 4Three Types of Database Models u Hierarchical database model u Network database model u Relational database model
1 1 Database Models 4Relational Database Model u Basic Structure l RDBMS allows operations in a human logical environment. l The relational database is perceived as a collection of tables. l Each table consists of a series of row/column intersections. l Tables (or relations) are related to each other by sharing a common entity characteristic. l The relationship type is often shown in a relational schema. l A table yields complete data and structural independence.
1 1 Linking Relational Tables Figure 1.11
1 1 Database Models 4Relational Database Model u Advantages l Structural independence l Improved conceptual simplicity l Easier database design, implementation, management, and use l Ad hoc query capability (SQL) l Powerful database management system u Disadvantages l Substantial hardware and system software overhead l Possibility of poor design and implementation l Potential “islands of information” problems