Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Modelling and ER Diagrams A way to make sense out of large collections of information.

Similar presentations


Presentation on theme: "Data Modelling and ER Diagrams A way to make sense out of large collections of information."— Presentation transcript:

1 Data Modelling and ER Diagrams A way to make sense out of large collections of information

2 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.

3 Activity 1:- What kind of information can we find on social networking sites?

4 Posts Pictures Picture Albums News Events Basic Profile Details People I’m Friends with Groups I belong to

5 Facebook 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?”

6 Activity 2:- Grouping data with things 1.Make a group of four and make sure you have some space to work together 2.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. PersonEvent PostPicture Person Name Event PostPicture

7 How did your group arrange their cards?

8 One Possible Grouping PersonEvent Post Picture Name Date of Birth Hometown Email School Text Time Location URL Name Start Date Host End Date Location Description Location File Name

9 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.

10 Activity 3:- Creating example instances 1.Make a group of four and make sure you have some space to work together 2.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. PersonEvent PostPicture Person Alison Smith Event PostPicture Alison was born in Glasgow

11 Alison Smith Born 30/08/1995 Born in Glasgow Goes to Hamilton Grammar School a.smith@gmail.com “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 30 th Aug, 7pm Ends 30 th 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 s.brownlee@hotmail.com “It’s transfer deadline day” Posted 12:01 on 11th January 2014 http://www.bbc.co.uk/transfe rnews Holiday to Tenerife Starts 1 st June 2015 Ends 15 th June 2015 Hosted by Steven At Playa de Las Americas “Me and my snowman” Taken at Steven’s house snow003.png PersonEvent Post Picture

12 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?

13 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.

14 Activity 4:- Relationships Alison Smith Born 30/08/1995 Born in Glasgow Goes to Hamilton Grammar School a.smith@gmail.com Alison’s birthday party Born 30/08/1995 Starts 30 th Aug, 7pm Ends 30 th 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?

15 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 s.brownlee@hotmail.com “It’s transfer deadline day” Posted 12:01 on 11th January 2014 http://www.bbc.co.uk/transfe rnews Starts 1 st June 2015 Holiday to Tenerife Ends 15 th June 2015 Hosted by Steven At Playa de Las Americas

16 Person PicturePost Event Draw the relationships between these events

17 Person Picture Post Event hosts, attends, likes uploads, likes creates, likes, contains Entity Relationship Diagram

18 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.

19 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?

20 Person Picture Post Event hosts, attends, likes uploads, likes creates, likes, contains Group is in a.. extensions Page likes a..


Download ppt "Data Modelling and ER Diagrams A way to make sense out of large collections of information."

Similar presentations


Ads by Google