CREATE TABLE Customers
(
    CustomerID    INTEGER         not null
        primary key,
    FirstName     TEXT not null,
    MiddleInitial TEXT null,
    LastName      TEXT not null
);
Customers
CREATE TABLE Employees
(
    EmployeeID    INTEGER         not null
        primary key,
    FirstName     TEXT not null,
    MiddleInitial TEXT null,
    LastName      TEXT not null
);
Employees
CREATE TABLE Products
(
    ProductID INTEGER            not null
        primary key,
    Name      TEXT    not null,
    Price     REAL null
);
Products
CREATE TABLE Sales
(
    SalesID       INTEGER not null
        primary key,
    SalesPersonID INTEGER not null,
    CustomerID    INTEGER not null,
    ProductID     INTEGER not null,
    Quantity      INTEGER not null,
    foreign key (SalesPersonID) references Employees (EmployeeID)
            on update cascade on delete cascade,
        foreign key (CustomerID) references Customers (CustomerID)
            on update cascade on delete cascade,
        foreign key (ProductID) references Products (ProductID)
            on update cascade on delete cascade
);
Sales
original_column_name,column_name,column_description,data_format,value_description
EmployeeID,Employee ID,the unique id of the employee,integer,
FirstName,First Name,the employee's first name,text,
MiddleInitial,Middle Initial,the employee's middle initial ,text,
LastName,Last Name,the employee's last name,text,
Employees
original_column_name,column_name,column_description,data_format,value_description
SalesID,Sales ID,the unique id of the sales,integer,
SalesPersonID,SalesPerson ID,the unique id of the sale person,integer,
CustomerID,Customer ID,the unique id of the customer,integer,
ProductID,Product ID,the unique id of the product,integer,
Quantity,,trading quantity,integer,"commonsense evidence:
total price = quantity x Products' Price"
Sales
original_column_name,column_name,column_description,data_format,value_description
CustomerID,Customer ID,the unique id of the customer,integer,
FirstName,First Name,the customer's first name,text,
MiddleInitial,Middle Initial,the customer's middle initial ,text,
LastName,Last Name,the customer's last name,text,
Customers
original_column_name,column_name,column_description,data_format,value_description
ProductID,Product ID,the unique id of the product,integer,
Name,,the product name,text,
Price,,the price of the product,real,"unit price
commonsense evidence:
if the price = 0.0, it means this product is free or a gift"
Products