// Copy this text, paste to https://dbdiagram.io/d
// Or, https://databasediagram.com/app
// Or, view in VSCode with extension: "DBML Live Preview"

Table Customer {
    id INTEGER [primary key]
    name TEXT 
    email TEXT 
    credit_limit FLOAT 
    balance FLOAT 
    }

Table Item {
    id INTEGER [primary key]
    order_id INTEGER 
    product_id INTEGER 
    quantity INTEGER 
    unit_price FLOAT 
    amount FLOAT 
    }

Table Order {
    id INTEGER [primary key]
    customer_id INTEGER 
    date_ordered TEXT 
    date_shipped TEXT 
    notes TEXT 
    amount_total FLOAT 
    }

Table Product {
    id INTEGER [primary key]
    name TEXT 
    unit_price FLOAT 
    }

Table SysConfig {
    id INTEGER [primary key]
    name TEXT 
    discount_rate FLOAT 
    tax_rate FLOAT 
    notes TEXT 
    }



// Relationships
    Ref: Item.(order_id) > Order.(id)
    Ref: Item.(product_id) > Product.(id)
    Ref: Order.(customer_id) > Customer.(id)
