Skip to content

Database Schemas

Luke Golden edited this page Jan 26, 2017 · 2 revisions

user table

<style type="text/css"> .tg {border-collapse:collapse;border-spacing:0;margin:0px auto;} .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} </style>
email name avatar job location about
STRING STRING STRING STRING STRING TEXT
  • The email property is the primary key
  • The name property cannot be empty

post table

<style type="text/css"> .tg {border-collapse:collapse;border-spacing:0;margin:0px auto;} .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg .tg-2cdi{font-weight:bold;font-style:italic;background-color:#ffce93;color:#000000;vertical-align:top} .tg .tg-yw4l{vertical-align:top} </style>
id phase title message sentiment helpful unhelpful flag favorites anon edited
INTEGER STRING STRING TEXT INTEGER INTEGER INTEGER INTEGER INTEGER BOOLEAN BOOLEAN
  • The id property is the primary key and automatically increments for each post
  • The title property cannot be null
  • The message property cannot be null
  • The sentiment property cannot be null
  • The helpful property cannot be null
  • The unhelpful property cannot be null
  • The flag property cannot be null
  • The favorites property cannot be null
  • The anon property cannot be null
  • The edited property cannot be null

sentiment table

<style type="text/css"> .tg {border-collapse:collapse;border-spacing:0;margin:0px auto;} .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg .tg-2cdi{font-weight:bold;font-style:italic;background-color:#ffce93;color:#000000;vertical-align:top} .tg .tg-yw4l{vertical-align:top} </style>
id helpfulness
INTEGER BOOLEAN
  • The id property is the primary key and automatically increments for each post
  • The helpfulness property can be null

favorites table

<style type="text/css"> .tg {border-collapse:collapse;border-spacing:0;margin:0px auto;} .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg .tg-2cdi{font-weight:bold;font-style:italic;background-color:#ffce93;color:#000000;vertical-align:top} .tg .tg-yw4l{vertical-align:top} </style>
id favorites
INTEGER BOOLEAN
  • The id property is the primary key and automatically increments for each post
  • The favorite property can be null

flags table

<style type="text/css"> .tg {border-collapse:collapse;border-spacing:0;margin:0px auto;} .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg .tg-2cdi{font-weight:bold;font-style:italic;background-color:#ffce93;color:#000000;vertical-align:top} .tg .tg-yw4l{vertical-align:top} </style>
id flag
INTEGER BOOLEAN
  • The id property is the primary key and automatically increments for each post
  • The flag property can be null
Clone this wiki locally