Download presentation
Presentation is loading. Please wait.
1
Representing Information with Data Models What is a data model and data modeling? What are Entities and Attributes? Relationships between entities Modeling is an iterative process Data modeling tools Discovering entities, attributes, relationships from Big Hit video rental receipt
2
What is a data model A data model is a relatively simple, usually graphic, representation of complex real-world data structures. It serves as a bridge between those real-world things and the physical representation of those concepts in a database. Types of data models –Conceptual: in terms that users will understand (ER) –Logical: in terms that a relational database system will understand (IDEF1X) –Physical: in terms of the underlying computer hardware and operating system (for a specific RDBMS) Database schemas –Schema is another word for model. It is generally a written description and is specific to a particular database system.
3
Schemas A Schema is a data model that is intended to be used with a particular database system –External schemas are defined for the users of a database –Logical schema defines the representation as a collection of tables that are stored in a database server –Internal schema defines the representation used by the database server to store the tables in memory or files
4
Entities Entity (instance) –A thing (object) that is of interest to an information system –An abstraction of the object that contains those characteristics that are important to the information system Entity (class) –The common characteristics that represent a set of entity instances –The common characteristics of a particular set of entity instances that make them distinct from other entities
5
Attributes Attribute value –A characteristic of an entity –The value of a particular characteristic Attribute –A characteristic that helps to describe an object Key attribute(s) uniquely identifies entities
6
Examples –Entity (instance): A customer, or the characteristics of a customer that are of interest –Entity (class): All of the potential customers, or the information about them –Attribute: last name or city they live in –Attribute value: last name is ‘Smith’ or city they live in is ‘Eugene’ –Key Attribute: accountId –Key Attribute Value: 101
7
Big Hit Entities CustomerA customer of the business VideoAn item in the rental inventory EmployeeA person who works in one or more stores PayStatementA record of the wages paid to an employee TimeCardA record of a block of time worked by an employee at a store StoreOne of the retail outlets of BigHit Video RentalThe rental of a video by a customer for a specific period and cost PurchaseOrderA request to purchase an item SupplierA company that sells items to BigHit Video
8
Big Hit Customer Attributes accountIdunique identifier lastNamelast name firstNamefirst name streetstreet address where they live citycity in which they live statestate in which they live zipcodezipcode in which they live Balancehow much money they owe
9
Relationships A relationship is a connection between 2 entities –Customer Jane Block rents the video with videoId 90987 A relationship type between 2 entity classes represents the possibility that two entities may be related –A customer may rent a video Attributes and relationship types are not the same –The customer accountId is not an attribute of the Video entity class
10
Relationship Types A relationship type may be limited in how many relationships an object may have The cardinality of a relationship type may be –One-to-one: Each instance of an entity may have no more than one instance of the other entity –One-to-many: One of the entities allows an instance to have any number of related instances, but the other entity restricts its instances to be related to no more than one instance. –Many-to-many: Instances of both entities may have any number of related instances of the other entity.
11
One-to-many Relationship Example
12
Many-to-many Relationship Example
13
Modeling is an Iterative Process Don’t expect to get the model correct the first time Modeling is an iterative process Begin by just identifying entities and relationships Next identify keys Adjust relationships and entities Think about how you will put data in and get data out What limitations does your model impose? Add more attributes Show it to your customer or colleagues Add more constraints and look at cardinality
14
What are the relationships, entities and attribute values in this video rental receipt? What entity classes, attributes and relationship types are implied by the video rental receipt? BigHit Video Rental Receipt Account ID: 101video ID: 90987 Date: January 9, 2002 Cost: $2.99 Jane Block 1010 Main St. Apopka, FL 30458 ElizabethDate due: January 11, 2002
15
Data Modeling Tools PowerDesigner (Sybase) ERWin (Computer Associates) ERStudio (Embarcadero) Designer (comes with Oracle) ModelSphere (SilverRun) CASE Studio 2 Visio
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.