2009.09.08 - SLIDE 1IS 257 – Fall 2009 Database Design: Conceptual Model (cont.) and UML University of California, Berkeley School of Information IS 257:

Slides:



Advertisements
Similar presentations
Database Design Process
Advertisements

Entity-Relationship (ER) Modeling
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
SLIDE 1IS 257 – Fall 2014 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
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.
Database Design University of California, Berkeley
SLIDE 1IS 257 – Fall 2006 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
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.
SLIDE 1IS Fall 2002 Database Design: Conceptual Model and ER Diagramming University of California, Berkeley School of Information Management.
SLIDE 1IS 257 – Fall 2006 Database Design: Logical Models: Normalization and The Relational Model University of California, Berkeley School.
SLIDE 1IS 257 – Fall 2004 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
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.
SLIDE 1IS 257 – Fall 2010 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
Concepts of Database Management Sixth Edition
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.
SLIDE 1IS Fall 2002 Information Systems Planning and the Database Design Process University of California, Berkeley School of Information.
Database Design: Logical Model and Normalization
SLIDE 1IS 257 – Fall 2008 Database Design: Logical Models: Normalization and The Relational Model University of California, Berkeley School.
SLIDE 1IS 257 – Fall 2005 Database Design: Normalization and The Relational Model University of California, Berkeley School of Information.
SLIDE 1IS 257 – Fall 2006 Database Design: Conceptual Model (cont.) and UML University of California, Berkeley School of Information IS 257:
SLIDE 1IS 202 – FALL 2005 Prof. Ray Larson UC Berkeley SIMS SIMS 202: Information Organization and Retrieval Introduction to Database Design.
SLIDE 1IS 257 – Fall 2005 Database Life Cycle and Introduction to Access University of California, Berkeley School of Information Management.
SLIDE 1IS 257 – Fall 2004 Database Design: Normalization and The Relational Model University of California, Berkeley School of Information.
SLIDE 1IS 257 – Fall 2010 Database Design: Conceptual Model (cont.) and UML 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.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
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.
8/28/97Information Organization and Retrieval Database Design University of California, Berkeley School of Information Management and Systems SIMS 202:
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.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
ZEIT2301 – Database Design Entity-Relationship Diagrams
Chapter 13 (Online): Object-Oriented Databases
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
Concepts of Database Management Seventh Edition
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
9/10/2012ISC 329 Isabelle Bichindaritz1 Entity Relationship (E-R) Modeling.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
R McFadyen Chapter 7 Conceptual Data Modeling.
Database Design Part of the design process is deciding how data will be stored in the system –Conventional files (sequential, indexed,..) –Databases (database.
9/7/1999Information Organization and Retrieval Database Design: Object- Oriented Modeling University of California, Berkeley School of Information Management.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Unit 3 Conceptual Data Modeling. Key Concepts Conceptual data modeling process Classes and objects Attributes Identifiers, candidate keys, and primary.
SLIDE 1IS 257 – Fall 2014 Database Design: Logical Models: Normalization and The Relational Model University of California, Berkeley School.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
1 CSE 2337 Introduction to Data Management Textbook: Chapter 1.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Entity Relationship Modeling
Concepts of Database Management Seventh Edition Chapter 1 Introduction to Database Management.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
8/31/99Database Management -- Fall R. Larson Database Models and Introduction to Access University of California, Berkeley School of Information.
2 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Data Models Why data models are important About the basic data-modeling.
Database Design: Conceptual Model (cont.), UML and The Logical Model
Database Design: Conceptual Model and ER Diagramming
Database Modeling using Entity Relationship Model (E-R Model)
University of California, Berkeley School of Information
Presentation transcript:

SLIDE 1IS 257 – Fall 2009 Database Design: Conceptual Model (cont.) and UML University of California, Berkeley School of Information IS 257: Database Management

SLIDE 2IS 257 – Fall 2009 Lecture Outline Assignment 2 – Personal Database Conceptual Design Review (and continuation) –Database Design, Conceptual Model Object-Oriented Modeling

SLIDE 3IS 257 – Fall 2009 Assignment 2 Due Thursday Sept. 24 Personal Database Project Design The following information should be turned in for the preliminary design of your personal database project. 1.A written description of the data you will be using for the database, and what uses you might expect the database to have. (2-4 pages) 2.A preliminary data dictionary for the entities and attributes and format of the data elements of the database. You should have at least 5 entities with some logical connections between them. The data dictionary consists of all of the attributes that you have identified for each entity, along with indication of whether the attribute is a primary key (or part of a primary key), and what format the data will be (e.g.: text, decimal number, integer, etc.) 3.Produce an entity-relationship diagram of the database OR a UML diagram. These will be preliminary design specifications, so do not feel that you must follow everything that you describe here in the final database design. The report should be printed.

SLIDE 4IS 257 – Fall 2009 Discussion of Projects How many have decided on what they want to do for their project? How many have an idea, but would like to work in a group?

SLIDE 5IS 257 – Fall 2009 Lecture Outline Review (and continuation) –Database Design, Conceptual Model Object-Oriented Modeling in UML

SLIDE 6IS 257 – Fall 2009 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 7IS 257 – Fall 2009 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 – more later)

