Skip to content

Issue #2 - Database Schema #3

Description

@keginzburg

Database Schema

  • Contains correct datatypes
  • Contains appropriate constraints/details
    • primary key
    • not null
    • unique
    • indexed
    • foreign key
  • Contains bullet points after the table that state which foreign keys will reference to which table, or references to the associations which will be made
  • foreign key and table name are lowercased, snake_cased and back_ticked
  • Correctly formatted
    • schema is written in a table format
    • the table's name are lowercased, snake_cased and back_ticked
    • the table header column names are bolded
    • columns names are lowercased and snaked_cased and back_ticked

Comments

  • For our Users table, I believe we'll have Amazon only keep track of a name, an email, a password_digest, and a session_token. We do not need a username. Amazon's signup is quite complex, but we are going to base this down so it is feasible for our project. Be sure to talk to me about this.
  • For our Products table, I imagine our Products will have a fair amount more data. Products will probably have a weight, brand, dimensions, etc. Be sure to browse Amazon and see what else we can add to our Products table. Amazon is the products it advertises, so this is our main draw.
  • Should our Cart have a unique composite between user_id and product_id? Do we want users to be able to make two different cart entries for the same product?
  • Our Reviews should have title in addition to our body column. Will their rating be an integer or a float?
  • Our Reviews table is also missing foreign key and index referencing below the markdown table.
  • Solid work here, but let's be sure to revisit this later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions