USE [moviescope]
GO
/****** Object:  Table [dbo].[Comments]    Script Date: 20-Dec-17 11:53:09 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Comments](
	[commentId] [int] IDENTITY(1,1) NOT NULL,
	[userId] [int] NULL,
	[comment] [nvarchar](max) NULL,
	[time] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[CustomerLogin]    Script Date: 20-Dec-17 11:53:09 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Movie_Details](
	[srno] [int] IDENTITY(1,1) NOT NULL,
	[movie_title] [nvarchar](50) NULL,
	[movie_director] [nvarchar](50) NULL,
	[movie_stars] [nvarchar](max) NULL,
	[movie_budget] [nvarchar](50) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Offices]    Script Date: 20-Dec-17 11:53:09 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Offices](
	[officeCode] [varchar](10) NOT NULL,
	[city] [varchar](50) NOT NULL,
	[phone] [varchar](50) NOT NULL,
	[addressLine1] [varchar](50) NOT NULL,
	[addressLine2] [varchar](50) NULL,
	[state] [varchar](50) NULL,
	[country] [varchar](50) NOT NULL,
	[postalCode] [varchar](15) NOT NULL,
	[territory] [varchar](10) NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[officeCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[OrderDetails]    Script Date: 20-Dec-17 11:53:09 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OrderDetails](
	[orderNumber] [int] NOT NULL,
	[productCode] [varchar](15) NOT NULL,
	[productDesc] [varchar](100) NOT NULL,
	[quantityOrdered] [int] NOT NULL,
	[priceEach] [decimal](18, 2) NOT NULL,
	[orderLineNumber] [smallint] NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[orderNumber] ASC,
	[productCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[OrderDetails1]    Script Date: 20-Dec-17 11:53:09 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OrderDetails1](
	[orderId] [int] IDENTITY(1,1) NOT NULL,
	[orderNumber] [varchar](15) NOT NULL,
	[productCode] [varchar](15) NOT NULL,
	[productDesc] [varchar](100) NOT NULL,
	[quantityOrdered] [int] NOT NULL,
	[priceEach] [decimal](18, 2) NOT NULL,
	[orderLineNumber] [smallint] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Orders]    Script Date: 20-Dec-17 11:53:09 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Orders](
	[orderNumber] [int] IDENTITY(1,1) NOT NULL,
	[orderDate] [datetime] NOT NULL,
	[requiredDate] [datetime] NOT NULL,
	[shippedDate] [datetime] NULL,
	[status] [varchar](15) NOT NULL,
	[comments] [text] NULL,
	[customerNumber] [int] NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[orderNumber] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Orders1]    Script Date: 20-Dec-17 11:53:09 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Orders1](
	[orderId] [int] IDENTITY(1,1) NOT NULL,
	[orderNumber] [varchar](20) NOT NULL,
	[orderDate] [datetime] NOT NULL,
	[requiredDate] [datetime] NOT NULL,
	[shippedDate] [datetime] NULL,
	[status] [varchar](15) NOT NULL,
	[comments] [text] NULL,
	[customerNumber] [int] NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[orderNumber] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[tblContact]    Script Date: 20-Dec-17 11:53:09 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblContact](
	[Contact_id] [int] IDENTITY(1,1) NOT NULL,
	[Contact_name] [nvarchar](50) NULL,
	[Contact_msg] [nvarchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[User_Login]    Script Date: 20-Dec-17 11:53:09 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[User_Profile](
	[Uid] [int] NOT NULL,
	[username] [nvarchar](50) NULL,
	[firstname] [nvarchar](50) NULL,
	[lastname] [nvarchar](50) NULL,
	[email] [nvarchar](50) NULL,
	[gender] [nvarchar](50) NULL,
	[dateofbirth] [nvarchar](50) NOT NULL,
	[age] [int] NULL,
	[address] [nvarchar](max) NULL,
	[contactnumber] [nvarchar](50) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
