Question
Create a database called NorthwindTradersDB . Create the following tables in this database using SQL DDL commands. Make sure to name all table constraints. Create
Create a database called NorthwindTradersDB. Create the following tables in this database using SQL DDL commands. Make sure to name all table constraints.
Create the Category table. CategoryID will be the primary key column. It will also be an identity column with seed value of 100 and increment of 1. None of the columns allow null values.
Create the Employees table. EmpId will be the primary key column. It will also be an identity column with seed value of 400. None of the columns allow null values.
Create the InventoryTransactions table. TransactionID will be the primary column. It will also be an identity column with seed value of 700. CreatedDate column will be of data type datetime2(7). Comments column will be nvarchar while all other columns will be ints. None of the columns allow null values.
Create the Products table. ProductID will be the primary key column. It will also be an identity column with seed value 100. Discontinued column is a bit; StandardCost and ListPrice store currency; ReorderLevel, TargetLevel, and SupplierID will be ints; all other columns will be nvarchars.
Create the PurchaseOrderDetails table such that OderDetailID column is a primary key column and has seed value of 600. PostedToInventory will be datatype bit. Only PostedToInventory and InventoryID columns allow nulls values. Choose appropriate data types for the other columns.
Create table PurchaseOrders with PurchaseOrderID as the primary key column with seed value 500. Only ApprovedBy and ApprovedDate columns allow nulls. StatusId, ApprovedBy and EmpID are ints. Choose appropriate data types for the other columns.
Create the Suppliers table with SupplierID as the primary key with seed value of 300. Only BusinessPhone, City and State allow null values. Choose appropriate data types for the other columns.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started