SLIDE 8IS 257 – Fall 2009 Developing a Conceptual Model Building the Conceptual Model for the Diveshop database

SLIDE 9IS 257 – Fall 2009 Developing a Conceptual Model We will look at a small business -- a diveshop that offers diving adventure vacations Assume that we have done interviews with the business and found out the following information about the forms used and types of information kept in files and used for business operations...

SLIDE 10IS 257 – Fall 2009 Primary Business Operations The shop takes orders from customers for dive vacations. It ships information about the dive vacation to the customers. It rents diving equipment for the divers going on the trips (these may include additional people other than the customer) It bills the customer for the vacation and for equipment rental or sales.

SLIDE 11IS 257 – Fall 2009 Business Operations (cont.) It arranges sub-trips to particular dive sites at the primary location –NOTE: This needs expanding – charter boats, divemasters, local dive companies It provides information about the features of various sites to help customers choose their destinations. –Features include sea life found at the location and shipwrecks

SLIDE 12IS 257 – Fall 2009 Business Operations (cont.) Each dive order (or sale or trip) is on an invoice to one customer. –Invoices contain: Line items for each type of equipment ordered, Total amount due for the invoice, Customer information: –Name, address, phone, credit card info. Note: could be expanded with particular charter dates and time, dive boats, etc. Information must be kept on inventory of dive equipment. There are multiple types of dive equipment: –The prices charged for sale or rental are maintained.

