Skip to content

Tables and Example values

Justin Wilcox edited this page Jun 4, 2022 · 12 revisions

This was the initial setup before switching to DynamoDB which is NoSQL and most of the tables were dropped.

Characteristics:

Table Name: Users

Column name Value Type Purpose
UserID INT Primary Key
Username VARCHAR User chosen name
Password VARCHAR User chosen password to login
Email VARCHAR Users chosen email for account recovery
SchoolID INT Foreign key of where the user goes to school

Table Name: Books

Column name Value Type Purpose
BookID INT Primary Key
ISBN VARCHAR Book identifier
BookTitle VARCHAR Book title
AuthFirstName VARCHAR Books authors first name
AuthLastName VARCHAR Books authors last name
Location VARCHAR Which school the book belongs to

Table Name: User_Books

Column name Value Type Purpose
ListingID INT Primary Key
UserID INT Foreign Key
BookID INT Foreign Key

Table Name: Schools

Column name Value Type Purpose
SchoolID INT Primary Key
SchoolName VARCHAR Name of the school
City VARCHAR City of the school
State VARCHAR State of the school

Sample Values:

Table Name: Users

UserID Username Password Email SchoolID
1 Steve 7196759210defdc0 steve@mail.com 3
2 Jill 6177398791fgwed9 jill@mail.com 2
3 Bill 1497372110aewio3 bill@mail.com 1

Table Name: Books

BookID ISBN BookTitle AuthFirstName AuthLastName
1 171717 WW2 facts Elliot Writer
2 123364 Biology facts Sarah Knowledge
3 983460 Algebra 4 U Emily Smart

Table Name: User_Books

ListingID UserID BookID
1 3 2
2 1 3
3 2 1

Table Name: Schools

SchoolID SchoolName City State Address
1 Cascadia Bothell WA 134 AVE NE
2 UW Seattle WA 14 ST South
3 WSU Pullman WA 197 CT W