2004.09.20 - SLIDE 1IS 257 – Fall 2004 Database Design: Logical Model Design & Access DB Creation University of California, Berkeley School of Information.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

Lecture-7/ T. Nouf Almujally
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.
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.
Database Design (Data Modeling) DCO11310 Database Systems and Design By Rose Chang.
SLIDE 1IS 257 – Fall 2009 Database Design: Logical Models: Normalization and The Relational Model University of California, Berkeley School.
9/7/1999Information Organization and Retrieval Database Design: Conceptual Model and ER Diagramming University of California, Berkeley School of Information.
File Systems and Databases
Chapter 14 (Web): Object-Oriented Data Modeling
SLIDE 1IS 257 – Fall 2010 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
SLIDE 1IS 257 – Fall 2009 Database Design: Conceptual Model (cont.) and UML University of California, Berkeley School of Information IS 257:
SLIDE 1IS 257 – Fall 2005 Database Design: Conceptual and Logical Model Design University of California, Berkeley School of Information Management.
SLIDE 1IS Fall 2002 Database Life Cycle and Introduction to Access University of California, Berkeley School of Information Management.
Geographic Information Systems
Ch1: File Systems and Databases Hachim Haddouti
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.
8/28/97Information Organization and Retrieval Database Design: Normalization University of California, Berkeley School of Information Management and Systems.
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.
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.
Chapter 14: Object-Oriented Data Modeling
IST Databases and DBMSs Todd S. Bacastow January 2005.
Data Modeling Using the Entity-Relationship Model
2 1 Chapter 2 Data Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Chapter 13 (Online): Object-Oriented Databases
Web-Enabled Decision Support Systems
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Database Systems: Design, Implementation, and Management Ninth Edition
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
9/7/1999Information Organization and Retrieval Database Design: Object- Oriented Modeling University of California, Berkeley School of Information Management.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Unit 3 Conceptual Data Modeling. Key Concepts Conceptual data modeling process Classes and objects Attributes Identifiers, candidate keys, and primary.
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
SLIDE 1IS 257 – Fall 2014 Database Design: Logical Models: Normalization and The Relational Model University of California, Berkeley School.
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Entity Relationship Modeling
Copyright (c) 2014 Pearson Education, Inc. Introduction to DBMS.
1 Geog 357: Data models and DBMS. Geographic Decision Making.
8/31/99Database Management -- Fall R. Larson Database Models and Introduction to Access University of California, Berkeley School of Information.
The Relational Model Lecture #2 Monday 21 st October 2001.
Data Resource Management Lecture 8. Traditional File Processing Data are organized, stored, and processed in independent files of data records In traditional.
Database Design: Conceptual Model (cont.), UML and The Logical Model
Database Design: Conceptual Model and ER Diagramming
Normalization Normalization theory is based on the observation that relations with certain properties are more effective in inserting, updating and deleting.
University of California, Berkeley School of Information
Presentation transcript:

SLIDE 1IS 257 – Fall 2004 Database Design: Logical Model Design & Access DB Creation University of California, Berkeley School of Information Management and Systems SIMS 257: Database Management

SLIDE 2IS 257 – Fall 2004 Lecture Outline Review –Database Design, Conceptual Model –Object-Oriented Modeling Logical Design for the Diveshop database Access Database Creation

SLIDE 3IS 257 – Fall 2004 Lecture Outline Review –Database Design, Conceptual Model –Object-Oriented Modeling Logical Design for the Diveshop database Access Database Creation

SLIDE 4IS 257 – 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

SLIDE 5IS 257 – Fall 2004 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 6IS 257 – Fall 2004 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 7IS 257 – Fall 2004 Entities Customer Dive Order Line item Shipping information Dive Equipment Stock/Inventory Dive Locations Dive Sites Sea Life Shipwrecks

SLIDE 8IS 257 – Fall 2004 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 9IS 257 – Fall 2004 What is Missing?? Not really an “enterprise-wide” database –No personnel Sales people Dive masters Boat captains and crew payroll –Local arrangements Dive Boats Hotels –Suppliers/Wholesalers for dive equipment Orders for new/replacement equipment –No history (only current or last order)

SLIDE 10IS 257 – Fall 2004 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 11IS 257 – Fall 2004 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 12IS 257 – Fall 2004 Unified Modeling Language (UML) Combined three competing methods Can be used for graphically depicting –Software designs and interaction –Database –Processes

