DataModeling

DataModeling - Data Modeling 1 Data Modeling A database can...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Data Modeling
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Data Modeling A database can “model” a “world” which is seen as: a collection of entities, relationships among entities. An entity(-instance) is an individual “object” that exists and is distinguishable from other individuals. Example: specific person, company, event, plant Entities have attributes Example: people have names and addresses An entity set ( also entity type) is a set of entities of the same type that share the same properties. Example: set of all persons, companies, trees, holidays
Background image of page 2
3 Entity Sets customer and loan customer-id customer- customer- customer- loan- amount name street city number
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Attributes An entity is represented by a set of attributes, i.e. descriptive properties possessed by all members of an entity set. Example: customer = (customer-id, customer-name, customer-street, customer-city) loan = (loan-number, amount) Domain – the set of permitted values for each attribute Attribute types: Simple and composite attributes. Single-valued and multi-valued attributes E.g. multivalued attribute: phone-numbers Derived attributes Can be computed from other attributes E.g. age , given date of birth
Background image of page 4
5 Composite Attributes
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Relationship Sets A relationship (-instance) is an association among several entities Example: Hayes depositor A-102 customer entity relationship [set] account entity A relationship set is a mathematical relation among n 2 entities, each taken from entity sets {( e 1 , e 2 , … e n ) | e 1 E 1 , e 2 E 2 , …, e n E n } where ( e 1 , e 2 , …, e n ) is a relationship Example: (Hayes, A-102) depositor
Background image of page 6
7 Relationship Set borrower
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 Relationship Sets (Cont.) An attribute can also be property of a relationship set. For instance, the depositor relationship set between entity sets customer and account may have the attribute access- date
Background image of page 8
9 Degree of a Relationship Set Refers to number of entity sets that participate in a relationship set. Relationship sets that involve two entity sets are binary (or degree two). Generally, most relationship sets in an E-R schema are binary. Relationship sets may involve more than two entity sets. E.g. Suppose employees of a bank may have jobs (responsibilities) at multiple branches, with different jobs at different branches. Then there is a ternary relationship set between entity sets employee, job and branch Relationships between more than two entity sets are relatively rare. Most relationships are binary.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Mapping Cardinalities Express the number of entities to which another entity can be associated via a relationship set. Most useful for binary relationship sets. For a binary relationship set, the mapping cardinality must be one of the following types: One-to-one One-to-many Many-to-one Many-to-many
Background image of page 10
11 One-to-one One-to-many Note: Some elements in A and B may not be mapped to any elements in the other set
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12 Many-to-one Many-to-many Note: Some elements in A and B may not be mapped to any elements in the other set
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/02/2012 for the course C S 360 taught by Professor Clement,m during the Winter '08 term at BYU.

Page1 / 42

DataModeling - Data Modeling 1 Data Modeling A database can...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online