2005-10-06 - SLIDE 1IS 202 – FALL 2005 Prof. Ray Larson UC Berkeley SIMS SIMS 202: Information Organization and Retrieval Introduction to Database Design.

Slides:



Advertisements
Similar presentations
Entity-Relationship (ER) Modeling
Advertisements

Database Systems: Design, Implementation, and Management Tenth Edition
1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Information Systems Planning and the Database Design Process
9/20/2000Information Organization and Retrieval Database Design: Object- Oriented Modeling, Logical Design and Normalization University of California,
SLIDE 1IS Fall 2002 Database Design: Object- Oriented Modeling University of California, Berkeley School of Information Management and.
SLIDE 1IS Fall 2002 Database Management: Introduction University of California, Berkeley School of Information Management and Systems.
Database Design University of California, Berkeley
SLIDE 1IS 257 – Fall 2006 Database Management: Introduction Ray R. Larson University of California, Berkeley School of Information IS 257:
System Analysis - Data Modeling
9/6/2001Database Management – Fall 2000 – R. Larson Information Systems Planning and the Database Design Process University of California, Berkeley School.
Oct 31, 2000Database Management -- Fall R. Larson Database Management: Introduction to Terms and Concepts University of California, Berkeley School.
SLIDE 1IS 202 – FALL 2002 Prof. Ray Larson & Prof. Marc Davis UC Berkeley SIMS Tuesday and Thursday 10:30 am - 12:00 pm Fall 2002
SLIDE 1IS Fall 2002 Database Design: Conceptual Model and ER Diagramming University of California, Berkeley School of Information Management.
SLIDE 1IS 257 – Fall 2009 Database Design: Logical Models: Normalization and The Relational Model University of California, Berkeley School.
SLIDE 1IS 257 – Fall 2004 Database Design: Logical Model Design & Access DB Creation University of California, Berkeley School of Information.
9/7/1999Information Organization and Retrieval Database Design: Conceptual Model and ER Diagramming University of California, Berkeley School of Information.
11/28/2000Information Organization and Retrieval Introduction to Databases and Database Design University of California, Berkeley School of Information.
SLIDE 1IS 257 – Fall 2005 Database Design: Conceptual and Logical Model Design University of California, Berkeley School of Information Management.
SLIDE 1IS Fall 2010 Information Systems Planning and the Database Design Process Ray R. Larson University of California, Berkeley School.
SLIDE 1IS Fall 2002 Database Life Cycle and Introduction to Access University of California, Berkeley School of Information Management.
8/29/2000Database Management -- Fall R. Larson Database Management: Introduction University of California, Berkeley School of Information Management.
Ch1: File Systems and Databases Hachim Haddouti
SLIDE 1IS 202 – FALL 2003 Prof. Ray Larson & Prof. Marc Davis UC Berkeley SIMS Tuesday and Thursday 10:30 am - 12:00 pm Fall 2003
SLIDE 1IS Fall 2002 Information Systems Planning and the Database Design Process University of California, Berkeley School of Information.
8/28/97Information Organization and Retrieval Intergalactic Courier Service: Database and Application Design University of California, Berkeley School.
8/28/2001Database Management -- Fall R. Larson Database Management: Introduction University of California, Berkeley School of Information Management.
Callie’s Birthday SLIDE 1IS 202 – FALL 2004 Prof. Ray Larson & Prof. Marc Davis UC Berkeley SIMS Tuesday and Thursday 10:30 am - 12:00 pm.
SLIDE 1IS 257 – Fall 2005 Database Life Cycle and Introduction to Access University of California, Berkeley School of Information Management.
SLIDE 1IS 257 – Fall 2010 Database Design: Conceptual Model (cont.) and UML University of California, Berkeley School of Information IS 257:
SLIDE 1IS 257 – Fall 2009 Database Management: Introduction Ray R. Larson University of California, Berkeley School of Information IS 257:
SLIDE 1IS 257 – Spring 2004 Information Systems Planning and the Database Design Process Ray R. Larson University of California, Berkeley.
Chapter 4: Database Management. Databases Before the Use of Computers Data kept in books, ledgers, card files, folders, and file cabinets Long response.
SLIDE 1IS 257 – Spring 2004 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
“DOK 322 DBMS” Y.T. Database Design Hacettepe University Department of Information Management DOK 322: Database Management Systems.
8/28/97Information Organization and Retrieval Files and Databases University of California, Berkeley School of Information Management and Systems SIMS.
1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.
8/28/97Information Organization and Retrieval Database Design University of California, Berkeley School of Information Management and Systems SIMS 202:
SLIDE 1IS 257 – Spring 2004 Database Management: Introduction Ray R. Larson University of California, Berkeley School of Information Management.
SLIDE 1IS Fall 2006 Information Systems Planning and the Database Design Process Ray R. Larson University of California, Berkeley School.
SLIDE 1IS 257 – Spring 2004 Database Design: Normalization and Access DB Creation University of California, Berkeley School of Information.
SLIDE 1IS 257 – Spring 2004 Database Design: Object- Oriented Modeling University of California, Berkeley School of Information Management.
Chapter 4 Database Management Systems. Chapter 4Slide 2 What is a Database Management System (DBMS)?  Database An organized collection of related data.
SLIDE 1I257 – Fall 2014 Database Management: Introduction Ray R. Larson University of California, Berkeley School of Information IS 257: Database.
Information Systems Planning and the Database Design Process
PHASE 3: SYSTEMS DESIGN Chapter 7 Data Design.
Chapter 13 (Online): Object-Oriented Databases
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Module Title? DBMS Introduction to Database Management System.
Web-Enabled Decision Support Systems
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
9/14/2012ISC329 Isabelle Bichindaritz1 Database System Life Cycle.
1 Chapter 15 Methodology Conceptual Databases Design Transparencies Last Updated: April 2011 By M. Arief
Concepts and Terminology Introduction to Database.
© 2007 by Prentice Hall 1 Introduction to databases.
9/7/1999Information Organization and Retrieval Database Design: Object- Oriented Modeling University of California, Berkeley School of Information Management.
1/26/2004TCSS545A Isabelle Bichindaritz1 Database Management Systems Design Methodology.
File Systems and Databases Lecture 1. Files and Databases File: A collection of records or documents dealing with one organization, person, area or subject.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
SLIDE 1IS 202 – FALL 2006 Prof. Ray Larson UC Berkeley SIMS SIMS 202: Information Organization and Retrieval Introduction to Database Design.
An Introduction to Database Systems دانشگاه علم و فناوری مازندران - طراحی و ایجاد بانک های اطلاعاتی 1.
Copyright (c) 2014 Pearson Education, Inc. Introduction to DBMS.
8/31/99Database Management -- Fall R. Larson Database Models and Introduction to Access University of California, Berkeley School of Information.
Database Management: Introduction
Database Design: Conceptual Model (cont.), UML and The Logical Model
Database Management:.
Chapter 1 The Worlds of Database Systems
Database Design Hacettepe University
Presentation transcript:

