Databases and Database Users PDF

Summary

This document provides an introduction to databases and database users, outlining key concepts such as database characteristics, types of DBMS, and the organization of a university database. It discusses how data is stored, retrieved, and manipulated within a database system, and describes the role of various actors in database management. Further, it explores database concepts including program-data independence and advantages of using DBMS.

Full Transcript

chapter 1 Databases and Database Users Content  Introduction  An Example  Characteristics of the Database Approach  Actors on the Scene  Workers behind the Scene  Advantages of Using the DBMS Approach Introduction Data and information  Data: Means known facts that can...

chapter 1 Databases and Database Users Content  Introduction  An Example  Characteristics of the Database Approach  Actors on the Scene  Workers behind the Scene  Advantages of Using the DBMS Approach Introduction Data and information  Data: Means known facts that can be recorded and carry an implicit meaning. For example name, phone number, etc.  Information: Data that has been processed and placed in an appropriate and understandable user form.. Database Properties  A database represents some aspect of the real world  A database is a logically coherent collection of data with some inherent meaning.  A database is designed, built, and populated with data for a specific purpose Database Management Systems (DBMS)  Database Management System (DBMS) is a collection of programs that enables users to create and maintain a database.  The DBMS is a general-purpose software system that facilitates the processes of defining, constructing, manipulating, and sharing databases among various users and applications. Database Management Systems Cont.  Defining a database involves specifying the data types, structures, and constraints of the data to be stored in the database.  The database definition or descriptive information is also stored by the DBMS in the form of a database catalog or dictionary; it is called meta-data.  Constructing the database is the process of storing the data on some storage medium that is controlled by the DBMS.  Manipulating a database includes functions such as querying the database to retrieve specific data, updating the database to reflect changes  Sharing a database allows multiple users and programs to access the database simultaneously  Other important functions provided by the DBMS include protecting the database and maintaining it over a long period of time.  Protection includes system protection against hardware or software malfunction (or crashes) and security protection against unauthorized or malicious access. Database Management Systems (DBMS) Examples of database management systems:  Access  Oracle  Power Builder  Mysql  Sl Server  Sybase Database Systems DB + DBMS → DBS An Example  A UNIVERSITY database for maintaining information concerning students, courses, and grades in a university environment.  The database is organized as five files, each of which stores data records of the same type. 1. The STUDENT file stores data on each student, 2. The COURSE file stores data on each course, 3. the SECTION file stores data on each section of a course, 4. The GRADE_REPORT file stores the grades that students receive in the various sections they have completed, 5. The PREREQUISITE file stores the prerequisites of each course A UNIVERSITY database A UNIVERSITY database (Define DB)  To define this database, we must specify the structure of the records of each file by specifying the different types of data elements to be stored in each record.  each STUDENT record includes data to represent the student’s Name, Student_number, Class (such as freshman or ‘1’, sophomore or ‘2’, and so forth), and Major (such as mathematics or ‘MATH’ and computer science or ‘CS’);  Each COURSE record includes data to represent the Course_name, Course_number, Credit_hours, and Department (the department that offers the course); and so on.  We must also specify a data type for each data element within a record. For example, we can specify that Name of STUDENT is a string of alphabetic characters, Student_number of STUDENT is an integer, and Grade of GRADE_REPORT is a single character from the set {‘A’,‘B’,‘C’,‘D’,‘F’,‘I’}. construct DB  To construct the UNIVERSITY database, we store data to represent each student, course, section, grade report, and prerequisite as a record in the appropriate file.  Notice that records in the various files may be related Database manipulation  Examples of queries are as follows:  Retrieve the transcript—a list of all courses and grades—of ‘Smith’  List the names of students who took the section of the ‘Database’ course offered in fall 2008 and their grades in that section  List the prerequisites of the ‘Database’ course  Examples of updates include the following:  Change the class of ‘Smith’ to sophomore  Create a new section for the ‘Database’ course for this semester  Enter a grade of ‘A’ for ‘Smith’ in the ‘Database’ section of last semester Characteristics of the Database Approach  Self-describing nature of a database system  Insulation between programs and data, and data abstraction  Support of multiple views of the data  Sharing of data and multiuser transaction processing Self-Describing Nature of a Database System  the database system contains the database itself and definition or description of the database structure and constraints(meta-data ).  This definition is stored in the DBMS catalog, which contains information such as the structure of each file, the type and storage format of each data item, and various constraints on the data  In traditional file processing, data definition is typically part of the application programs themselves. Example of DB Catalog Insulation between Programs and Data, and Data Abstraction  In traditional file processing, the structure of data files is embedded in the application programs, so any changes to the structure of a file may require changing all programs that access that file.  In DBMS access programs the structure of data files is stored in the DBMS catalog separately from the access programs. We call this property program-data independence Data abstraction  Data abstraction  the characteristic that allows program-data independence and program-operation independence  Conceptual representation of data  does not include many of the details of how the data is stored or how the operations are implemented.  a data model  is a type of data abstraction that is used to provide this conceptual representation Internal storage format Support of Multiple Views of the Data  A database typically has many users, each of whom may require a different perspective or view of the database.  A view may be a subset of the database or it may contain virtual data that is derived from the database files but is not explicitly stored  For example, one user of the database of Figure 1.2 may be interested only in accessing and printing the transcript of each student; the view for this user is shown in Figure 1.5(a).  A second user, who is interested only in checking that students have taken all the prerequisites of each course for which they register, may require the view shown in Figure 1.5(b) Two views derived from the database Sharing of Data and Multiuser Transaction Processing  A multiuser DBMS, as its name implies, must allow multiple users to access the database at the same time.  This is essential if data for multiple applications is to be integrated and maintained in a single database.  The concept of a transaction has become central to many database applications  A transaction is an executing program or process that includes one or more database accesses, such as reading or updating of database records.  Each transaction is supposed to execute a logically correct database access if executed in its entirety without interference from other transactions.  The isolation property ensures that each transaction appears to execute in isolation from other transactions, even though hundreds of transactions may be executing concurrently.  The atomicity property ensures that either all the database operations in a transaction are executed or none are. Actors on the Scene  Database Administrators  Database Designers  System Analysts and Application Programmers (Software Engineers)  End User Database Administrators  The database administrator (DBA) is responsible for authorizing access to the database,  Coordinating and monitoring its use,  Acquiring software and hardware resources as needed.  The DBA is accountable for problems such as security breaches and poor system response time. Database Designers  Database designers are responsible for identifying the data to be stored in the database and for choosing appropriate structures to represent and store this data.  These tasks are mostly undertaken before the database is actually implemented and populated with data.  It is the responsibility of database designers to communicate with all prospective database users in order to understand their requirements and to create a design that meets these requirements.  Database designers typically interact with each potential group of users and develop views of the database that meet the data and processing requirements of these groups.  Each view is then analyzed and integrated with the views of other user groups. End Users  End users are the people whose jobs require access to the database for querying, updating, and generating reports; the database primarily exists for their use.  There are several categories of end users:  Casual end users occasionally access the database, but they may need different information each time  Naive or parametric end users make up a sizable portion of database end users. Their main job function revolves around constantly querying and updating the database, using standard types of queries and updates—called canned transactions End Users Cont.  Sophisticated end users include engineers, scientists, business analysts, and others who thoroughly familiarize themselves with the facilities of the DBMS in order to implement their own applications to meet their complex requirements.  Standalone users maintain personal databases by using ready-made program packages that provide easy-to-use menu-based or graphics-based interfaces. An example is the user of a tax package that stores a variety of personal financial data for tax purposes. System Analysts and Application Programmers (Software Engineers)  System analysts determine the requirements of end users, especially naive and parametric end users, and develop specifications for standard canned transactions that meet these requirements.  Application programmers implement these specifications as programs; then they test, debug, document, and maintain these canned transactions. Workers behind the Scene  DBMS system designers and implementers  Tool developers design and implement tools  Operators and maintenance personnel (system administration personnel) are responsible for the actual running and maintenance of the hardware and software environment for the database system. Advantages of Using the DBMS Approach  Controlling Redundancy  Restricting Unauthorized Access  Providing Storage Structures and Search Techniques for Efficient Query Processing  Providing Backup and Recovery  Providing Multiple User Interfaces  Representing Complex Relationships among Data

Use Quizgecko on...
Browser
Browser