Presentation is loading. Please wait.

Presentation is loading. Please wait.

Databases and E-R Diagrams Access/IPS Walsall College of Arts & Technology.

Similar presentations


Presentation on theme: "Databases and E-R Diagrams Access/IPS Walsall College of Arts & Technology."— Presentation transcript:

1 Databases and E-R Diagrams Access/IPS Walsall College of Arts & Technology

2 November 2002Walsall College of Arts & Technology 2 What we are going to cover: What is a database and why do we use them? What is a database and why do we use them? What are Entities, Attributes & Relationships (in terms of databases)? What are Entities, Attributes & Relationships (in terms of databases)? What is an Entity-Relationship diagram and why are they used? What is an Entity-Relationship diagram and why are they used? Anything else we feel like discussing Anything else we feel like discussing

3 November 2002Walsall College of Arts & Technology 3 What is a database? Technical version: Technical version: “A collection of persistent data in a fixed store” “A collection of persistent data in a fixed store” What? What? English version: English version: Information held about something that can be looked at more than once Information held about something that can be looked at more than once Clear as mud, eh? Clear as mud, eh?

4 November 2002Walsall College of Arts & Technology 4 What makes up a database? A database is made up of: A database is made up of: Tables Tables Attributes Attributes Relationships Relationships More about these in a bit More about these in a bit

5 November 2002Walsall College of Arts & Technology 5 Why use Databases? Quicker reference Quicker reference Take up less space – no filing cabinets Take up less space – no filing cabinets Hold more information in a smaller space Hold more information in a smaller space Information remains indexed with new entries Information remains indexed with new entries Less paper = less risk of fire! Less paper = less risk of fire! And finally….. And finally….. Because they’re really good! Because they’re really good!

6 November 2002Walsall College of Arts & Technology 6 What are Entities, Attributes and Relationships? Entities are things we hold information about Entities are things we hold information about Eg. A Student or a Course Eg. A Student or a Course Attributes are the different categories of information for each entity, also known as Fields. Attributes are the different categories of information for each entity, also known as Fields. Eg. Student Name, Number, etc Eg. Student Name, Number, etc A collection of Attributes is known as a Record A collection of Attributes is known as a Record Relationships are the connections between Entities Relationships are the connections between Entities Eg. A Student enrols in a Course Eg. A Student enrols in a Course

7 November 2002Walsall College of Arts & Technology 7 E-R Diagrams Entity-Relationship Diagrams Entity-Relationship Diagrams What are they? What are they? Diagrams to show how Entities are related to each other Diagrams to show how Entities are related to each other This may seem too easy, but it really is that simple! This may seem too easy, but it really is that simple! What does one look like? What does one look like? We’ll see in a moment We’ll see in a moment

8 November 2002Walsall College of Arts & Technology 8 3 of a kind There are 3 kinds of Relationship There are 3 kinds of Relationship One to One One to One One to Many One to Many Many to Many Many to Many More explanation is required….. More explanation is required….. The best way to explain these, is through examples The best way to explain these, is through examples

9 November 2002Walsall College of Arts & Technology 9 One to One We’ll use Husbands and Wives We’ll use Husbands and Wives If we have an entity “Husband” and an entity “Wife” If we have an entity “Husband” and an entity “Wife” In English Law, One Husband can have One Wife and vice-versa In English Law, One Husband can have One Wife and vice-versa HUSBANDWIFE

10 November 2002Walsall College of Arts & Technology 10 One to Many We’ll use Football Teams and Players We’ll use Football Teams and Players If we have an Entity “Team” and an Entity “Player” If we have an Entity “Team” and an Entity “Player” A Team can have many Players, but a Player can only play for one Team A Team can have many Players, but a Player can only play for one Team TEAMPLAYER

11 November 2002Walsall College of Arts & Technology 11 Many to Many We’ll use Films and Filmstars We’ll use Films and Filmstars If we have an entity “Film” and an entity “Filmstar” If we have an entity “Film” and an entity “Filmstar” A Film has many Filmstars and a Filmstar can be in many Films. A Film has many Filmstars and a Filmstar can be in many Films. FILMFILMSTAR

12 November 2002Walsall College of Arts & Technology 12 Exercise Work out the relationships between, and draw a diagram for the following entities Work out the relationships between, and draw a diagram for the following entities Computer and Computer Game Computer and Computer Game Company and Branch Office Company and Branch Office Veterinary Surgeon & Practice Veterinary Surgeon & Practice Customer Car & Registered Owner Customer Car & Registered Owner

13 November 2002Walsall College of Arts & Technology 13 Acknowledgement Some of the material in this presentation was taken from a presentation by Janet Hardy, Lecturer in Computer Science dept, University of Wales, Aberystwyth Some of the material in this presentation was taken from a presentation by Janet Hardy, Lecturer in Computer Science dept, University of Wales, Aberystwyth Thanks Janet! Thanks Janet!


Download ppt "Databases and E-R Diagrams Access/IPS Walsall College of Arts & Technology."

Similar presentations


Ads by Google