SLIDE 1IS 202 – FALL 2005 Prof. Ray Larson UC Berkeley SIMS SIMS 202: Information Organization and Retrieval Introduction to Database Design

SLIDE 2IS 202 – FALL 2005 Lecture Overview Databases and Database Design Database Life Cycle Database Design ER Diagrams Discussion

SLIDE 3IS 202 – FALL 2005 Lecture Overview Databases and Database Design Database Life Cycle Database Design ER Diagrams Discussion

SLIDE 4IS 202 – FALL 2005 What is a Database?

SLIDE 5IS 202 – FALL 2005 Files and Databases File: A collection of records or documents dealing with one organization, person, area or subject (Rowley) –Manual (paper) files –Computer files Database: A collection of similar records with relationships between the records (Rowley) –Bibliographic, statistical, business data, images, etc.

SLIDE 6IS 202 – FALL 2005 Database A Database is a collection of stored operational data used by the application systems of some particular enterprise (C.J. Date) –Paper “Databases” Still contain a large portion of the world’s knowledge –File-Based Data Processing Systems Early batch processing of (primarily) business data –Database Management Systems (DBMS)

SLIDE 7IS 202 – FALL 2005 Why DBMS? History –50’s and 60’s all applications were custom built for particular needs –File based –Many similar/duplicative applications dealing with collections of business data –Early DBMS were extensions of programming languages – E.F. Codd and the Relational Model – Ashton-Tate and first Microcomputer DBMS

SLIDE 8IS 202 – FALL 2005 From File Systems to DBMS Problems with file processing systems –Inconsistent data –Inflexibility –Limited data sharing –Poor enforcement of standards –Excessive program maintenance

SLIDE 9IS 202 – FALL 2005 DBMS Benefits Minimal data redundancy Consistency of data Integration of data Sharing of data Ease of application development Uniform security, privacy, and integrity controls Data accessibility and responsiveness Data independence Reduced program maintenance

