Presentation is loading. Please wait.

Presentation is loading. Please wait.

Callie’s Birthday 2004-10-05 - SLIDE 1IS 202 – FALL 2004 Prof. Ray Larson & Prof. Marc Davis UC Berkeley SIMS Tuesday and Thursday 10:30 am - 12:00 pm.

Similar presentations


Presentation on theme: "Callie’s Birthday 2004-10-05 - SLIDE 1IS 202 – FALL 2004 Prof. Ray Larson & Prof. Marc Davis UC Berkeley SIMS Tuesday and Thursday 10:30 am - 12:00 pm."— Presentation transcript:

1 Callie’s Birthday 2004-10-05 - SLIDE 1IS 202 – FALL 2004 Prof. Ray Larson & Prof. Marc Davis UC Berkeley SIMS Tuesday and Thursday 10:30 am - 12:00 pm Fall 2004 http://www.sims.berkeley.edu/academics/courses/is202/f04/ SIMS 202: Information Organization and Retrieval Lecture 11: Intro to Database Design

2 Callie’s Birthday 2004-10-05 - SLIDE 2IS 202 – FALL 2004 Lecture Overview Review –Evaluation exercise Databases and Database Design Database Life Cycle ER Diagrams Discussion Next Time/Readings

3 Callie’s Birthday 2004-10-05 - SLIDE 3IS 202 – FALL 2004 Lecture Overview Review –Evaluation exercise Databases and Database Design Database Life Cycle ER Diagrams Discussion Next Time/Readings

4 Callie’s Birthday 2004-10-05 - SLIDE 4IS 202 – FALL 2004 What is a Database?

5 Callie’s Birthday 2004-10-05 - SLIDE 5IS 202 – FALL 2004 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.

6 Callie’s Birthday 2004-10-05 - SLIDE 6IS 202 – FALL 2004 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)

7 Callie’s Birthday 2004-10-05 - SLIDE 7IS 202 – FALL 2004 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 –1970 - E.F. Codd and the Relational Model –1979 - Ashton-Tate and first Microcomputer DBMS

8 Callie’s Birthday 2004-10-05 - SLIDE 8IS 202 – FALL 2004 File Based Systems Naughty Nice Just what asked for Coal Estimation Delivery List Application File Toys Addresses Toys

9 Callie’s Birthday 2004-10-05 - SLIDE 9IS 202 – FALL 2004 From File Systems to DBMS Problems with file processing systems –Inconsistent data –Inflexibility –Limited data sharing –Poor enforcement of standards –Excessive program maintenance

10 Callie’s Birthday 2004-10-05 - SLIDE 10IS 202 – FALL 2004 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

11 Callie’s Birthday 2004-10-05 - SLIDE 11IS 202 – FALL 2004 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

12 Callie’s Birthday 2004-10-05 - SLIDE 12IS 202 – FALL 2004 Database Environment CASE Tools DBMS User Interface Application Programs Repository Database

13 Callie’s Birthday 2004-10-05 - SLIDE 13IS 202 – FALL 2004 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

14 Callie’s Birthday 2004-10-05 - SLIDE 14IS 202 – FALL 2004 Types of Database Systems PC databases Centralized database Client/server databases Distributed databases Database models

15 Callie’s Birthday 2004-10-05 - SLIDE 15IS 202 – FALL 2004 PC Databases E.g.: Access FoxPro Dbase Etc.

16 Callie’s Birthday 2004-10-05 - SLIDE 16IS 202 – FALL 2004 Centralized Databases Central Computer

17 Callie’s Birthday 2004-10-05 - SLIDE 17IS 202 – FALL 2004 Client Server Databases Network Client Database Server

18 Callie’s Birthday 2004-10-05 - SLIDE 18IS 202 – FALL 2004 Distributed Databases computer Location A Location C Location B Homogeneous Databases

19 Callie’s Birthday 2004-10-05 - SLIDE 19IS 202 – FALL 2004 Distributed Databases Local Network Database Server Client Comm Server Remote Comp. Remote Comp. Heterogeneous Or Federated Databases

20 Callie’s Birthday 2004-10-05 - SLIDE 20IS 202 – FALL 2004 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

21 Callie’s Birthday 2004-10-05 - SLIDE 21IS 202 – FALL 2004 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

22 Callie’s Birthday 2004-10-05 - SLIDE 22IS 202 – FALL 2004 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

23 Callie’s Birthday 2004-10-05 - SLIDE 23IS 202 – FALL 2004 Terms and Concepts Models –(1) Levels or views of the Database Conceptual, logical, physical –(2) DBMS types Relational, Hierarchic, Network, Object-Oriented, Object-Relational

24 Callie’s Birthday 2004-10-05 - SLIDE 24IS 202 – FALL 2004 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…

25 Callie’s Birthday 2004-10-05 - SLIDE 25IS 202 – FALL 2004 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)

26 Callie’s Birthday 2004-10-05 - SLIDE 26IS 202 – FALL 2004 Data Models(2): History Network Model (1970’s) –Provides for single entries of data and navigational “links” through chains of data. SubjectsBooks Authors Publishers

27 Callie’s Birthday 2004-10-05 - SLIDE 27IS 202 – FALL 2004 Data Models(2): History Relational Model (1980’s) –Provides a conceptually simple model for data as relations (typically considered “tables”) with all data visible

28 Callie’s Birthday 2004-10-05 - SLIDE 28IS 202 – FALL 2004 Data Models(2): History Object Oriented Data Model (1990’s) –Encapsulates data and operations as “Objects” Books (id, title) PublisherSubjects Authors (first, last)

