order_example

Tables (5)

Customer

  • Id — int — Primary key — NOT NULL
  • FirstName — nvarchar(40) — NOT NULL
  • LastName — nvarchar(40) — NOT NULL
  • City — nvarchar(40)
  • Country — nvarchar(40)
  • Phone — nvarchar(20)
  • STATISTICS_NORECOMPUTE — =
  • IGNORE_DUP_KEY — =
  • ALLOW_ROW_LOCKS — =
  • ALLOW_PAGE_LOCKS — =
  • OPTIMIZE_FOR_SEQUENTIAL_KEY — =

OrderItem

  • Id — int — Primary key — NOT NULL
  • OrderId — int — Foreign key → _Order.Id — NOT NULL
  • ProductId — int — Foreign key → Product.Id — NOT NULL
  • UnitPrice — decimal(12, 2) — NOT NULL
  • Quantity — int — NOT NULL
  • STATISTICS_NORECOMPUTE — =
  • IGNORE_DUP_KEY — =
  • ALLOW_ROW_LOCKS — =
  • ALLOW_PAGE_LOCKS — =
  • OPTIMIZE_FOR_SEQUENTIAL_KEY — =

Product

  • Id — int — Primary key — NOT NULL
  • ProductName — nvarchar(50) — NOT NULL
  • SupplierId — int — Foreign key → Supplier.Id — NOT NULL
  • UnitPrice — decimal(12, 2)
  • Package — nvarchar(30)
  • IsDiscontinued — bit — NOT NULL
  • STATISTICS_NORECOMPUTE — =
  • IGNORE_DUP_KEY — =
  • ALLOW_ROW_LOCKS — =
  • ALLOW_PAGE_LOCKS — =
  • OPTIMIZE_FOR_SEQUENTIAL_KEY — =

Supplier

  • Id — int — Primary key — NOT NULL
  • CompanyName — nvarchar(40) — NOT NULL
  • ContactName — nvarchar(50)
  • ContactTitle — nvarchar(40)
  • City — nvarchar(40)
  • Country — nvarchar(40)
  • Phone — nvarchar(30)
  • Fax — nvarchar(30)
  • STATISTICS_NORECOMPUTE — =
  • IGNORE_DUP_KEY — =
  • ALLOW_ROW_LOCKS — =
  • ALLOW_PAGE_LOCKS — =
  • OPTIMIZE_FOR_SEQUENTIAL_KEY — =

_Order

  • Id — int — Primary key — NOT NULL
  • OrderDate — date — NOT NULL
  • OrderNumber — nvarchar(10)
  • CustomerId — int — Foreign key → Customer.Id — NOT NULL
  • TotalAmount — decimal(12, 2)
  • STATISTICS_NORECOMPUTE — =
  • IGNORE_DUP_KEY — =
  • ALLOW_ROW_LOCKS — =
  • ALLOW_PAGE_LOCKS — =
  • OPTIMIZE_FOR_SEQUENTIAL_KEY — =