SLIDE 13IS 257 – Fall 2009 Business Operations (cont.) Destination information includes: –Name of the destination –information about the location (accomodations, night life, travel cost, average temperatures for different times of the year Destinations have associated dive sites. Dive Sites have associated features – Sea life –Shipwrecks –Note: could be expanded to include the boats, etc that go to specific sites

SLIDE 14IS 257 – Fall 2009 Business Operations (cont.) One record is kept for each order by a customer and will include the method of payment, total price, and location information. (I.e. Customers may have multiple orders) The company needs to know how an order is to be shipped. The shop has to keep track of what equipment is on-hand and when replacements or additional equipment is needed

SLIDE 15IS 257 – Fall 2009 Entities Customer Dive Order Line item Shipping information Dive Equipment/ Stock/Inventory Dive Locations Dive Sites Sea Life Shipwrecks

SLIDE 16IS 257 – Fall 2009 Diveshop Entities: DIVECUST Name Customer no Street State/ProvCity ZIP/Postal Code Country First Contact Phone DiveCust

SLIDE 17IS 257 – Fall 2009 Diveshop Entities: DIVEORDS Customer No Order no Sale Date Ship Via Destination CCExpDate CCNumber Payment Method DiveOrds No of People Vacation Cost Return Date Depart Date

SLIDE 18IS 257 – Fall 2009 Diveshop Entities: DIVEITEM Item no Order no Rental/ Sale Qty Line Note DiveItem

SLIDE 19IS 257 – Fall 2009 Diveshop Entities: SHIPVIA Ship Via Ship Cost ShipVia

SLIDE 20IS 257 – Fall 2009 Diveshop Entities: DIVESTOK Description Item No Equipment Class Reorder Point On HandCost Sale Price DiveStok Rental Price

SLIDE 21IS 257 – Fall 2009 Diveshop Entities: DEST Destination name Destination no Avg Temp (F) Spring Temp (F) Avg Temp (C) Summer Temp (C) Summer Temp (F) Travel Cost Winter Temp (C) Fall Temp (F) Fall Temp (C) Dest Winter Temp (F) Accommodations Body of Water Night Life Spring Temp (C)

SLIDE 22IS 257 – Fall 2009 Diveshop Entities: SITES Destination no Site no Site Name Site Notes Site Highlight Distance From Town (M) Distance From Town (Km) Skill Level Visibility(ft) Depth (m) Depth (ft) Sites Visibility (m) Current

SLIDE 23IS 257 – Fall 2009 Diveshop Entities: BIOSITE Species No Site No BioSite

SLIDE 24IS 257 – Fall 2009 Diveshop Entities: BIOLIFE Category Species no Common Name Length (cm) Species Name Length (in) Notes external Graphic external BioLife

SLIDE 25IS 257 – Fall 2009 Diveshop Entities: SHIPWRCK Site no Ship Name Category InterestTypeTonnage Length (ft) Beam (m) Beam (ft) Length (m) Shipwrck Cause Comments external Date Sunk Passengers/ Crew Graphic external Survivors Condition

SLIDE 26IS 257 – Fall 2009 Functional areas Ordering Inventory Supplies Shipping Billing Location/Site Selection –We will concentrate on Ordering and Location/Site Selection (these are joined tasks)

SLIDE 27IS 257 – Fall 2009 Ordering Orders (DIVORDS) Customer (DIVECUST) Customers place Orders Each Order needs Customer information

SLIDE 28IS 257 – Fall 2009 Ordering DiveOrds Orders DiveCust Customer No ship ShipVia Order No Ship Via DiveItem Repeating attribute Customer No

SLIDE 29IS 257 – Fall 2009 Ordering Normalization DiveCust Orders Customer No DiveOrds Ship ShipVia Order No Ship Via DiveItem Contains Item No QtyOrder No Customer No Rental/sale

SLIDE 30IS 257 – Fall 2009 Details of DiveItem DiveStok Supplies Supplier Company# Has DiveItem Item No On Hand Sale Price Order No mn We’re ignoring this part...

SLIDE 31IS 257 – Fall 2009 Ordering: Full ER Customer No ShipVia Dest ShipVia DiveStok DiveItem DiveOrds DiveCust Customer No ShipVia Order No Order No Item No Item No Destination Name Destination no n n n n n

SLIDE 32IS 257 – Fall 2009 Location/Site Selection Dest Going to? DiveOrds Destination No Destination Name Destination

SLIDE 33IS 257 – Fall 2009 Destination/ Sites Dest Sites DiveOrds Customer No Order No Destination Name Destination Site No Destination no Destination no 1 1 n n

SLIDE 34IS 257 – Fall 2009 Sites and Sea Life 1 BioLife Sites Site No Destination no Multiple occurrences of sea life...

SLIDE 35IS 257 – Fall 2009 Diveshop ER diagram: BioSite Species No Site No BioSite

SLIDE 36IS 257 – Fall 2009 Sites and Sea Life 2 Sites BioSite BioLife Species No Site No Destination no Species No 1 1 n n

SLIDE 37IS 257 – Fall 2009 Sites and Shipwrecks Sites ShipWrck Site No Destination no Site No 1/n 1

SLIDE 38IS 257 – Fall 2009 DiveShop ER Diagram Customer No ShipVia Dest Sites BioSite ShipVia ShipWrck BioLife DiveStok DiveItem DiveOrds DiveCust Customer No ShipVia Order No Order No Item No Item No Destination Name Destination Species No Site No Destination no Site No Destination no Species No Site No /n 1 1n n n n n n n n 1

SLIDE 39IS 257 – Fall 2009 What must be calculated? Total price for equipment rental? Total price for equipment sale? Total price of an order? –Vacation price –Equipment (rental or sale) –Shipping

SLIDE 40IS 257 – Fall 2009 What is Missing?? Not really an “enterprise-wide” database –No personnel Sales people Dive masters Boat captains and crew payroll –No Local arrangements Dive Boats –Charter bookings? Hotels? –Suppliers/Wholesalers for dive equipment Orders for new/replacement equipment –No history (only current or last order)

SLIDE 41IS 257 – Fall 2009 Querying Access Assignment 1 requires some queries that are not immediately obvious in Access –Such as number 8 must calculate the total cost for rental Pattern matching queries Demo

SLIDE 42IS 257 – Fall 2009 Tools for ER (and UML) diagrams Microsoft Visio has a UML-like set of diagramming templates for databases For Macs OmniGraffle has UML or spreadsheet templates that can be used for ER diagrams More sophisticated (and open source) CASE tools are available such as: –DBDesigner (optimized for MySQL databases) –Toad (freeware version) Many other drawing packages have ERD available (sometimes as add-ons)

SLIDE 43IS 257 – Fall 2009 Lecture Outline Review (and continuation) –Database Design, Conceptual Model Object-Oriented Modeling in UML

SLIDE 44IS 257 – Fall 2009 Object-Oriented Modeling Becoming increasingly important as –Object-Oriented and Object-Relational DBMS continue to proliferate –Databases become more complex and have more complex relationships than are easily captured in ER or EER diagrams (Most UML examples based on McFadden, “Modern Database Management”, 5 th edition)

SLIDE 45IS 257 – Fall 2009 Object Benefits Encapsulate both data and behavior Object-oriented modeling methods can be used for both database design and process design –Real-World applications have more than just the data in the database they also involve the processes, calculations, etc performed on that data to get real tasks done –OOM can be used for more challenging and complex problems

SLIDE 46IS 257 – Fall 2009 Unified Modeling Language (UML) Combined three competing methods Can be used for graphically depicting –Software designs and interaction –Database –Processes

SLIDE 47IS 257 – Fall 2009 CLASS A class is a named description of a set of objects that share the same attributes, operations, relationships, and semantics. –An object is an instance of a class that encapsulates state and behavior. These objects can represent real-world things or conceptual things. –An attribute is a named property of a class that describes a range of values that instances of that class might hold. –An operation is a named specification of a service that can be requested from any of a class's objects to affect behavior in some way or to return a value without affecting behavior

SLIDE 48IS 257 – Fall 2009 UML Relationships An relationship is a connection between or among model elements. The UML defines four basic kinds of relationships: –Association –Dependency –Generalization –Realization

SLIDE 49IS 257 – Fall 2009 UML Diagrams The UML defines nine types of diagrams: –activity diagram –class diagram Describes the data and some behavioral (operations) of a system –collaboration diagram –component diagram –deployment diagram –object diagram –sequence diagram –statechart diagram –use case diagram

SLIDE 50IS 257 – Fall 2009 Class Diagrams A class diagram is a diagram that shows a set of classes, interfaces, and/or collaborations and the relationships among these elements.

SLIDE 51IS 257 – Fall 2009 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 52IS 257 – Fall 2009 Object Diagrams 307:DIVORDS Order No = 307 Customer No = 1480 Sale Date = 9/1/99 Ship Via = UPS PaymentMethod = Visa CCNumber = CCExpDate = 1/1/01 No of People = 2 Depart Date = 11/8/00 Return Date = 11/15/00 Destination = Fiji Vacation Cost = 10000

SLIDE 53IS 257 – Fall 2009 Differences from Entities in ER Entities can be represented by Class diagrams But Classes of objects also have additional operations associated with them

SLIDE 54IS 257 – Fall 2009 Operations Three basic types for database –Constructor –Query –Update

SLIDE 55IS 257 – Fall 2009 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 56IS 257 – Fall 2009 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 57IS 257 – Fall 2009 Associations: Unary relationships Person Is-married-to 0..1 Employee manages * 0..1 manager

SLIDE 58IS 257 – Fall 2009 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 59IS 257 – Fall 2009 Associations: Ternary Relationships VendorWarehouse * * Supplies Part *

SLIDE 60IS 257 – Fall 2009 Association Classes StudentCourse Registers-for * * Registration ________________ Term Grade ________________ CheckEligibility() Computer Account _________________ acctID Password ServerSpace *0..1 issues

SLIDE 61IS 257 – Fall 2009 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 62IS 257 – Fall 2009 Generalization Employee ____________ empName empNumber address dateHired ____________ printLabel() Hourly Employee _______________ HourlyRate _______________ computeWages() Salaried Employee _______________ Annual Sal stockoption _______________ Contributepension() Consultant _______________ contractNumber billingRate _______________ computeFees()

SLIDE 63IS 257 – Fall 2009 Other Diagramming methods SOM (Semantic Object Model) Object Definition Language (ODL) –Not really diagramming Access relationships display Hybrids

SLIDE 64IS 257 – Fall 2009 Application of SOM to Diveshop DIVECUST Address Street City StateProvince ZIPPostalCode Country Phone FirstContact Name DIVEORDS N 1.1

SLIDE 65IS 257 – Fall 2009 DIVEORDS id OrderNo SaleDate SHIPVIA DESTINATION DIVEITEM PaymentMethod CCNumber CCExpDate NoOfPeople DepartDate ReturnDate VacationCost DIVECUST

SLIDE 66IS 257 – Fall 2009 Next Time Logical Model Normalization and the relational model Implementing DBs in Access