Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Oracle Database wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Concurrency control wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Relational model wikipedia , lookup
ContactPoint wikipedia , lookup
What is a database What is a Database --What is a Database-- 1 Basic Difinitions Miniworld: Some part of the real world about which information is stored. Data: Known facts about the miniworld recorded have an implicit meaning Database (DB): A collection of related data elements Database Management System (DBMS): A software package to facilitate the process of Defining - specifying types, organization (schema) Constructing - loading the data Manipulating - querying the data One DBMS, many DBs, many applications Database system: A database and a DBMS --What is a Database-- 2 A DBMS application program DBMS user database database persistent storage --What is a Database-- 3 Pictorial Representation Users/Programs DATABASE SYSTEM Application Programs/Queries DBMS SOFTWARE Software to Process Queries/Programs Software to Access Stored Data Stored Database Definition (Meta-Data) --What is a Database-- Stored Database 4 Functions of a DBMS Provides persistent, shared storage Objects live beyond program execution Shared by multiple applications DBMS reduces redundancy in Development and maintenance Provides multiple interfaces Query language, embedded query language, APIs, GUIs Protects against Software/hardware failure Security breaches --What is a Database-- 5 When not to use a DBMS Main costs of using a DBMS High initial investment May need additional hardware Overhead Training When a DBMS may be unnecessary Application is simple, well-defined, and not expected to change Stringent real-time requirements (Write) access to data by multiple users is not needed --What is a Database-- 6 Classes of DB users – Workers on the scene Persons whose job involves daily use of a large database. Database administrators (DBAs) Responsible for managing the database system. Database designers End users The people that use the database for querying, updating, generating reports Interactive users: Use full DBMS capabilities directly via a DML. Parametric (or naive) end users: They use pre-programmed canned transactions to interact continuously with the database. For example, bank tellers or reservation clerks. Application programmers Design and implement canned transactions for parametric users. --What is a Database-- 7 DBA Duties Chooses storage structure and access strategy performance-enhancing data structures Acts as liaison with users Security czar Defines authorization checks and validation procedures Responsible for backups and recovery monitoring performance and updates (to schema) --What is a Database-- 8 Database Users – Workers Behind the Scene People who design and develop the DBMS software DBMS designers and implementers Tool developers Design and implement tools that facilitate the use of DBMS software. Tools include design tools, performance tools, special interfaces, etc. Operators and maintenance personnel Run and maintain the hardware and software environment for the database system. --What is a Database-- 9 Interfaces Menu vs. form-based GUI Canned interfaces for parametric users DBA Application Natural language Web search engines Shell --What is a Database-- 10 Input (Using a Form) --What is a Database-- 11 Sample of Input Form for a Lab Work --What is a Database-- 12 Output (Using a Report) Exam result for ID SID Name 1’st 2’nd 3’rd Total 8891 Allen 25% 27% 33% 85% 8767 Jones 20% 25% 0 45% 2365 Watson 13% 0 0 13% 4256 Cabeen 15% 20% 17% 52% --What is a Database-- 13 Sample Output Report for a Lab Work --What is a Database-- 14 Data Models A data model is a data definition language along with a data manipulation language. Conceptual Representational Physical --What is a Database-- 15 Data Models A data definition language (DDL) describes database schemas. Data relationships Data semantics Integrity constraints Database schemas vs. instances Similar to types and variables in programming languages A data manipulation language (DML) is used for querying and updating database instances. --What is a Database-- 16 Schema vs. Instance Schema - Description of how data is organized and constrained. Instance - The data in a database (conforms to a schema). Snapshot - Database state at a particular point in time. Initially empty Database is populated or loaded, DBMS ensures every state is a valid state. Schema evolution vs. data update --What is a Database-- 17 Type of Data Models Record-based conceptual models (1960s) hierarchical model (e.g., IBM IMS) (1970s) network model (e.g., CA-IDMS) (1980s - current) relational model (e.g., Microsoft Access, Microsoft SQL Server, IBM DB2, Oracle8) Object-based conceptual models (late 1980s - current) entity-relationship model §(late 1980s - current) object-oriented model Text-based conceptual models (late 1990s - current) XML --What is a Database-- 18 ANSI Three-Schema Architecture Supports DBMS characteristics of: Program-data independence. Support of multiple views of the data. Defines DBMS schemas at three levels: Physical How data is stored on disk Data storage structures Access paths to the data Logical External --What is a Database-- 19 Schema and Mappings external level First Name Last Name conceptual level physical level Salary StaffID Name Birthdate staff_no fname lname dob branch_no salary Struct STAFF { int staff_no; int branch_no; char fname [15]; char lname [15]; struct date dob; float salary; struct STAFF *next; }; index staff_no; index branch_no; --What is a Database-- 20 Data Independence Each level is “independent” in the sense that a completely different organization can be used. Physical data independence - Physical level can change without having to change the logical level. Logical data independence - Logical level can change without having to change the external level. --What is a Database-- 21 DBMS Achitecture Application Programmers DBA Staff DDL Statements Privileged Commands Casual Users Application Programs Interactive Query Precompiler Parametric Users Host Language Compiler Query Compiler DDL Compiler Query Execution Plan Canned Transactions DML Statements Run-time Evaluator DBMS Transaction and Data Manager Data Dictionary Data Files 22