Presentation is loading. Please wait.

Presentation is loading. Please wait.

RA examples. Let’s build a Family DB ERD Person Bday Byear Gender Name.

Similar presentations


Presentation on theme: "RA examples. Let’s build a Family DB ERD Person Bday Byear Gender Name."— Presentation transcript:

1 RA examples

2 Let’s build a Family DB

3 ERD Person Bday Byear Gender Name

4 ERD Parent Role Person Bday Byear Gender Name

5 ERD Is this ERD perfect? Can you make it closer to the real world? Parent Role Parent Role Person Bday Byear Gender Name

6 Building the basic family tree

7

8 Grandparents:

9

10

11

12

13 Ancestors

14 Cousins

15 K-Cousins

16 K-Cousins m-times removed

17 First-Born children Definition: – A person is a first born if at least one of it’s parents doesn’t have any children older than the person.

18 First-Born children

19

20 Let’s add spouses… We can make our DB a bit more complicated: Spouse(Name, Byear, Bday, SpouseName, SpouseByear, SpouseBday) Parent Role Parent Role Person Bday Byear Gender Name Spouse

21 In-laws Definition: – A person’s -in-laws our the person’s spouse’s – Parent-in-law = spouse’s parent – Sibling-in-law = spouse’s sibling – …

22 In-laws

23 Question Get the names of all the mothers that gave birth every year during the 80’s (clue: use division)

24 Answer

25


Download ppt "RA examples. Let’s build a Family DB ERD Person Bday Byear Gender Name."

Similar presentations


Ads by Google