29 Callie’s Birthday 2004-10-05 - SLIDE 29IS 202 – FALL 2004 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

30 Callie’s Birthday 2004-10-05 - SLIDE 30IS 202 – FALL 2004 Lecture Overview Review –MediaStreams Databases and Database Design Database Life Cycle ER Diagrams Discussion Next Time/Readings

31 Callie’s Birthday 2004-10-05 - SLIDE 31IS 202 – FALL 2004 Database System Life Cycle Growth, Change, & Maintenance 6 Operations 5 Integration 4 Design 1 Conversion 3 Physical Creation 2

32 Callie’s Birthday 2004-10-05 - SLIDE 32IS 202 – FALL 2004 Design Determination of the needs of the organization Development of the Conceptual Model of the database –Typically using Entity-Relationship diagramming techniques Construction of a Data Dictionary Development of the Logical Model

33 Callie’s Birthday 2004-10-05 - SLIDE 33IS 202 – FALL 2004 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

34 Callie’s Birthday 2004-10-05 - SLIDE 34IS 202 – FALL 2004 Conversion Convert existing data sets and applications to use the new database –May need programs, conversion utilities to convert old data to new formats

35 Callie’s Birthday 2004-10-05 - SLIDE 35IS 202 – FALL 2004 Integration Overlaps with Phase 3 Integration of converted applications and new applications into the new database

36 Callie’s Birthday 2004-10-05 - SLIDE 36IS 202 – FALL 2004 Operations All applications run full-scale Privacy, security, access control must be in place Recovery and Backup procedures must be established and used

37 Callie’s Birthday 2004-10-05 - SLIDE 37IS 202 – FALL 2004 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

38 Callie’s Birthday 2004-10-05 - SLIDE 38IS 202 – FALL 2004 Another View of the Life Cycle Operations 5 Conversion 3 Physical Creation 2 Growth, Change 6 Integration 4 Design 1

39 Callie’s Birthday 2004-10-05 - SLIDE 39IS 202 – FALL 2004 Lecture Overview Review –MediaStreams Databases and Database Design Database Life Cycle ER Diagrams Discussion Next Time/Readings

40 Callie’s Birthday 2004-10-05 - SLIDE 40IS 202 – FALL 2004 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

41 Callie’s Birthday 2004-10-05 - SLIDE 41IS 202 – FALL 2004 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

42 Callie’s Birthday 2004-10-05 - SLIDE 42IS 202 – FALL 2004 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

43 Callie’s Birthday 2004-10-05 - SLIDE 43IS 202 – FALL 2004 Relationships Relationships are the associations between entities They can involve one or more entities and belong to particular relationship types

44 Callie’s Birthday 2004-10-05 - SLIDE 44IS 202 – FALL 2004 Relationships Class Attends Student Part Supplies project parts Supplier Project

45 Callie’s Birthday 2004-10-05 - SLIDE 45IS 202 – FALL 2004 Types of Relationships Concerned only with cardinality of relationship Truck Assigned EmployeeProject Assigned EmployeeProject Assigned Employee 11 n n 1 m Chen ER notation

46 Callie’s Birthday 2004-10-05 - SLIDE 46IS 202 – FALL 2004 Other Notations Truck Assigned EmployeeProject Assigned EmployeeProject Assigned Employee “Crow’s Foot”

47 Callie’s Birthday 2004-10-05 - SLIDE 47IS 202 – FALL 2004 Other Notations Truck Assigned EmployeeProject Assigned EmployeeProject Assigned Employee IDEFIX Notation

48 Callie’s Birthday 2004-10-05 - SLIDE 48IS 202 – FALL 2004 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

49 Callie’s Birthday 2004-10-05 - SLIDE 49IS 202 – FALL 2004 Weak Entities Owe existence entirely to another entity Order-line Contains Order Invoice # Part# Rep# QuantityInvoice#

50 Callie’s Birthday 2004-10-05 - SLIDE 50IS 202 – FALL 2004 Supertype and Subtype Entities Clerk Is one of Sales-rep Invoice Other Employee Sold Manages

51 Callie’s Birthday 2004-10-05 - SLIDE 51IS 202 – FALL 2004 Many to Many Relationships Employee Project Is Assigned Project Assignment Assigned SSN Proj# SSN Proj# Hours

52 Callie’s Birthday 2004-10-05 - SLIDE 52IS 202 – FALL 2004 Lecture Overview Review –MediaStreams Databases and Database Design Database Life Cycle ER Diagrams Discussion Next Time/Readings

53 Callie’s Birthday 2004-10-05 - SLIDE 53IS 202 – FALL 2004 Discussion Why use DBMS for web-based system development? Why Not use IR systems? Can you use both? Other Questions?

54 Callie’s Birthday 2004-10-05 - SLIDE 54IS 202 – FALL 2004 Lecture Overview Review –MediaStreams Databases and Database Design Database Life Cycle ER Diagrams Database Design Discussion Next Time/Readings

55 Callie’s Birthday 2004-10-05 - SLIDE 55IS 202 – FALL 2004 Next Time Database Design – Normalization and SQL Readings –Hoffer/McFadden “Logical database Design and the Relational Model”


Download ppt "Callie’s Birthday 2004-10-05 - SLIDE 1IS 202 – FALL 2004 Prof. Ray Larson & Prof. Marc Davis UC Berkeley SIMS Tuesday and Thursday 10:30 am - 12:00 pm."

Similar presentations


Ads by Google