SLIDE 10IS 202 – FALL 2005 Terms and Concepts Data independence –Physical representation and location of data and the use of that data are separated The application doesn’t need to know how or where the database has stored the data, but just how to ask for it Moving a database from one DBMS to another should not have a material effect on application program Recoding, adding fields, etc. in the database should not affect applications

SLIDE 11IS 202 – FALL 2005 Database Environment CASE Tools DBMS User Interface Application Programs Repository Database

SLIDE 12IS 202 – FALL 2005 Database Components DBMS =============== Design tools Table Creation Form Creation Query Creation Report Creation Procedural language compiler (4GL) ============= Run time Form processor Query processor Report Writer Language Run time User Interface Applications Application Programs Database Database contains: User’s Data Metadata Indexes Application Metadata

SLIDE 13IS 202 – FALL 2005 Types of Database Systems PC databases Centralized database Client/server databases Distributed databases Database models

SLIDE 14IS 202 – FALL 2005 PC Databases E.g.: Access FoxPro Dbase Etc.

SLIDE 15IS 202 – FALL 2005 Centralized Databases Central Computer

SLIDE 16IS 202 – FALL 2005 Client Server Databases Network Client Database Server

SLIDE 17IS 202 – FALL 2005 Distributed Databases computer Location A Location C Location B Homogeneous Databases

SLIDE 18IS 202 – FALL 2005 Distributed Databases Local Network Database Server Client Comm Server Remote Comp. Remote Comp. Heterogeneous Or Federated Databases

SLIDE 19IS 202 – FALL 2005 Terms and Concepts A “database application” is an application program (or set of related programs) that is used to perform a series of database activities: –Create Add new data to the database –Read Read current data from the database –Update Update or modify current database data –Delete Remove current On behalf of database users

SLIDE 20IS 202 – FALL 2005 Terms and Concepts Enterprise –Organization Entity –Person, Place, Thing, Event, Concept... Attributes –Data elements (facts) about some entity –Also sometimes called fields or items or domains Data values –Instances of a particular attribute for a particular entity

SLIDE 21IS 202 – FALL 2005 Terms and Concepts Key –An attribute or set of attributes used to identify or locate records in a file Primary Key –An attribute or set of attributes that uniquely identifies each record in a file

SLIDE 22IS 202 – FALL 2005 Terms and Concepts Models –(1) Levels or views of the Database Conceptual, logical, physical –(2) DBMS types Relational, Hierarchic, Network, Object-Oriented, Object-Relational

SLIDE 23IS 202 – FALL 2005 Models (1) Conceptual Model Logical Model External Model Conceptual requirements Conceptual requirements Conceptual requirements Conceptual requirements Application 1 Application 2Application 3Application 4 Application 2 Application 3 Application 4 External Model External Model External Model Internal Model More later on this…

SLIDE 24IS 202 – FALL 2005 Data Models(2): History Hierarchical Model (1960’s and 1970’s) –Similar to data structures in programming languages Books (id, title) PublisherSubjects Authors (first, last)

SLIDE 25IS 202 – FALL 2005 Data Models(2): History Network Model (1970’s) –Provides for single entries of data and navigational “links” through chains of data. SubjectsBooks Authors Publishers

SLIDE 26IS 202 – FALL 2005 Data Models(2): History Relational Model (1980’s) –Provides a conceptually simple model for data as relations (typically considered “tables”) with all data visible

SLIDE 27IS 202 – FALL 2005 Data Models(2): History Object Oriented Data Model (1990’s) –Encapsulates data and operations as “Objects” Books (id, title) PublisherSubjects Authors (first, last)

SLIDE 28IS 202 – FALL 2005 Data Models(2): History Object-Relational Model (1990’s) –Combines the well-known properties of the Relational Model with such OO features as: User-defined datatypes User-defined functions Inheritance and sub-classing All of the major enterprise DBMS systems are now Object-Relational or incorporate Object-Relational features

SLIDE 29IS 202 – FALL 2005 Lecture Overview Databases and Database Design Database Life Cycle Database Design ER Diagrams Discussion

SLIDE 30IS 202 – FALL 2005 Database System Life Cycle Growth, Change, & Maintenance 6 Operations 5 Integration 4 Design 1 Conversion 3 Physical Creation 2

SLIDE 31IS 202 – FALL 2005 Design (more later) Determination of the needs of the organization –That is: “what are the business rules of this organization”, what information does it use and need? Development of the Conceptual Model of the database –In Database design this is typically done with Entity- Relationship diagramming techniques Construction of a Data Dictionary Development of the Logical Model

