Extended-Entity Relationship Model
Left is eer model, right figures are real instantce digram.
The ER model describes data as entities, relationships, and attributes
Entity Type And Entity Surrogates
- Each dot represent one user
- entity type names must be unique.
An entity may be an object with a physical existence (for example, a particular person,
car, house, or employee) or it may be an object with a conceptual existence (for
instance, a company, a job, or a university course).

Single-Valued Properties
User(entity) have properties, email and password
Identifying Properties
Email is identifying properties, the same email can not point to two different instances of user.
Composite Properties
name is composed of firstname and lastname

Multi-Valued Properties
there are three values for user 1 and only 1 for user 2. Interest is multi-valued properties.
Quiz

1-1 Relationship Types

有些没有map,所以是partial
1-Many Relationship Types

also partial function
Mandatory 1-N Relationship Types

It is a total function,所有user都有map
N-M Relationship Types

single n map to multiple m, single m map to multiple n
Quiz

N-Ary Relationship Types
- First first email and eventname as single value,a regular user in an event may participate many teams.
- It is rare to see the relationship greater than 2

Many Relationship Types
这里只是变成了3种binary relationship,但是这个图不能表示出来上面那个图的信息,就是某一个user,在某一个team,参加某一个event
Identifying Relationships/weak entity types
- email and dataandtime can hooked up to th statusupdate
statusupdate is week entity, because we can not idenfity this entity without hooking up with specific user.(must dataand time and email togegher)

Quiz

Recursive Relationship Types


Supertypes And Subtypes -is a



Supertypes And Subtypes-Inheritance
Regular user and admin user will have birthday and lastlog properties.
Quiz

Union Entity Types
Employer 是 union of company and goveragency, however, there is no intersection of company and goveragentcy. Employer is union entity types
Are Relationships Entities?
CurrentJob are relatiohships and it is also entities,有时如图二所示,currentjobsincedata变成user的property了

Another Example
schoool attence is objectified relationship type
Messing With Your Brain Part 1
老师给了很多例子,lastname是从father和son的name合成的,这样的话,lastname就still property?
Messing With Your Brain Part 2
但是如果我们设计weddingplanner,这个肯定是一个entity type,这些所有的例子就是告诉我们,我们不能想当然的认为某一个是一个relationship或者entity type
What Can The EER Do?
doesn't support aggregation(see car example)
Car graphic
Why not? EER doesn't support aggregation
Quiz

What's the result type of a query?
There is no type to capture the result, 所以我们不能继续operate on it 所有dms没有用eer
Relational Model

Data Structure

Big Deal

Quiz

Constraints
