📋 Diagram

You can find this schema in dbdiagram.io platform - brazilian-e-commerce-schema.

Brazilian-e-commerce-schema.png

🌍 Geolocation

Column Type Description
id SERIAL Geolocation unique identifier.
zip_code_prefix CHAR(5) First 5 digits of zip code.
city VARCHAR(255) City name.
city_codename VARCHAR(255) City name raw string.
state CHAR(2) State code.
latitude DOUBLE PRECISION Latitude.
longitude DOUBLE PRECISION Longitude.

🛍️ Customer

Column Type Description
id CHAR(32) Customer unique identifier.
name VARCHAR(255) Customer name. (Generated)
geolocation_id INTEGER Geolocation unique identifier.
gender CHAR(1) ‘F’ or ‘M’ (Generated)
birth_date DATE Between 1982 and 2005. (Generated)

💵 Seller

Column Type Description
id CHAR(32) Seller unique identifier.
name VARCHAR(255) Seller name. (Generated)
geolocation_id INTEGER Geolocation unique identifier.
gender CHAR(1) ‘F’ or ‘M’ (Generated)
birth_date DATE Between 1982 and 2005. (Generated)

📃 Product Category

Column Type Description
id CHAR(32) Unique product category identifier.
name VARCHAR(255) Root category of product, in Portuguese.

📺 Product

Column Type Description
id CHAR(32) Unique product identifier.
name_lenght INTEGER Number of characters extracted from the product name.
description_lenght INTEGER Number of characters extracted from the product description.
photos_quantity INTEGER Number of product published photos.
weight_g DOUBLE PRECISION Product weight measured in grams.
length_cm DOUBLE PRECISION Product length measured in centimeters.
height_cm DOUBLE PRECISION Product height measured in centimeters.
width_cm DOUBLE PRECISION Product width measured in centimeters.
product_category_id INTEGER Unique product category identifier.

📩 Order