Relational Databases for Archaeology

Relationships

In the subsections of this part of this online guide, we will go into additional detail about relating tables to each other.  Table relationships allow us to connect the concepts modeled by the separate tables.  In archaeological terms, this might include connecting all of the contexts excavated in an area with the data about the area in the areas table.  By making these connections, we can fully explore and understand the data.  For example, you may be researching a certain context and you want to know how many years into the excavation of the area this particular context was excavated.  You could compare the date_opened value of the area with the date_opened value of the context.  This is easiest to do if the context is linked to the area in the database.

Relationships take three main forms, one-to-one, one-to-many, and many-to-many.  This indicates how many rows in the first table will relate to how many rows in the second table.  Here, we will review the most common type of relationship first, the one-to-many relationship, and then explore the other types of relationships.
 

This page has paths:

  1. Relational Databases for Archaeology Peter Cobb

Contents of this path:

  1. The One-to-Many Relationship
  2. The One-to-One and Many-to-Many Relationships
  3. Lookup Tables