SLIDE 13IS 257 – Fall 2004 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 14IS 257 – Fall 2004 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 15IS 257 – Fall 2004 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 16IS 257 – Fall 2004 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 17IS 257 – Fall 2004 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 18IS 257 – Fall 2004 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 19IS 257 – Fall 2004 Differences from Entities in ER Entities can be represented by Class diagrams But Classes of objects also have additional operations associated with them

SLIDE 20IS 257 – Fall 2004 Operations Three basic types for database –Constructor –Query –Update

SLIDE 21IS 257 – Fall 2004 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 22IS 257 – Fall 2004 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 23IS 257 – Fall 2004 Associations: Unary relationships Person Is-married-to 0..1 Employee manages * 0..1 manager

SLIDE 24IS 257 – Fall 2004 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 25IS 257 – Fall 2004 Associations: Ternary Relationships VendorWarehouse * * Supplies Part *

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

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

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

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

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

SLIDE 32IS 257 – Fall 2004 Lecture Outline Review –Database Design, Conceptual Model –Object-Oriented Modeling Logical Design for the Diveshop database Access Database Creation

SLIDE 33IS 257 – 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

SLIDE 34IS 257 – Fall 2004 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 35IS 257 – Fall 2004 Logical Design: Mapping to a Relational Model Each entity in the ER Diagram becomes a relation. A properly normalized ER diagram will indicate where intersection relations for many-to-many mappings are needed. Relationships are indicated by common columns (or domains) in tables that are related. We will examine the tables for the Diveshop derived from the ER diagram

SLIDE 36IS 257 – Fall 2004 Customer = DIVECUST

SLIDE 37IS 257 – Fall 2004 Dive Order = DIVEORDS

SLIDE 38IS 257 – Fall 2004 Line item = DIVEITEM

SLIDE 39IS 257 – Fall 2004 Shipping information = SHIPVIA

SLIDE 40IS 257 – Fall 2004 Dive Equipment Stock= DIVESTOK

SLIDE 41IS 257 – Fall 2004 Dive Locations = DEST

SLIDE 42IS 257 – Fall 2004 Dive Sites = SITE

SLIDE 43IS 257 – Fall 2004 Sea Life = BIOLIFE

SLIDE 44IS 257 – Fall 2004 BIOSITE -- linking relation

SLIDE 45IS 257 – Fall 2004 Shipwrecks = SHIPWRK

SLIDE 46IS 257 – Fall 2004 Mapping to Other Models Hierarchical –Need to make decisions about access paths Network –Need to pre-specify all of the links and sets Object-Oriented –What are the objects, datatypes, their methods and the access points for them Object-Relational –Same as relational, but what new datatypes might be needed or useful (more on OR later)

SLIDE 47IS 257 – Fall 2004 Advantages of RDBMS Possible to design complex data storage and retrieval systems with ease (and without conventional programming). Support for ACID transactions –Atomic –Consistent –Independent –Durable

SLIDE 48IS 257 – Fall 2004 Advantages of RDBMS Support for very large databases Automatic optimization of searching (when possible) RDBMS have a simple view of the database that conforms to much of the data used in businesses. Standard query language (SQL)

SLIDE 49IS 257 – Fall 2004 Disadvantages of RDBMS Until recently, no real support for complex objects such as documents, video, images, spatial or time-series data. (ORDBMS add support for these). Often poor support for storage of complex objects from OOP languages (Disassembling the car to park it in the garage) Still no efficient and effective integrated support for things like text searching within fields.

SLIDE 50IS 257 – Fall 2004 Lecture Outline Review –Database Design -- Object-Oriented Modeling Logical Design for the Diveshop database Normalization Access Database Creation

SLIDE 51IS 257 – Fall 2004 Database Creation in Access Simplest to use a design view –wizards are available, but less flexible Need to watch the default values Helps to know what the primary key is, or if one is to be created automatically –Automatic creation is more complex in other RDBMS and ORDBMS Need to make decision about the physical storage of the data

SLIDE 52IS 257 – Fall 2004 Database Creation in Access Some Simple Examples

SLIDE 53IS 257 – Fall 2004 Next Time Normalization and the Relational Model Expanding and redesigning DiveShop