Sample Database Structure

This is an overview of sample database that you imported from setup post.

Overview

We’re assuming that we have an eCommerce website and have some tables like, users, product_categories, products, orders, and user_logs.

Users table

Users table have the following structure.
table name: users

columntype
idint
datetime_joineddatetime
first_namevarchar
last_namevarchar
emailvarchar
cityvarchar
activeboolean

Sample data:

iddatetime_joinedfirst_namelast_nameemailcityactive
12023-03-07 12:45:12.231069+00JohnDoe[email protected]West Mistytrue

Product categories

table name: product_categories

columntype
idint
namevarchar

Sample data:

idname
1Oil Paint

Products table

table name: products

columntype
idint
created_atdatetime
product_codevarchar
namevarchar
companyvarchar
priceint
category_idint - foreign key
descriptiontext

Sample data:

idcreated_atproduct_codenamecompanypricecategory_iddescription
12023-09-01 23:59:1430248960teal paintBurke, Payne and Oliver4271Score finally…

Orders table

table name: orders

columntype
idint
created_atdatetime
order_codevarchar
product_idint - foreign key
user_idint - foreign key
quantityint
total_priceint
deliveredboolean

Sample data:

idcreated_atorder_codeproduct_iduser_idquantitytotal_pricedelivered
12022-10-08 17:50:4228e9fe61-8883-4933-bc48-b4cd292cf5011748062532True

User logs table

table name: user_logs

columntype
idint
user_emailvarchar
datetimedatetime
ip_addressvarchar
page_visitedtext
user_agenttext

Sample data:

iduser_emaildatetimeip_addresspage_visiteduser_agent
1[email protected]2023-06-25 11:04:28116.0.78.131blog/Mozilla/5.0 (Windows; U; Windows CE)…