SLIDE 32IS 202 – FALL 2005 Physical Creation Development of the Physical Model of the Database –Data formats and types –Determination of indexes, etc. Load a prototype database and test Determine and implement security, privacy and access controls Determine and implement integrity constraints

SLIDE 33IS 202 – FALL 2005 Conversion Convert existing data sets and applications to use the new database –May need programs, conversion utilities to convert old data to new formats

SLIDE 34IS 202 – FALL 2005 Integration Overlaps with Phase 3 Integration of converted applications and new applications into the new database

SLIDE 35IS 202 – FALL 2005 Operations All applications run full-scale Privacy, security, access control must be in place Recovery and Backup procedures must be established and used

SLIDE 36IS 202 – FALL 2005 Growth, Change, and Maintenance Change is a way of life –Applications, data requirements, reports, etc. will all change as new needs and requirements are found –The Database and applications and will need to be modified to meet the needs of changes

SLIDE 37IS 202 – FALL 2005 Another View of the Life Cycle Operations 5 Conversion 3 Physical Creation 2 Growth, Change 6 Integration 4 Design 1

SLIDE 38IS 202 – FALL 2005 Lecture Overview Databases and Database Design Database Life Cycle Database Design ER Diagrams Discussion

SLIDE 39IS 202 – FALL 2005 Database design process Conceptual Model Logical Model External Model Conceptual requirements Conceptual requirements Conceptual requirements Conceptual requirements Application 1 Application 2Application 3Application 4 Application 2 Application 3 Application 4 External Model External Model External Model Internal Model

SLIDE 40IS 202 – FALL 2005 Conceptual Design Conceptual Model –Merge the collective needs of all applications –Determine what Entities are being used Some object about which information is to maintained –What are the Attributes of those entities? Properties or characteristics of the entity What attributes uniquely identify the entity –What are the Relationships between entities How the entities interact with each other?

SLIDE 41IS 202 – FALL 2005 Developing a Conceptual Model Overall view of the database that integrates all the needed information discovered during the requirements analysis Elements of the Conceptual Model are represented by diagrams, Entity-Relationship or ER Diagrams, that show the meanings and relationships of those elements independent of any particular database systems or implementation details Can also be represented using other modeling tools (such as UML)

SLIDE 42IS 202 – FALL 2005 Database Design Process Conceptual Model Logical Model External Model Conceptual requirements Conceptual requirements Conceptual requirements Conceptual requirements Application 1 Application 2Application 3Application 4 Application 2 Application 3 Application 4 External Model External Model External Model Internal Model

SLIDE 43IS 202 – FALL 2005 Logical Design Logical Model –How is each entity and relationship represented in the Data Model of the DBMS Hierarchic? Network? Relational? Object-Oriented?

SLIDE 44IS 202 – FALL 2005 Database Design Process Conceptual Model Logical Model External Model Conceptual requirements Conceptual requirements Conceptual requirements Conceptual requirements Application 1 Application 2Application 3Application 4 Application 2 Application 3 Application 4 External Model External Model External Model Internal Model

SLIDE 45IS 202 – FALL 2005 Physical Design Internal Model –Choices of index file structure –Choices of data storage formats –Choices of disk layout

SLIDE 46IS 202 – FALL 2005 Database Design Process Conceptual Model Logical Model External Model Conceptual requirements Conceptual requirements Conceptual requirements Conceptual requirements Application 1 Application 2Application 3Application 4 Application 2 Application 3 Application 4 External Model External Model External Model Internal Model

SLIDE 47IS 202 – FALL 2005 Database Application Design External Model –User views of the integrated database –Making the old (or updated) applications work with the new database design

SLIDE 48IS 202 – FALL 2005 Lecture Overview Databases and Database Design Database Life Cycle Database Design ER Diagrams Discussion

SLIDE 49IS 202 – FALL 2005 ER Diagrams You have already seen a UML form of one…

