The Database Environment and Development Process An Overview 1 Outline Basic concepts and definitions Benefits of Database Management Systems (DBMS) A brief look at the Relational DBMS Types of Database Applications Database Development Process 2 Figure 1-1b Summarized data 3 Data 4 Basic Concepts and Definitions Database An organized collection of logically related data a list of clients, or customer orders organized in a way that enables fast and efficient storage, access and manipulation Data Facts that can be recorded and stored using computer media traditionally this included text and numbers modern usage now includes objects such as sounds, images, and video clips 5 Outline Basic concepts and definitions Benefits of Database Management Systems (DBMS) A brief look at the Relational DBMS Database Development Process 6 Traditional File Processing Date back to before we had databases Still in use today, including backup of database systems 7 Architecture without DBMS 8 Disadvantages of File Processing Program-Data Dependence All programs maintain metadata for each file they use Data Redundancy (Duplication of data) Different systems/programs have separate copies of the same data Limited Data Sharing No centralized control of data Lengthy Development Times Programmers must design their own file formats Excessive Program Maintenance 80% of of information systems budget 9 Database Management System Payroll System Invoicing System Order Filing System DBMS Database containing centralized shared data DBMS manages data resources like an operating system manages hardware resources 10 Solution: The DATABASE Approach Central repository of shared data Data is managed by a controlling agent (DBMS) Stored in a standardized, convenient form Requires a Database Management System (DBMS) 11 Database Management Systems (DBMS) DBMS: General-purpose software system which permits data to be stored non-redundantly and facilitates the processes of defining, creating, using and maintaining databases Database and Repository: Includes data and metadata that describes the database data - the actual values of interest metadata - descriptions of the characteristics of the stored data Data and metadata are stored in one place, outside of the application program (decoupled from the code). 12 Advantages of Database Approach Program-Data Independence Metadata stored in DBMS, so applications don’t need to worry about data formats Data queries/updates managed by DBMS so programs don’t need to process data access routines Results in: increased application development and maintenance productivity Minimal Data Redundancy Leads to increased data integrity/consistency 13 Advantages of Database Approach Improved Data Sharing Different users get different views of the data Enforcement of Standards All data access is done in the same way Improved Data Quality Constraints, data validation rules Better Data Accessibility/ Responsiveness Use of standard data query language (SQL) Security, Backup/Recovery, Concurrency Disaster recovery is easier 14 Costs and Risks of the Database Approach Up-front costs: Installation Management Cost and Complexity Conversion Costs Ongoing Costs Requires New, Specialized Personnel Need for Explicit Backup and Recovery Organizational Conflict Old habits die hard 15 Evolution of DB Systems 16 Outline Basic concepts and definitions Benefits of Database Management Systems (DBMS) A brief look at the Relational DBMS Database Development Process 17 Relational Databases Organize Data in Tables Field 1 Field 2 Field 3 Record 1 Record 2 Record 3 column represents a Field (a.k.a attribute, characteristic) • Each •Each row represents a Record (a.k.a instance, tuple) •Database typically includes a set of tables 18 Example: data in relational form Name ID Major GPA 19 Practice problem Design a database to record information about students and their advisors. The following rules apply. Each student is assigned a unique ID and a single advisor. Database needs to keep track of students and advisors in a given semester. The database should allow the student to look up their advisor’s name and email. The same database should allow the advisors to find out if they have advisees, who their advisees are and what their major is. 20 Use this space for your solution 21 May seem simple, but… Example: poorly designed database. The purpose of this table is to keep track of students, their majors per semester, advisors and their email addresses. Semester ST_ID ST_FIRST ST_LAST ST_MAJOR ADV_FIRST ADV_LAST ADV_EMAIL ADV_ID F-09 001 Adam Gopnik Literature William Shakespeare ws@lu.ac.uk 352 F-09 035 Sandra Smith Literature James Joyce jj@dbl.edu 465 S-10 735 Barbara Richards Astronomy Galileo Galilei gg@pdv.it 773 S-10 136 Preston Jones Astronomy Galileo Galilei gg@pdv.it 773 S-10 035 Sandra Smith Math Carl Gauss kg@lu.ac.de 554 Consider what would happen when the table has to be updated to reflect the following events: 1.Sandra Smith graduates. 2.Galilei’s email has changed 3.A new professor is hired and has to be assigned an ID that must be recorded, but has not yet been assigned any students to advise. 22 The Database Design Process Enterprise modeling Specifies scope and general content Conceptual modeling Entity-Relationship Diagrams (ERDs) Logical Design Translate the conceptual model into files, tables, or objects (depending on type of DBMS) Physical Design Lay out the actual DBMS architecture 23 Figure 1-3 Conceptual data model (ERD) 24 Figure 1-4 Order, Order_Line, Customer, and Product tables Relationships established in special columns (or tables) that provide links between tables representing the entities. 25 Data Tables (Relations) 26 Relationships 27 The Range of Database Applications Personal Database – standalone desktop database Workgroup Database – local area network (<25 users) Department Database – local area network (25-100 users) Enterprise Database – wide-area network (hundreds or thousands of users) 28 Outline Basic concepts and definitions Benefits of Database Management Systems (DBMS) A brief look at the Relational DBMS Database Development Process 29 Human Resources Needed Systems Analysts Database Analysts/Designers Data/Database Administrators Programmers 30 Enterprise Data Model A model which includes: overall range of organizational databases general contents of organizational databases Built as part of IS planning for the organization and not the design of a particular database One part of an organization’s overall information systems architecture (ISA) 31 Data Entity Types Business Function (users) Business Planning Product Development Materials Management Order Fulfillment Order Shipment Sales Summarization Production Operations Finance and Accounting Customer Product Raw Material Order Work Center Work Order Invoice Equipment Employee Example business function-to-data entity matrix (fig. 2.3) X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X 32 Conceptual Database Modeling Determine user requirements Determine business rules Build conceptual data model outcome is an entity-relationship diagram or similar communication tool Enterprise Modeling Conceptual Data Modeling Logical DB Design Physical DB Design/Creation DB Implementation DB Maintenance 33 Logical Database Design Select logical database model Map Entity-Relationship Diagrams Normalize data structures Specify business rules Enterprise Modeling Conceptual Data Modeling Logical DB Design Physical DB Design/Creation DB Implementation DB Maintenance 34 Physical Database Design Select DBMS Select storage devices Determine access methods Design files and indexes Determine database distribution Specify update strategies Enterprise Modeling Conceptual Data Modeling Logical DB Design Physical DB Design/Creation DB Implementation DB Maintenance 35