Overview of Database Management Systems Goals: DBMS basic concepts Introduce underlying managerial issues Prepare for discussion of uses of DBMS, such as OLAP and database mining 1
Overview of Database Management What is a database system? Acomputerized record-keeping system Record? Think of it as a row in a table, consisting of fields of data Note: Role of metaphors System? A general software module that provides all sorts of services: Create new files and add them to the database Insert new data into an existing file Retrieve data from existing files Update (change) data in existing files Delete data in existing files Delete (remove) existing files from the database And much else: system management features, security, integrity, etc. 2
Overview of Database Management Important and fundamental distinctions System software vs application software Logical vs physical» See MIS Notes, chapter 1 System software, e.g., Operating system Language compilers Communications DBMS Idea: everybody needs it, so write it once and standardly for all Reading/writing files (OS) Storing/retrieving records (DBMS) 3
Overview of Database Management Where do database systems come from? Commercial software vendors» Oracle, DB2, RDB, Ingres, Focus, etc. for mainframes» For Unix, Oracle, Ingres, Informix, etc.» Macs: Mainly Oracle» PCs: Access, Paradox, Oracle, etc. Is there more than one kind? Why? Yes: flat file systems, network systems, hierarchical systems, relational systems, object-oriented systems And different brands for each type Why? History, needs and requirements Is there a standard? Yes, 2 really Relational DBMS SQL as the access language» DDL, DML, etc.» Note: Can have SQL w/o relational and relational w/o SQL Note: Access is relational & has SQL access 4
Overview of Database Management Who uses database systems? Everyone, high, middle, and low Pervasive in business and commerce Difficult to overestimate importance Quite possible to earn your way through school doing database work Are databases here to stay? Are they stable? Here to stay? Absolutely! Stable? Yes, but...» Relational DBMS with SQL: commercial de facto standard; client-server uses» Object-oriented DBMS: thought to be the next big thing A few years away Specialized uses SQL will stay---probably 5
More Comments on Database and Information Systems Generallly Important concepts/themes Persistence Why we need data bases Metaphors and computing generally and database specifically Relational model, relational databases:» Tables, tables, tables Indirection e.g. external, conceptual, internal views of database 6
Overview of Database Management Why database? Alternatives are unattractive Positive reasons for DBMSs Data independence Reduction of redundancy Avoidance of inconsistency Enforcement of standards Security Integrity Use of markets 7
Database Architecture These comments apply broadly to all types of DBMSs...but, will focus on SQL, "big guys" systems ANSI/SPARC (broadly accepted) framework Three levels: External Conceptual Internal "Relational" refers to how the data appears to users, so to the external and conceptual levels How it appears (as tables) and How you operate on it Recall: metaphors 8
The External Level The individual user level (application programmer, someone interacting online with the database, or an application, or a user via a nice front end) Users (typically) interact with a DBMS using a language of some sort. e.g., SQL, either embedded in a programming language or interactively e.g., QBE for users Data sublanguage vs host language Data sublanguage: Data definition language (DDL) Data manipulation language (DML) The point of external views: to give different users different views of the data Views: concept, advantages 9
The Conceptual Level A "representation of the entire information content of the database"...from the point of view of the underlying data model (here, relational) Conceptual schema Conceptual schema is to be "pure"; no refernce to the physical 10
The Internal Level Described by the internal schema Refers to details of the physical representation E.g., how records are laid out on a hard drive But NOT to device-specific physical details 11
The Database Administrator Data administrator---makes strategic and policy decisions Database administrator---technical support for implementing policy decisions Defines internal schema Liaison with users Oversees and defines security and integrity checks Manages backup and recovery Performance monitoring, database tuning 12
The Parts-Supplier Database Three tables: S (suppliers), P (parts), SP S S# SNAME STATUS CITY ====================================== S1 Smith 20 London S2 Jones 10 Paris S3 Blake 30 Paris S4 Clark 20 London S5 Adams 30 Athens Table (and relation) Tuple (or record) Field Attribute Domain Data types Data atomicity Key, key field 13
The Parts-Supplier Database (continued) P P# PNAME COLOR WEIGHT CITY ====================================== P1 Nut Red 12 London P2 Bolt Green 17 Paris P3 Screw Blue 17 Rome P4 Screw Red 14 London P5 Cam Blue 12 Paris P6 Cog Red 19 London Ordering on the rows? Does CITY in P mean the same as CITY in S? 17 what? Pounds? Ounces? Tons? Kilograms? Why more than one table? How do we answer queries that rely on data in more than one table? 14
The Parts-Supplier Database (continued) SP S# P# QTY ====================================== S1 P1 300 S1 P2 200 S1 P3 400 S1 P4 200 S1 P5 100 S1 P6 100 S2 P1 300 S2 P2 400 S3 P2 200 S4 P2 200 S4 P4 300 S4 P5 400 S5? S6? Double key, S#-P# Why more than one table? How do we answer queries that rely on data in more than one table? 15