Database relationships

notes on the three types of relationships

?

one to one

one entity can only be linked with one other single entity (http://www.teach-ict.com/as_a2_ict_new/ocr/AS_G061/315_database_concepts/attributes_entities/miniweb/images/one2one.jpg)

example: a husband has one wife

a one to one relationship is marked with a single vertical line at each end of the line joining the 2 boxes.

1 of 4

one to many

one entity can be linked with several other entities

example one mother may have many children

(http://www.teach-ict.com/as_a2_ict_new/ocr/AS_G061/315_database_concepts/attributes_entities/miniweb/images/one2many.jpg)

this is showed by  single vertical line at one end and bird foot shape at the other

2 of 4

many to many

many entities may be linked with many other entities

example many videos may be brought by many customers

(http://www.teach-ict.com/as_a2_ict_new/ocr/AS_G061/315_database_concepts/attributes_entities/miniweb/images/many2many.jpg)

many to many relationships are bad as it's hard to find something unique about them.

to solve this problem we can use a link entity (see next card)

3 of 4

link entities

this is used to solve the problem of having a many to many relationship

a link entity creates two one to many relationships which are easier to use than many to many relationships

for example one customer many be linked to many bookings and one holiday may also be linked to many bookings

4 of 4

Comments

No comments have yet been made

Similar ICT resources:

See all ICT resources »See all Databases resources »