Relation View

Table of Contents

1. Relational View

A relation is a set of tuples

  • tuples must have same degree
  • tuples can not repeat information
  • tuples data must be consistent

A schema is the name of a relation and name(s) of attributes

key: atrribute(s) with values that are unique across all tuples in a relation

EX Parts, Projects, Commitments as Peers

Parts (Part #, Name, Qty On Hand) <– Relation Schemas

  • Part 1, Bolt, 1000 on hand
  • Part 2 Electrical Wiring 500ft on hand

Projects (Project ID, Name)

  • Project A/ Apollo 8
  • Project B / Apollo 10
  • Project C / Apollo 11

Commitment (Part, Project, Qty Committed) <- (part, project) forms a composite key

  • Part 1 / Project A/ 100
  • Part 1 / Project A/ 5 / Project B / 15
  • Part 1 / Project A / 100
  • Part 2 / Project A / A dozen
  • Part 1 / Project A / 158
  • Part 9 / Project XYZ / 50

Commitment.Part is a foreign key referencing Parts.Part #

  • must reference a key

Commitment.Project is a foreign key referencing Projects.Proj ID

Date: <Januaray 7th 2025>

Author: Anthony Rossi

Created: 2025-01-10 Fri 14:52