{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Day 3 Database Models - Database Models(Part 1 Confusing...

Info icon This preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Database Models (Part 1)
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Confusing? Women Men Girls Boys
Image of page 2
Notation Women Men Girls Boys 1:1 1:N 1:N 1:N 1:N M:N M:N M:N Which way does it go? And, is it mandatory?
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Notation - Crow’s Foot Zero One Many Women Men Girls Boys
Image of page 4
Keys Primary Key (pk) Uniquely identifies record in a table Foreign Key (fk) Uniquely identifies “parent” record
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Keys Men Boys MID (pk) 1111 2222 3333 MName John Jones Sid Smith Will White MBorn 1/2/1960 2/3/1965 3/4/1970 BID (pk) 4444 5555 6666 BName Jack Jones Sam Smith Steve Smith BBorn 4/5/1990 5/6/1995 6/7/2000 MID (fk) 1111 2222 2222 FK points to the unique parent
Image of page 6
Keys Orphans Men Boys MID (pk) 1111 2222 3333 MName John Jones Sid Smith Will White MBorn 1/2/1960 2/3/1965 3/4/1970 BID (pk) 4444 5555 6666 7777 BName Jack Jones Sam Smith Steve Smith Bill Barnes BBorn 4/5/1990 5/6/1995 6/7/2000 7/8/2005 MID (fk) 1111 2222 2222 ____
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Storing Relationships How do you represent a 1:N relationship? Child record “points” to its parent record FK in the child table is the PK of the parent table How do you represent a M:N relationship?
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern