MCS-170 The Nature of Computer Science

Fall 2006


1. Database Relationships

These are linked (connected) by two ids, the id in the movies table and the id in the persons table:

persons -> firstnames
lastname
id (primary key)

movies -> title
director {references persons(id)}
        year_made
id (primary key)

acts_in -> actor {references persons(id)}
movie {references movies(id)}
 
movies -> 'Citizen Kane'
181 (reference to the person whose id is 181 in persons table)
        1941
8
persons -> 'Orson'
'welles'
181

2. Joining Tables

       Table2 has fields -- title, url -- and has 20 rows

3. Row Constraints

from Personal p, Payroll pr where p.Emp_ID = pr.Emp_ID