next

Relational Databases

What is a relational database?

a database where queries (questions made of the database) can span multiple tables (or the same table used multiple times)

types of relationships used in relational databases:

take our slightly improved table layout:

Id Bird Name Birthday Male Parents
1 Peter 2004-11-05 T Mary, Bob
2 John 2004-12-21 T Mary
3 Mary 2003-05-02 F Ellen
4 Jane 2005-07-12 F Mary, John
5 Bob 2003-06-10 T Ellen
6 Ellen 2002-11-27 F NULL

and split it up into two tables to enable relational queries about parents:

Id Bird Name Birthday Male
1 Peter 2004-11-05 T
2 John 2004-12-21 T
3 Mary 2003-05-02 F
4 Jane 2005-07-12 F
5 Bob 2003-06-10 T
6 Ellen 2002-11-27 F
Bird_Id Parent_Id
1 3
1 5
2 3
3 6
4 3
4 2
5 6

things to note:

index :: introduction :: tables :: columns :: relational :: moeVSjoe :: file :: normal :: queries :: conclusion