1 / 13

Databases and E-R Diagrams

Databases and E-R Diagrams. Access/IPS Walsall College of Arts & Technology. What we are going to cover:. What is a database and why do we use them? What are Entities, Attributes & Relationships (in terms of databases)? What is an Entity-Relationship diagram and why are they used?

ursula
Download Presentation

Databases and E-R Diagrams

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

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

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

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

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

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

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

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

  10. One to Many • We’ll use Football Teams and Players • 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 TEAM PLAYER Walsall College of Arts & Technology

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

  12. Exercise • Work out the relationships between, and draw a diagram for the following entities • Computer and Computer Game • Company and Branch Office • Veterinary Surgeon & Practice • Customer Car & Registered Owner Walsall 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 • Thanks Janet! Walsall College of Arts & Technology

More Related