Download - Data Modelling and ER Diagrams A way to make sense out of large collections of information
![Page 1: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/1.jpg)
Data Modelling and ER DiagramsA way to make sense out of large collections
of information
![Page 2: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/2.jpg)
Data Modelling and ER Diagrams
Learning Intentions• Understand what an entity, an
attribute and a relationship are• Understand how these are related to
instances and values• Understand the different types of
relationships between different entities• Understand the purpose of an ER
diagram• Appreciate that ER Diagrams are one
way of creating an information model
Success Criteria• Given some example attributes be able
to group them with particular entities• Given a set of values group them into
specific instances of an entity.• Given a set of entities describe the
relationship between them.• Define what the terms entity, attribute
and relationship mean.• Create a simple ER Diagram given a set
of structured data.
![Page 3: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/3.jpg)
Activity 1:- What kind of information can we find on social networking sites?
![Page 4: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/4.jpg)
Posts
Pictures
Picture Albums
News
Events
Basic Profile Details
People I’m Friends with
Groups I belong to
![Page 5: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/5.jpg)
There is a lot of data on Facebook. ■ 1.3 billion users■ 80 billion items shared every month
(pictures, posts, notes, news, events, etc), ■ Average user creates 100 items per month
“How can FB give me back my data out of the several trillion items out there?!
“How can the data be organised so that it finds it quickly?”
![Page 6: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/6.jpg)
Activity 2:- Grouping data with things1. Make a group of four and make sure you have some space to work
together2. Place the four cards in grey in a horizontal line with space
underneath for other cards
3. Decide which pieces of data are most likely to be seen with a particular thing on a grey card and place them underneath
4. You should make sure your group can explain why they’ve placed that piece of data with a particular thing.
Person Event Post Picture
Person Event Post Picture
![Page 7: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/7.jpg)
How did your group arrange their cards?
![Page 8: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/8.jpg)
One Possible Grouping
Person Event Post Picture
Name
Date of Birth
Hometown
School
Text
Time
Location
URL
Name
Start Date
Host
End Date
Location
Description
Location
File Name
![Page 9: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/9.jpg)
Some Definitions
•The grey cards are called entities which are classes of object we want to model and store information about. •The white cards are called attributes which are characteristics that an entity has.•The collection of all entities and their attributes is the beginning of a data model that describes the situation we are interested in modelling.
![Page 10: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/10.jpg)
Activity 3:- Creating example instances1. Make a group of four and make sure you have some space to work
together2. Place the four cards in grey in a horizontal line with space
underneath for other cards
3. Group specific values on the cards together to make specific examples of a particular entity. There may be more than one example for each entity.
Person Event Post Picture
Person Event Post Picture
![Page 11: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/11.jpg)
•Alison Smith•Born 30/08/1995•Born in Glasgow•Goes to Hamilton Grammar School•[email protected]
•“Had a fantastic day at the zoo with Steven”•Posted 14:32 on 12th September 2013•http://www.thezoo.com
•Alison’s birthday party•Born 30/08/1995•Starts 30th Aug, 7pm•Ends 30th Aug, 11pm•Hosted by Alison•At the Community Hall
•“The view from Edinburgh Castle”•Taken at Edinburgh Castle•Edincastle.jpg
•Steven Brownlee•Born 23/09/1982•Born in London•Goes to London High School•[email protected]
•“It’s transfer deadline day”•Posted 12:01 on 11th January 2014•http://www.bbc.co.uk/transfernews
•Holiday to Tenerife•Starts 1st June 2015•Ends 15th June 2015•Hosted by Steven•At Playa de Las Americas
•“Me and my snowman”•Taken at Steven’s house•snow003.png
Person Event Post
Picture
![Page 12: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/12.jpg)
Discuss
•What was easy or hard about this activity?•What is the difference between an entities and attributes and instances and values? •What is missing from this model? What did we talk about when we discussed social networks at the start that is not represented in the information we have?
![Page 13: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/13.jpg)
Some More Definitions
•An instance is a specific concrete example of an entity. For example Fred is an instance of the person entity.•A value is a specific concrete example of a particular attribute. For example 24/05/1982 is the value for Fred's birthday attribute.
![Page 14: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/14.jpg)
Activity 4:- Relationships
•Alison Smith•Born 30/08/1995•Born in Glasgow•Goes to Hamilton Grammar School•[email protected]
•Alison’s birthday party•Born 30/08/1995•Starts 30th Aug, 7pm•Ends 30th Aug, 11pm•Hosted by Alison•At the Community Hall
•“Had a fantastic day at the zoo with Steven”•Posted 14:32 on 12th September 2013•http://www.thezoo.com
•“Me and my snowman”•Taken at Steven’s house•snow003.png
How are these instances related to each other?
![Page 15: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/15.jpg)
Activity 4:- Relationships
How are these instances related to each other?
•“The view from Edinburgh Castle”•Taken at Edinburgh Castle•Edincastle.jpg
•Steven Brownlee•Born 23/09/1982•Born in London•Goes to London High School•[email protected]
•“It’s transfer deadline day”•Posted 12:01 on 11th January 2014•http://www.bbc.co.uk/transfernews
•Starts 1st June 2015•Holiday to Tenerife•Ends 15th June 2015•Hosted by Steven•At Playa de Las Americas
![Page 16: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/16.jpg)
Person
PicturePost
Event
Draw the relationships between these events
![Page 17: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/17.jpg)
Person
PicturePost
Eventhosts, attends, likes
uploads, likes
creates,likes,
contains
Entity Relationship Diagram
![Page 18: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/18.jpg)
Summary
• Entities are classes of object we want to model and store information about. •Attributes are characteristics that an entity has.• Relationships are how two entities are related to
each other.•Data model is the collection of all entities, their
attributes and the relationships between them.• Instances are specific examples of a particular entity.•Values are the specific data for a particular attribute.• ER Diagram is a diagram showing entities and the
relationships between them.
![Page 19: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/19.jpg)
Discuss
What other entities and relationships exist in social networking sites?
Is a particular relationship between instances one to one, one to many or many to many?
![Page 20: Data Modelling and ER Diagrams A way to make sense out of large collections of information](https://reader036.vdocument.in/reader036/viewer/2022082820/56649e7d5503460f94b7fc05/html5/thumbnails/20.jpg)
Person
PicturePost
Eventhosts, attends, likes
uploads, likes
creates,likes,
contains
Group
is in a ..
extensions
Page
likes a ..