Курсовая работа: База даних клієнтів і замовлень
[product_type_code] CHAR (15) NOT NULL,
[supplier_code] VARCHAR (15) NOT NULL,
[product_price] MONEY,
[book_isbn] CHAR (15),
[book_author] VARCHAR (40),
[book_publication_date] DATETIME,
[book_title] VARCHAR (255),
[book_price] SMALLMONEY,
[food_contains_yn] CHAR (1),
[food_name] VARCHAR (80),
[food_description] VARCHAR (255),
[food_flavor] VARCHAR (80),
[food_ingredients] VARCHAR (255),
[other_product_details] VARCHAR (255),
CONSTRAINT [PK_Products] PRIMARY KEY ([product_id])
Створення таблиці Ref_Product_Types
CREATE TABLE [Ref_Product_Types] (
[product_type_code] CHAR (15) NOT NULL,
[level_number] INTEGER,
[parent_product_type_code] CHAR (15),
[product_type_description] VARCHAR (80),
CONSTRAINT [PK_Ref_Product_Types] PRIMARY KEY ([product_type_code]))
Створення таблиці Customers
CREATE TABLE [Customers] (
[customer_id] INTEGER IDENTITY (1,1) NOT NULL,
[first_name] VARCHAR (80),
[middle_name] VARCHAR (80),
[last_name] VARCHAR (80),
[customer_phone] VARCHAR (80),