Updating sql to be more generic and biznizzy

This commit is contained in:
2026-05-08 00:12:34 -07:00
parent 8a8eb88ced
commit dea3eb8cc2
2 changed files with 30 additions and 4 deletions

View File

@@ -2,10 +2,10 @@
CREATE DATABASE collector;
\c collector
-- Modeling the stores that we track overall
-- Modeling the businesses that we track overall
CREATE TABLE businesses (
store_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
store_name VARCHAR(255) NOT NULL
business_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
business_name VARCHAR(255) NOT NULL
);
-- Modeling the products
@@ -14,7 +14,7 @@ CREATE TABLE products (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
-- Store-specific Identifiers
business_id UUID REFERENCES businesses (store_id) NOT NULL,
business_id UUID REFERENCES businesses (business_id) NOT NULL,
-- Product Details
product_name VARCHAR(255) NOT NULL,