Databases and Database Users Jan. 2008Yangjun Chen ACS Outline: Introduction What is a database? The main characters of a database system The basic database design method The entity-relationship data model for application modeling
Databases and Database Users Jan. 2008Yangjun Chen ACS Types of databases traditional multimedia - pictures, video, sound Scientific database - GIS: maps, weather, satellite images - biological database: DNA sequence analysis warehouse, OLAP - analysis, decision making real-time, active databases - industrial processes deductive databases - combination of inference and databases
Databases and Database Users Jan. 2008Yangjun Chen ACS Types of databases traditional multimedia - pictures, video, sound GIS - maps, weather, satellite images data warehouse, OLAP - analysis, decision making real-time, active databases - industrial processes deductive databases - combination of inference and databases Our focus, but we will examine deductive databases to some degree Read Chapter 1 For next day, read Chapters 2 and 3
Databases and Database Users Jan. 2008Yangjun Chen ACS Database collection of related data represents some aspect of the real world logically coherent collection built with a specific purpose in mind could be anywhere - notebook, spreadsheet, Access, Oracle, … could be manual / could be computerized Data known and recordable facts name, phone number, address, grade,...
Databases and Database Users Jan. 2008Yangjun Chen ACS Database Management System (DBMS) collection of software facilitating the definition, construction and manipulation of databases Definition record structure data elements names data types constraints etc Construction create database files populate the database with records Manipulation querying updating
Databases and Database Users Jan. 2008Yangjun Chen ACS Database Management System (DBMS) collection of software facilitating the definition, construction and manipulation of databases Users/ actors Request manager Storage manager Meta data Stored database DBMS
Databases and Database Users Jan. 2008Yangjun Chen ACS Sample database Student Name StNo Class Major Smith 17 1 CS Brown 8 2 CS Course CName CNo CrHrs Dept Database CS C CS Section SId CNo Semester Yr Instructor Spring 2000 Smith Winter 2000 Smith Spring 2000 Jones Grades StNo Sid Grade A B file1file2 file3 file4
Databases and Database Users Jan. 2008Yangjun Chen ACS Characteristics of the Database approach single repository of data sharable by multiple users concurrency control transaction control self-describing - system catalogue contains meta data program-data independence some changes to the database are transparent to programs/users multiple views of data - to support individual needs of programs/users
Databases and Database Users Jan. 2008Yangjun Chen ACS Database Actors Database Administrator (DBA) -authorizing access to the database -coordinating and monitoring its use -aquiring software and hardware as needed -solving problems such as breach of security or poor system performance Database Designers/Modelers -identifying the data to be stored -choosing appropriate data structure End-users -access to the database: querying, updating, generating reports Software Engineers -developing application programs
Databases and Database Users Jan. 2008Yangjun Chen ACS Advantages of the Database approach (capabilities we would look for in a DBMS) controlled redundancy database design integrates different user data needs performance tuning may lead to replicated data controlled/authorized access to data SQL Grant and Revoke commands enforcing integrity constraints intra-record constraints: e.g. data type, net<gross inter-record constraints: StNo in “Grades” exists as a StNo in “Student” backup and recovery
Databases and Database Users Jan. 2008Yangjun Chen ACS Implications of the Database approach standards enforcement DBA can enforce standard naming conventions, etc reduced application development time adding new functionality to an existing database is “easy” flexibility adding new data and making some types of changes is “easy” up-to-date information - due to sharable characteristic economies of scale - due to sharable resources the whole organization can make one investment
Databases and Database Users Jan. 2008Yangjun Chen ACS When not to use a DBMS overhead costs are too great high initial investment generality overhead of security, concurrency control, recovery, integrity data and applications are simple, well-defined, not expected to change stringent real-time constraints multi-user environment not needed
Databases and Database Users Jan. 2008Yangjun Chen ACS Database design let’s jump ahead to see this ERDs are covered in Chapter 3 Grades Student Delivery 1 N Course Section N M
Databases and Database Users Jan. 2008Yangjun Chen ACS Database design let’s jump ahead to see this ERDs are covered in Chapter 3 Grades Name Major Student StNo Class Delivery Course Section 1 N N M
Databases and Database Users Jan. 2008Yangjun Chen ACS Database design let’s jump ahead to see this ERDs are covered in Chapter 3 Grades Name Major CName CNo Student StNo Class Delivery Course Section CrHrs Dept 1 N N M
Databases and Database Users Jan. 2008Yangjun Chen ACS Database design let’s jump ahead to see this ERDs are covered in Chapter 3 Grades Name Major CName CNo Instructor Semester Year SId Student StNo Class Delivery Course Section CrHrs Dept N 1 NM
Databases and Database Users Jan. 2008Yangjun Chen ACS Database design let’s jump ahead to see this ERDs are covered in Chapter 3 grade Grades Name Major CName CNo Instructor Semester Year SId Student StNo Class Delivery Course Section CrHrs Dept 1 N N M