SLIDE 50IS 202 – FALL 2005 ER Diagrams Entity-Relationship (ER) diagrams are concerned with the entities involved in the organization/database and the relationships between those entities (as well as the attributes of each entity

SLIDE 51IS 202 – FALL 2005 Entity An Entity is an object in the real world (or even imaginary worlds) about which we want or need to maintain information –Persons (e.g.: customers in a business, employees, authors) –Things (e.g.: purchase orders, meetings, parts, companies) Employee

SLIDE 52IS 202 – FALL 2005 Attributes Attributes are the significant properties or characteristics of an entity that help identify it and provide the information needed to interact with it or use it (this is the Metadata for the entities) Employee Last Middle First Name SSN Age Birthdate Projects

SLIDE 53IS 202 – FALL 2005 Relationships Relationships are the associations between entities They can involve one or more entities and belong to particular relationship types

SLIDE 54IS 202 – FALL 2005 Relationships Class Attends Student Part Supplies project parts Supplier Project

SLIDE 55IS 202 – FALL 2005 Types of Relationships Concerned only with cardinality of relationship Truck Assigned EmployeeProject Assigned EmployeeProject Assigned Employee 11 n n 1 m Chen ER notation

SLIDE 56IS 202 – FALL 2005 Other Notations Truck Assigned EmployeeProject Assigned EmployeeProject Assigned Employee “Crow’s Foot”

SLIDE 57IS 202 – FALL 2005 Other Notations Truck Assigned EmployeeProject Assigned EmployeeProject Assigned Employee IDEFIX Notation

SLIDE 58IS 202 – FALL 2005 More Complex Relationships Project Evaluation Employee Manager 1/n/n 1/1/1 n/n/1 Project Assigned Employee 4(2-10) 1 SSNProjectDate Manages Employee Manages Is Managed By 1 n

SLIDE 59IS 202 – FALL 2005 Weak Entities Owe existence entirely to another entity Order-line Contains Order Invoice # Part# Rep# QuantityInvoice#

SLIDE 60IS 202 – FALL 2005 Supertype and Subtype Entities Clerk Is one of Sales-rep Invoice Other Employee Sold Manages

SLIDE 61IS 202 – FALL 2005 Many to Many Relationships Employee Project Is Assigned Project Assignment Assigned SSN Proj# SSN Proj# Hours

SLIDE 62IS 202 – FALL 2005 UML diagraming ER diagrams are often now expressed using UML instead…

SLIDE 63IS 202 – FALL 2005 UML Class Diagram DIVEORDS Order No Customer No Sale Date Shipvia PaymentMethod CCNumber No of People Depart Date Return Date Destination Vacation Cost CalcTotalInvoice() CalcEquipment() Class Name List of Attributes List of operations

SLIDE 64IS 202 – FALL 2005 Differences from Entities in ER Entities can be represented by Class diagrams But Classes of objects also have additional operations associated with them

SLIDE 65IS 202 – FALL 2005 Operations Three basic types for database –Constructor –Query –Update

SLIDE 66IS 202 – FALL 2005 Associations An association is a relationship that describes a set of links between or among objects. An association can have a name that describes the nature of this relationship. You can put a triangle next to this name to indicate the direction in which the name should be read.

SLIDE 67IS 202 – FALL 2005 Associations An association contains an ordered list of association ends. –An association with exactly two association ends is called a binary association –An association with more than two ends is called an n-ary association.

SLIDE 68IS 202 – FALL 2005 Associations: Unary relationships Person Is-married-to 0..1 Employee manages * 0..1 manager

SLIDE 69IS 202 – FALL 2005 Associations: Binary Relationship Employee Parking Place One-to-one Is-assigned0..1 Product Line Product One-to-many contains1 * StudentCourse Many-to-many Registers-for* *

SLIDE 70IS 202 – FALL 2005 Associations: Ternary Relationships VendorWarehouse * * Supplies Part *

SLIDE 71IS 202 – FALL 2005 Association Classes StudentCourse Registers-for * * Registration ________________ Term Grade ________________ CheckEligibility() Computer Account _________________ acctID Password ServerSpace *0..1 issues

SLIDE 72IS 202 – FALL 2005 Derived Attributes, Associations, and Roles Student _________ name ssn dateOfBirth /age Course Offering ____________ term section time location Registers-for * 1 Course ____________ crseCode crseTitle creditHrs * * Scheduled-for {age = currentDate – dateOfBirth} * * /Takes /participant Derived attribute Derived role Derived association

SLIDE 73IS 202 – FALL 2005 Generalization Employee ____________ empName empNumber address dateHired ____________ printLabel() Hourly Employee _______________ HourlyRate _______________ computeWages() Salaried Employee _______________ Annual Sal stockoption _______________ Contributepension() Consultant _______________ contractNumber billingRate _______________ computeFees()

SLIDE 74IS 202 – FALL 2005 Lecture Overview Databases and Database Design Database Life Cycle ER Diagrams Discussion

SLIDE 75IS 202 – FALL 2005 Discussion Why use DBMS for web-based system development? Why Not use IR systems? Can you use both? Other Questions?

SLIDE 76IS 202 – FALL 2005 Next Time Normalization and the Relational Model