Data Loading...

ENTITY-RELATIONSHIP MODEL Flipbook PDF

A basic explanation for the ER MODEL.


99 Views
29 Downloads
FLIP PDF 625.96KB

DOWNLOAD FLIP

REPORT DMCA

 Designing a database in the real world is serious business.  People who want databases tend to not know all the data

they would need in it. • They can easily forget necessary things.

 It can also get very confusing trying to identify every single

data that is to be in the database. • It can be tedious work trying to identify relevant data.

Try mentioning all the things the school would have to keep information on.  Don’t tell me students or staff!

Try mentioning all the things the school would have to keep information on. Quantity

Vendor

Furniture Replacements Name Department Designation

Teacher

Last maintenance date

Items

Maintenance Date supplied Club providers

Suppliers

Maintenance cost Club members

Clubs Club duration

Stationaries

Quantity

 An ER Model helps you to sketch key components in an efficient way

to help you develop a working database.

 An ER Model is used to illustrate the logical structure of a database.  Can help you figure out the necessary components need in your database and how they are connected.

To create an ER Model, you need 3 components:  Entity  This is the thing data is collected on. In the school’s database, students, staff, maintenance

would be the entities.

 Attributes  These are characteristics of an entity. For the students entity, the attributes would be first

name, last name, DOB, guardian’s number.

 Relationship  This is the association between entities in the database. The relationship between the

entity students and the entity teachers would be that teachers teach the students in the school.

EMPLOYEE

DEPARTMENT

ID number Name DOB Address Telephone

ID number Name Budget HOD

DOB

 This defines the relationship between entities in terms of numbers. • It is expressed using none, one or many.

 In a database for a business the salesman could have no, one or

many customers. Notations are used for showing the cardinality:

 One to One A single occurrence of an entity is related to one occurrence of a second entity.  A student having one student ID. Student Student ID

 One to Many A single occurrence of an entity is related to many occurrences of a second entity.  A customer having many sale orders. Customer Sales orders  Many to Many Many occurrences of an entity are related to many occurrences of another entity.  Many students taking many subjects Students Courses