Cs165 Chapter 1 Notes

Page 1

CS 165 - Database Systems Chapter 1 Database - collection of data describing the activities of one or more related organizations Database Management System (DBMS) – software designed to assist in maintaining and utilizing large collections of data

A Historical Perspective Integrated Data Store - First general-purpose DBMS - Designed by Charles Bachman - Formed basis for the network data model Information Management System (IMS) - Developed by IBM - Basis for the hierarchical data model Edgar Codd - Proposed the relational data model James Gray - Contributed to the database transaction management - Transaction – concurrent execution of database programs Enterprise Resource Planning (ERP) and Management Resource Planning (MRP) - Packages that identify a set of common tasks and provide a general application layer to carry out these tasks

1


File Systems versus a DBMS  Questions about the data must be answered quickly - Write special programs to answer each question  Changes made to the data by different users must be applied consistently - We must protect the data from inconsistent changes made by different users accessing the data concurrently = complex! - Data is restored to a consistent state if the system crashes  Access to certain parts of the data must be restricted - Or provide only password for security

Advantages of a DBMS 1) Data Independence - Abstract view of the data that hides details of data representation and storage is provided 2) Efficient Data Access - Storage and retrieval of data can be done efficiently 3) Data Integrity and Security - The DBMS can enforce integrity constraints - It can also enforce access controls 4) Data Administration - Centralizing the administration of data to minimize redundancy 5) Concurrent Access and Crash Recovery - Abstraction which enables the user to think of the data being accessed by only one user at a time - Protection from effects of system failures is enforced 6) Reduced Application Development Time - DBMS supports important functions that are common to many applications accessing data in the DBMS - Facilitates quick application development

Disadvantages of DBMS 1) Its performance may not be adequate for certain specialized applications 2) Relational DBS do not support flexible analysis of text data

2


Describing and Storing Data in DBMS Data Model - Collection of high-level data description constructs that hide many lowlevel storage details Semantic Data Model - More abstract, high-level data model that makes it easier for a user to come up with a good initial description of the data in an enterprise - Entity-relationship model is an example A. The Relational Model a. Relation - a set of records b. Schema - description of data in terms of a data model - Template for describing a relation c. Integrity Constraints - Conditions that the records in a relation must satisfy B. Other Data Models a. Hierarchical Model b. Network Model c. Object-Oriented Model d. Object-Relational Model e. Relational Model C. Levels of Abstraction in a DBMS a. Data Definition Language - Used to define the external and conceptual schemas b. System Catalogs - Storage for the information about the conceptual, external, and physical schemas

3


Physical Schemas 1. Conceptual Schema a. “logical schema” b. Describes the stored data in terms of the data model of the DBMS c. In a relational DBMS, this describes all relations that are stored in the database d. These relations contain info about entities and relationships e. The process of arriving at good conceptual schema is called a conceptual database design 2. Physical Schema a. Specifies additional storage details b. Summarizes how the relations are actually shared on secondary storage devices 3. External Schema a. Allow data access to be customized (and authorized) at the level of individual users or group of users b. Consists of a collection of one or more views and relations c. View: relations not stored in the DBMS D. Data Independence a. Application programs are insulated from changes in the way the data is structured and stored

Queries in a DBMS -

Queries: questions involving the data stored in a DBMS Query language: specialized language in which queries can be parsed Relational Calculus: formal query language based on relational logic Relational Algebra: formal query language based on a collection of operators Data Manipulation Language – means for which the DBMS can create, modify, and query data

4


Transaction Management A. Concurrent execution of Transactions a. Locking protocol (exclusive and shared locks) B. Incomplete Transactions and System Crashes a. Log of all writes to the DB b. Write-Ahead Log

People Who Work with Databases Database Implementors - Those who build DBMS software End-users - People who wish to store and use data in a DBMS Database application programmers - Develop packages that facilitate data access for end users Database administrators - Design of the conceptual & physical schemas (what data to store & how to store) - Security & Authorization - Data Availability & Recovery from Failures - Database Inquiry – modifying the database

CREDITS: Notes by Camille Salazar Scanned by Rovie Doculan Encoded by Emir Mercado 5


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.