Introduction Database Collection of related data • Known facts that can be recorded and that have implicit meaning Implicit properties: • Represents some aspect of the real world: Miniworld or universe of discourse (UoD) • Logically coherent collection of data with inherent meaning • Built for a specific purpose
Database management system (DBMS) Database management system (DBMS): Collection of programs Enables users to create and maintain a database; Defining a database: Specify the data types, structures, and constraints of the data to be stored • Meta-data: Database definition or descriptive information; Stored by the DBMS in the form of a database catalog or dictionary Constructing: storing the data on some storage medium Manipulating a database • Query and update the database miniworld • Generate reports Sharing a database • Allow multiple users and programs to access the database simultaneously Application program: Accesses database by sending queries to DBMS • Query: Causes some data to be retrieved • Transaction: May cause some data to be read and some data to be written into the database Protection includes: • System protection: against hardware or software malfunction • Security protection: against unauthorized or malicious access Maintain the database system • Allow the system to evolve as requirements change over time
An Example (cont'd.) Phases for designing a database: Requirements specification and analysis Conceptual design Logical design Physical design
Characteristics of the Database Approach File vs. database Traditional file processing • Each user defines and implements the files needed for a specific software application –duplicate efforts • Waste storage space and in redundant efforts to maintain common up to date data • Data may become inconsistent Database approach: Single repository maintains data that is defined once and then accessed by various users
Actors on the Scene Database administrators (DBA) are responsible for: Authorizing access to the database Coordinating and monitoring its use Acquiring software and hardware resources Database designers are responsible for: Identifying the data to be stored Choosing appropriate structures to represent and store this data System analysts: Determine requirements of end users, and develop specifications fro standard canned transactions that meet these requirements. Application programmers: Implement these specifications as programs. End users: People whose jobs require access to the database Casual end users Naive or parametric end users • Reservation agents; bank teller Sophisticated end users Standalone users
Advantages of Using the DBMS Approach (cont'd.) Providing storage structures and search techniques for efficient query processing Indexes Buffering and caching Query processing and optimization Providing backup and recovery Backup and recovery subsystem of the DBMS is responsible for recovery Providing multiple user interfaces Graphical user interfaces (GUIs) Representing complex relationships among data May include numerous varieties of data that are interrelated in many ways
Advantages of Using the DBMS Approach (cont'd.) Enforcing integrity constraints Referential integrity constraint • Every section record must be related to a course record Key or uniqueness constraint • Every course record must have a unique value for Course_number Business rules Inherent rules of the data model
Advantages of Using the DBMS Approach (cont'd.) Permitting inferencing and actions using rules Deductive database systems • Provide capabilities for defining deduction rules • Inference new information from the stored database facts Trigger: a form of a rule activated by updates to the table, which results in performing additional operations to some other tables. Stored procedures • More involved procedures to enforce rules • Active database system: provide active rules that can automatically initiate actions when certain events and condition occur
Advantages of Using the DBMS Approach (cont'd.) Additional implications of using the database approach Potential for enforcing standards Reduced application development time Flexibility Availability of up-to-date information Economies of scale
A Brief History of Database Applications Early database applications using hierarchical and network systems Large numbers of records of similar structure Providing data abstraction and application flexibility with relational databases Separates physical storage of data from its conceptual representation Provides a mathematical foundation for data representation and querying