Review for Exam 1 CS474 (Norton) What is a Database? Properties of a database Stores data to derive information Data in a database is, in general: Integrated Shared Persistent Uses of Databases The Integrated Database Environment Database Database Management System (DBMS) Users Applications Characteristics of a Database Management System (DBMS) Contains both data and a complete description of the database Multipurpose Data independence Supports multiple perspectives of the data. Functions of a Database Management System (DBMS) 1. Control data redundancy 2. Avoid data inconsistencies 3. Enforce security constraints 4. Enforce integrity constraints (also called business rules) 5. Allow for different ways of interaction with the user 6. Enforce the enterprise standards as defined by the DBA. People in Integrated Database Environment End users Applications programmers Data administrator (DA) Database Administrator (DBA) Classifications of Database Management Systems Data Model Heirarchical Network Relational Object-Oriented Number of Users Single-user or standalone (only one user at a time) Multi-user (one or more users)
Number of sites over which the database is distributed Centralized Distributed Homogeneous (same DBMS at every site). Heterogeneous (different DBMS at every site). Client/Server Parts of a Database & Database Tools Important Terms & Concepts (at least to begin with) Data Models What do they do? Why are they useful? Types (in general): High-Level Data Model Low-Level Data Model Implementation (Representational) Data Model Schemas and Instances Schema the description of the entire database. Instance the data stored in a database at a particular point in time The Three-Schema Architecture provides a framework for describing database concepts Conceptual Schema the user's perception of data. Internal Level the closest the physical storage. External Level Includes a number of external schemas (user views) of the data. Data Independence Types: Logical Data Independence Physical Data Independence Tables and Views and Indexes Data are stored in Tables/Relations (rows/tuples, columns/attributes) A View is a Virtual Table that results from a SQL query. Each table has one or more Indexes. Data Languages Data Definition Language (DDL) Data Manipulation Language (DML) Structured Query Language (SQL) Types of Data Models (specific) Entity-Relationship Model Relational Model Object-oriented Model Object-relational model Semi-structured Model 2
Parts of a DBMS & Tools for DB Design & Implementation Data, Information, & Knowledge Philosophical View Aristotle Kant Peirce Systems Theoretical & Education Ackoff Bloom Computer Science Database Knowledge Representation (AI) Database History 1. Before computers... 2. Proprietary File Managers (1950's - early 1970s) 3. Navigational DBMSs (1960s - today) 3 Major Forms A. Network (Bachman) B. Hierarchical (IBM) C. Object Oriented & XML DBMSs Advantages & Disadvantages 4. Relational DBMSs (1970s today) - Codd Early Systems Mathematical Basis of Difference from Navigational 5. Newcomers (old wine in new bottles: 1990s - today) Object-Oriented & Object-Relational DBMSs XML DBMSs The E-R Model (Chen) Purpose of Elements of (Chen, Crows Feet, and UML Models) How each element is represented... Entities Types & Instances & Sets Extension vs. Intension Properties of Attributes Properties of Domains of Required/Optional Null values 3
Keys Superkey Candidate Key Primary Key Alternate Key Secondary Key Composite Key Foreign Key Relationships Types & Sets Degree or Cardinality (1:1, 1:M, M:N) Optionality (must/may) Existence Dependency Weak and Strong Entities Crows Feet Conventions & Layout rules Positioning Text Naming & Layout (w/ respect to relationships) Case for Entities/Attributes Oracle Layout Rules Which way do crows fly? Benefits of... Advantages/disadvantages of Chen diagrams for E/R modeling Advantages/disadvantages of Crows Feet diagrams for E/R modeling Advantages/disadvantages of UML diagrams for E/R modeling How to get entities, etc. from a narrative The Relational Model Developed by whom & when? Attributes of Nature of... Tables/relations only Relations expressed mathematically based on matching attributes (attributes in the same domain). Can generate new tables from old (closure property) Properties of tables cell contains one and only one value columns have distinct names values in a column come from the same domain each row/tuple is distinct (no duplicates) order of rows/tuples immaterial order of columns/attributes immaterial Based on mathematical definition of relations Any subset of the Cartesian product of 2 sets Differences between mathematical and database notions of relation 4
Properties of Relations Degree Cardinality Keys (same as before) Integrity Constraints Domain constraints Entity Integrity (no null values in keys) Referential Integrity Representing Relational Schema Tables Attributes Keys Foreign Keys Relational Data Manipulation Languages Procedural Relational Algebra SQL (to some extent) Non-procedural Relational Calculus SQL (to some extent) Other QBE 4GL Natural Language (5GL) Relational Algebra Know all of the symbols!!! Primitive Operations Basic Unary Operations SELECT PROJECTION RENAME Binary Set Operations UNION (OR) DIFFERENCE PRODUCT 5
Derived Operations INTERSECTION (AND) short for A (A - B) JOIN short for SELECT from (A x B) Inner Joins Equijoin Natural Join Outer Joins Left Outer Join Right Outer Join Full Outer Join DIVIDE Just know that it belongs here 6