USE [master]
GO
/****** Object:  Database [ALLARD_ILL]    Script Date: 2018-11-14 11:52:54 PM ******/
CREATE DATABASE [ALLARD_ILL]
 CONTAINMENT = NONE
 ON  PRIMARY 
( NAME = N'ALLARD_ILL', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\ALLARD_ILL.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB )
 LOG ON 
( NAME = N'ALLARD_ILL_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\ALLARD_ILL_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB )
GO
ALTER DATABASE [ALLARD_ILL] SET COMPATIBILITY_LEVEL = 140
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [ALLARD_ILL].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [ALLARD_ILL] SET ANSI_NULL_DEFAULT OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET ANSI_NULLS OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET ANSI_PADDING OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET ANSI_WARNINGS OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET ARITHABORT OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET AUTO_CLOSE ON 
GO
ALTER DATABASE [ALLARD_ILL] SET AUTO_SHRINK OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET AUTO_UPDATE_STATISTICS ON 
GO
ALTER DATABASE [ALLARD_ILL] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET CURSOR_DEFAULT  GLOBAL 
GO
ALTER DATABASE [ALLARD_ILL] SET CONCAT_NULL_YIELDS_NULL OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET NUMERIC_ROUNDABORT OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET QUOTED_IDENTIFIER OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET RECURSIVE_TRIGGERS OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET  ENABLE_BROKER 
GO
ALTER DATABASE [ALLARD_ILL] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET TRUSTWORTHY OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET PARAMETERIZATION SIMPLE 
GO
ALTER DATABASE [ALLARD_ILL] SET READ_COMMITTED_SNAPSHOT OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET HONOR_BROKER_PRIORITY OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET RECOVERY SIMPLE 
GO
ALTER DATABASE [ALLARD_ILL] SET  MULTI_USER 
GO
ALTER DATABASE [ALLARD_ILL] SET PAGE_VERIFY CHECKSUM  
GO
ALTER DATABASE [ALLARD_ILL] SET DB_CHAINING OFF 
GO
ALTER DATABASE [ALLARD_ILL] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF ) 
GO
ALTER DATABASE [ALLARD_ILL] SET TARGET_RECOVERY_TIME = 60 SECONDS 
GO
ALTER DATABASE [ALLARD_ILL] SET DELAYED_DURABILITY = DISABLED 
GO
ALTER DATABASE [ALLARD_ILL] SET QUERY_STORE = OFF
GO
USE [ALLARD_ILL]
GO
/****** Object:  Table [dbo].[BOOK]    Script Date: 2018-11-14 11:53:00 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BOOK](
	[BK_ISBN] [char](15) NOT NULL,
	[BK_TITLE] [varchar](30) NOT NULL,
	[BK_AUTHOR] [varchar](25) NOT NULL,
	[BK_PUBLISHER] [varchar](25) NOT NULL,
	[BK_PUB_YEAR] [varchar](25) NULL,
	[BK_LC_SUBJECT] [varchar](25) NOT NULL,
	[BK_PHYS_DESC] [varchar](35) NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[BK_ISBN] 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].[CATALOGUE]    Script Date: 2018-11-14 11:53:02 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CATALOGUE](
	[CAT_CODE] [char](10) NOT NULL,
	[JO_ISSN] [bigint] NULL,
	[BK_ISBN] [bigint] NULL,
	[CAT_TITLE] [varchar](25) NULL,
	[CAT_AUTHORITY] [varchar](25) NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[CAT_CODE] 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].[JOURNAL_ITEM]    Script Date: 2018-11-14 11:53:03 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[JOURNAL_ITEM](
	[JO_ISSN] [char](20) NOT NULL,
	[JO_TITLE] [varchar](50) NOT NULL,
	[JO_ARTICLE_DOI] [varchar](35) NOT NULL,
	[JO_ARTICLE_AUTHOR] [varchar](35) NOT NULL,
	[JO_ARTICLE_TITLE] [varchar](50) NOT NULL,
	[JO_PUB_YEAR] [date] NOT NULL,
	[JO_VOLUME] [int] NOT NULL,
	[JO_ISSUE] [int] NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[JO_ISSN] 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].[PATRON]    Script Date: 2018-11-14 11:53:04 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PATRON](
	[PAT_ID] [int] NOT NULL,
	[PAT_LNAME] [varchar](25) NOT NULL,
	[PAT_FNAME] [varchar](25) NOT NULL,
	[PAT_CAMP] [varchar](15) NOT NULL,
	[PAT_EMAIL] [varchar](30) NOT NULL,
	[PAT_DELMETHOD] [varchar](15) NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[PAT_ID] 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].[REQUEST]    Script Date: 2018-11-14 11:53:04 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[REQUEST](
	[JO_ISSN] [char](20) NOT NULL,
	[BK_ISBN] [char](15) NOT NULL,
	[PAT_ID] [int] NOT NULL,
	[STF_ID] [int] NOT NULL,
	[REQ_CANCEL] [varchar](10) NOT NULL,
	[REQ_DUE_DATE] [date] NULL,
	[REQ_STATUS] [varchar](15) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[STAFF]    Script Date: 2018-11-14 11:53:05 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[STAFF](
	[STF_ID] [int] NOT NULL,
	[STF_LNAME] [varchar](25) NOT NULL,
	[STF_FNAME] [varchar](25) NOT NULL,
	[STF_TITLE] [varchar](25) NULL,
	[STF_STATUS] [varchar](25) NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[STF_ID] 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
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'-188007710     ', N'Family Law', N'Jonathan Herring', N'Willan Publishing', N'2001-04-08', N'KB531-619', N'Leather bound edition')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'-87845         ', N'Common Law Marriage', N'Goran Lind', N'Oxford University Press', N'2008-01-11', N'K3224-3278', N'include commentary')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'-9008007731    ', N'Environmental Law', N'Staurt Bell', N'Oxford University Press', N'2008-02-04', N'K3581-(3598)', N'Eigth edition')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'-928859        ', N'International Climate Law', N'Daniel Bodansky', N'Oxford University Press', N'2017-01-17', N'K5000-5582', N'Revised edition')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'-990086531     ', N'Criminal Law in Canada', N'S. N Verdun-Jones', N'Nelson Education', N'2007-08-07', N'K5000-5582', N'Sixth edition')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'1000811081     ', N'Aboriginal Law', N'Thomas Isaac', N'Purich Publication', N'2012-11-10', N'KB524-530 ', N'31 cm (fol.)')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'1111077121     ', N'Cnstitutional Law of Canada', N'Peter Hogg', N'Carswell Publication', N'1992-08-06', N'K3154-3370', N'441 (pages) Hardcover')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'119            ', N'Climate Change and the Law', N'Errki J Hollo', N'Springer Publication', N'2013-11-07', N'K5000-5582', N'Sixth edition')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'92314111081    ', N'Civil Litigation Process', N'Janet Walker', N'Emond Montgomery Ltd', N'2001-07-02', N'KP7702-K31', N'[4],CXXII Leaves')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'9231434468777  ', N'Criminal Law', N'Bob Wiesberg', N'Aspen Publishers', N'2017-05-19', N'Kf9219-k35', N'Bound copy')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'9780888041708  ', N'Divorce Act Manual', N'Terri Hainesworth', N'Canada Law Inc', N'1998-09-01', N'K670-709', N'Edition n#  missing')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'978141168865   ', N'Canadian Business Law', N'Laurence Olivo', N'Elmond Publishing', N'2017-02-01', N'K7550-7582', N'Bound copy')
INSERT [dbo].[BOOK] ([BK_ISBN], [BK_TITLE], [BK_AUTHOR], [BK_PUBLISHER], [BK_PUB_YEAR], [BK_LC_SUBJECT], [BK_PHYS_DESC]) VALUES (N'9781552210864  ', N'Maritime Law', N'Edger Gold', N'Irwin Law Press', N'2007-12-04', N'K1150-1231', N'length 908 pages')
INSERT [dbo].[CATALOGUE] ([CAT_CODE], [JO_ISSN], [BK_ISBN], [CAT_TITLE], [CAT_AUTHORITY]) VALUES (N'k1024     ', 197326534, 978141168865, N'Law and society', N'LCCSH')
INSERT [dbo].[CATALOGUE] ([CAT_CODE], [JO_ISSN], [BK_ISBN], [CAT_TITLE], [CAT_AUTHORITY]) VALUES (N'K1701-1841', 771100001, 9781552210864, N'Labour Law', N'LCSH')
INSERT [dbo].[CATALOGUE] ([CAT_CODE], [JO_ISSN], [BK_ISBN], [CAT_TITLE], [CAT_AUTHORITY]) VALUES (N'K2390     ', 2110113303, 92314111081, N'Law & globalization', N'LCCSH')
INSERT [dbo].[CATALOGUE] ([CAT_CODE], [JO_ISSN], [BK_ISBN], [CAT_TITLE], [CAT_AUTHORITY]) VALUES (N'K3150     ', 88108001101, 9781552210864, N'Common Law Marriage', N'LCSH')
INSERT [dbo].[CATALOGUE] ([CAT_CODE], [JO_ISSN], [BK_ISBN], [CAT_TITLE], [CAT_AUTHORITY]) VALUES (N'K3169     ', 100642211, 9231434468777, N'Law & social problems', N'LCSH')
INSERT [dbo].[CATALOGUE] ([CAT_CODE], [JO_ISSN], [BK_ISBN], [CAT_TITLE], [CAT_AUTHORITY]) VALUES (N'K3201     ', 300771111, 9780888041708, N'Environmental Law', N'LCSH')
INSERT [dbo].[CATALOGUE] ([CAT_CODE], [JO_ISSN], [BK_ISBN], [CAT_TITLE], [CAT_AUTHORITY]) VALUES (N'K3375     ', 300771111, -9008007731, N'Colonial Law', N'LCSH')
INSERT [dbo].[CATALOGUE] ([CAT_CODE], [JO_ISSN], [BK_ISBN], [CAT_TITLE], [CAT_AUTHORITY]) VALUES (N'K3400-3431', 22000102882, -990086531, N'Administrative Law', N'LCSH')
INSERT [dbo].[CATALOGUE] ([CAT_CODE], [JO_ISSN], [BK_ISBN], [CAT_TITLE], [CAT_AUTHORITY]) VALUES (N'K7340-7512', 88108001101, 1000811081, N'Commercial Law', N'LCSH')
INSERT [dbo].[CATALOGUE] ([CAT_CODE], [JO_ISSN], [BK_ISBN], [CAT_TITLE], [CAT_AUTHORITY]) VALUES (N'K840-917  ', 771100001, 92314111081, N'Labour Law', N'LCSH')
INSERT [dbo].[JOURNAL_ITEM] ([JO_ISSN], [JO_TITLE], [JO_ARTICLE_DOI], [JO_ARTICLE_AUTHOR], [JO_ARTICLE_TITLE], [JO_PUB_YEAR], [JO_VOLUME], [JO_ISSUE]) VALUES (N'100020111           ', N'Commonwealth Law Journal', N'http://doi.org/22.312/ge.cajs', N'Sir Peter Proudfoote', N'Royal Perogative in the Colonialism Era', CAST(N'2001-01-01' AS Date), 16, 3)
INSERT [dbo].[JOURNAL_ITEM] ([JO_ISSN], [JO_TITLE], [JO_ARTICLE_DOI], [JO_ARTICLE_AUTHOR], [JO_ARTICLE_TITLE], [JO_PUB_YEAR], [JO_VOLUME], [JO_ISSUE]) VALUES (N'100642211           ', N'Law and Policy', N'doi:00017000/0000', N'Greg Davidson', N'Advancing the Concept of Freedom in Aboriginal Law', CAST(N'2002-01-01' AS Date), 3, 11)
INSERT [dbo].[JOURNAL_ITEM] ([JO_ISSN], [JO_TITLE], [JO_ARTICLE_DOI], [JO_ARTICLE_AUTHOR], [JO_ARTICLE_TITLE], [JO_PUB_YEAR], [JO_VOLUME], [JO_ISSUE]) VALUES (N'101641212           ', N'Journal of Intellectual Property Law', N'http://doi.org/10.1016/j.appdev', N'Mark Strange', N'Real Estate Taxes in Rural Canada', CAST(N'1991-01-01' AS Date), 17, 4)
INSERT [dbo].[JOURNAL_ITEM] ([JO_ISSN], [JO_TITLE], [JO_ARTICLE_DOI], [JO_ARTICLE_AUTHOR], [JO_ARTICLE_TITLE], [JO_PUB_YEAR], [JO_VOLUME], [JO_ISSUE]) VALUES (N'197326534           ', N'Law and International Relations', N'doi:112100-710198', N'MaryAnne Mastrantonio', N'The Rights of Women and Children during Conflict', CAST(N'1997-01-01' AS Date), 10, 11)
INSERT [dbo].[JOURNAL_ITEM] ([JO_ISSN], [JO_TITLE], [JO_ARTICLE_DOI], [JO_ARTICLE_AUTHOR], [JO_ARTICLE_TITLE], [JO_PUB_YEAR], [JO_VOLUME], [JO_ISSUE]) VALUES (N'2110113303          ', N'Harvard Law Review', N'doi:011198/00011', N'Ibrahim Gorzaganian', N'Election Reform Laws in the Deep South', CAST(N'1981-01-01' AS Date), 23, 10)
INSERT [dbo].[JOURNAL_ITEM] ([JO_ISSN], [JO_TITLE], [JO_ARTICLE_DOI], [JO_ARTICLE_AUTHOR], [JO_ARTICLE_TITLE], [JO_PUB_YEAR], [JO_VOLUME], [JO_ISSUE]) VALUES (N'22000102882         ', N'Journal of Family Law', N'doi:00001/111001', N'Nelson Bergen', N'Spousal Protection under the First Amendment', CAST(N'2007-01-01' AS Date), 9, 12)
INSERT [dbo].[JOURNAL_ITEM] ([JO_ISSN], [JO_TITLE], [JO_ARTICLE_DOI], [JO_ARTICLE_AUTHOR], [JO_ARTICLE_TITLE], [JO_PUB_YEAR], [JO_VOLUME], [JO_ISSUE]) VALUES (N'300771111           ', N'Journal of Legal Studies', N'http://doi.org/00.7681/pa.tensk', N'Bill Mathhews', N'The Paralegal Practioner', CAST(N'2002-01-01' AS Date), 6, 19)
INSERT [dbo].[JOURNAL_ITEM] ([JO_ISSN], [JO_TITLE], [JO_ARTICLE_DOI], [JO_ARTICLE_AUTHOR], [JO_ARTICLE_TITLE], [JO_PUB_YEAR], [JO_VOLUME], [JO_ISSUE]) VALUES (N'7000012121          ', N'Chicago Law Review', N'http://doi.org/00.123/je.stgh', N'Zakaria Abounemah', N'Implementing Sharia in Anarchic Post-Saddam Iraq', CAST(N'2016-01-01' AS Date), 17, 8)
INSERT [dbo].[JOURNAL_ITEM] ([JO_ISSN], [JO_TITLE], [JO_ARTICLE_DOI], [JO_ARTICLE_AUTHOR], [JO_ARTICLE_TITLE], [JO_PUB_YEAR], [JO_VOLUME], [JO_ISSUE]) VALUES (N'771100001           ', N'Journal of International Law', N'doi:00017/20012', N'Celine Buroows', N'War Criimes in Baghdad and Kabul', CAST(N'2005-01-01' AS Date), 23, 8)
INSERT [dbo].[JOURNAL_ITEM] ([JO_ISSN], [JO_TITLE], [JO_ARTICLE_DOI], [JO_ARTICLE_AUTHOR], [JO_ARTICLE_TITLE], [JO_PUB_YEAR], [JO_VOLUME], [JO_ISSUE]) VALUES (N'88108001101         ', N'African Law Journal', N'http://doi.org/91.4410/ba.iogs', N'Aloune Diaby', N'Colonial Legacies in African Jurisprudence', CAST(N'1977-01-01' AS Date), 10, 9)
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (108663, N'Milko', N'John', N'Point-Grey', N'jmilko@aol.com', N'Express')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (109981, N'Dragon', N'Malchus', N'Okanagan', N'dmalchus@gmail.com', N'Express')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (1000791, N'Chang', N'Willis', N'Okanagan', N'willchng@outlook.com', N'Walk-in')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (1001101, N'Zhue', N'Zaopeng', N'Okanagan', N'zzpng@gmain.com', N'Standard')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (1002011, N'Milton', N'Okafor-Ifienyi', N'Okanagan', N'milt20@yahoo.com', N'Standard')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (1002379, N'Alakijah', N'Yemisola', N'Point-Grey', N'alak3191@hotmail.com', N'Standard')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (1011791, N'Konate', N'Freddie', N'Okanagan', N'fkog@outlook.com', N'Walk-in')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (1012244, N'Binchi', N'Maeve', N'Point-Grey', N'mbinchi@gmail.com', N'Home delivery')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (1018234, N'Balchus', N'Mark', N'Point Grey', N'mbalchus44@gmail.com', N'Express Pickup')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (1019998, N'Gorbah', N'Nahdu', N'Point-Grey', N'gornard1@gmail.com', N'Standard Pickup')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (1025443, N'DiMarco', N'Christine', N'Okanagan', N'c4dmarc@yahoo.com', N'Home Deliver')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (1033644, N'Diarra', N'Amansouba', N'Okanagan', N'aman3g@yahoo.com', N'Walk-in')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (1099631, N'Mahmoud', N'Abass', N'Point-Grey', N'mabass2@outlook.com', N'Walk-in')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (10009004, N'Davis', N'Miranda', N'Point-Grey', N'mira32@yahoo.com', N'Walk-in')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (10009074, N'Adekumi', N'Nathaniel', N'Point-Grey', N'adkun233@yahoo.com', N'Express')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (10022914, N'Khaled', N'Leila', N'Point-Grey', N'lilyka2@yahoo.com', N'Standard')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (10179156, N'Linxing', N'Jiang', N'Point-Grey', N'jLinxin2HG@weibos.com', N'Express Pickup')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (10287133, N'Mohamadhi', N'Faisal', N'Okanagan', N'fmohamedi@gmail.com', N'Home Deliver')
INSERT [dbo].[PATRON] ([PAT_ID], [PAT_LNAME], [PAT_FNAME], [PAT_CAMP], [PAT_EMAIL], [PAT_DELMETHOD]) VALUES (10917761, N'Nkiru', N'Jumbo', N'Point-Grey', N'nkru@gmail.com', N'Parcel')
INSERT [dbo].[REQUEST] ([JO_ISSN], [BK_ISBN], [PAT_ID], [STF_ID], [REQ_CANCEL], [REQ_DUE_DATE], [REQ_STATUS]) VALUES (N'100020111           ', N'-188007710     ', 108663, 1100, N'NA', CAST(N'2018-11-17' AS Date), N'PENDING')
INSERT [dbo].[REQUEST] ([JO_ISSN], [BK_ISBN], [PAT_ID], [STF_ID], [REQ_CANCEL], [REQ_DUE_DATE], [REQ_STATUS]) VALUES (N'101641212           ', N'-990086531     ', 109981, 1101, N'NA', CAST(N'2018-11-15' AS Date), N'PENDING')
INSERT [dbo].[REQUEST] ([JO_ISSN], [BK_ISBN], [PAT_ID], [STF_ID], [REQ_CANCEL], [REQ_DUE_DATE], [REQ_STATUS]) VALUES (N'197326534           ', N'1000811081     ', 1000791, 1102, N'NA', CAST(N'2018-11-15' AS Date), N'APPROVED')
INSERT [dbo].[REQUEST] ([JO_ISSN], [BK_ISBN], [PAT_ID], [STF_ID], [REQ_CANCEL], [REQ_DUE_DATE], [REQ_STATUS]) VALUES (N'2110113303          ', N'1111077121     ', 1001101, 1103, N'NA', CAST(N'2018-11-11' AS Date), N'REJECTED')
INSERT [dbo].[REQUEST] ([JO_ISSN], [BK_ISBN], [PAT_ID], [STF_ID], [REQ_CANCEL], [REQ_DUE_DATE], [REQ_STATUS]) VALUES (N'22000102882         ', N'92314111081    ', 1002011, 1104, N'NA', CAST(N'2018-11-02' AS Date), N'REJECTED')
INSERT [dbo].[REQUEST] ([JO_ISSN], [BK_ISBN], [PAT_ID], [STF_ID], [REQ_CANCEL], [REQ_DUE_DATE], [REQ_STATUS]) VALUES (N'300771111           ', N'9231434468777  ', 1002379, 1105, N'NA', CAST(N'2018-11-02' AS Date), N'DELAYED')
INSERT [dbo].[REQUEST] ([JO_ISSN], [BK_ISBN], [PAT_ID], [STF_ID], [REQ_CANCEL], [REQ_DUE_DATE], [REQ_STATUS]) VALUES (N'7000012121          ', N'9780888041708  ', 1011791, 1106, N'NA', CAST(N'2018-12-01' AS Date), N'DELAYED')
INSERT [dbo].[REQUEST] ([JO_ISSN], [BK_ISBN], [PAT_ID], [STF_ID], [REQ_CANCEL], [REQ_DUE_DATE], [REQ_STATUS]) VALUES (N'771100001           ', N'978141168865   ', 1012244, 1107, N'NA', CAST(N'2018-12-05' AS Date), N'APPROVED')
INSERT [dbo].[REQUEST] ([JO_ISSN], [BK_ISBN], [PAT_ID], [STF_ID], [REQ_CANCEL], [REQ_DUE_DATE], [REQ_STATUS]) VALUES (N'88108001101         ', N'9781552210864  ', 1018234, 1108, N'NA', CAST(N'2018-12-13' AS Date), N'APPROVED')
INSERT [dbo].[STAFF] ([STF_ID], [STF_LNAME], [STF_FNAME], [STF_TITLE], [STF_STATUS]) VALUES (1100, N'Burns', N'James', N'Reference Librarian', N'Full time')
INSERT [dbo].[STAFF] ([STF_ID], [STF_LNAME], [STF_FNAME], [STF_TITLE], [STF_STATUS]) VALUES (1101, N'Matthews', N'Ronald', N'Library Assistant', N'Full time')
INSERT [dbo].[STAFF] ([STF_ID], [STF_LNAME], [STF_FNAME], [STF_TITLE], [STF_STATUS]) VALUES (1102, N'Storridge', N'Mandy', N'Library Assistant', N'Full time')
INSERT [dbo].[STAFF] ([STF_ID], [STF_LNAME], [STF_FNAME], [STF_TITLE], [STF_STATUS]) VALUES (1103, N'Wu', N'Stacey', N'Library Assistant', N'On-call part time')
INSERT [dbo].[STAFF] ([STF_ID], [STF_LNAME], [STF_FNAME], [STF_TITLE], [STF_STATUS]) VALUES (1104, N'Chang', N'Abraham', N'Reference Assistant', N'On-call part time')
INSERT [dbo].[STAFF] ([STF_ID], [STF_LNAME], [STF_FNAME], [STF_TITLE], [STF_STATUS]) VALUES (1105, N'Sruthi', N'Neelam', N'Reference Assistant', N'On-call part time')
INSERT [dbo].[STAFF] ([STF_ID], [STF_LNAME], [STF_FNAME], [STF_TITLE], [STF_STATUS]) VALUES (1106, N'Ramirez', N'Ida', N'Cataloging Assistant', N'On-call part time')
INSERT [dbo].[STAFF] ([STF_ID], [STF_LNAME], [STF_FNAME], [STF_TITLE], [STF_STATUS]) VALUES (1107, N'Munoz', N'Adrienne', N'Interlibrary Liaison', N'Full time')
INSERT [dbo].[STAFF] ([STF_ID], [STF_LNAME], [STF_FNAME], [STF_TITLE], [STF_STATUS]) VALUES (1108, N'Khaled', N'Abunemah', N'Subject Liaison Librarian', N'Full time')
INSERT [dbo].[STAFF] ([STF_ID], [STF_LNAME], [STF_FNAME], [STF_TITLE], [STF_STATUS]) VALUES (1109, N'Almansouri', N'Habiba', N'Library Assistant', N'Part time')
INSERT [dbo].[STAFF] ([STF_ID], [STF_LNAME], [STF_FNAME], [STF_TITLE], [STF_STATUS]) VALUES (1110, N'Eghosa', N'Johnny', N'Library Assistant', N'On-call Part time')
SET ANSI_PADDING ON
GO
/****** Object:  Index [UQ__BOOK__B97F494CDD457B67]    Script Date: 2018-11-14 11:53:07 PM ******/
ALTER TABLE [dbo].[BOOK] ADD UNIQUE NONCLUSTERED 
(
	[BK_ISBN] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object:  Index [UQ__CATALOGU__F82BD23755869D8C]    Script Date: 2018-11-14 11:53:07 PM ******/
ALTER TABLE [dbo].[CATALOGUE] ADD UNIQUE NONCLUSTERED 
(
	[CAT_CODE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object:  Index [UQ__JOURNAL___D5AFC9517C037EAE]    Script Date: 2018-11-14 11:53:07 PM ******/
ALTER TABLE [dbo].[JOURNAL_ITEM] ADD UNIQUE NONCLUSTERED 
(
	[JO_ISSN] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Index [UQ__PATRON__E85F08803CABC2EC]    Script Date: 2018-11-14 11:53:07 PM ******/
ALTER TABLE [dbo].[PATRON] ADD UNIQUE NONCLUSTERED 
(
	[PAT_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Index [UQ__STAFF__F42C444083236D86]    Script Date: 2018-11-14 11:53:07 PM ******/
ALTER TABLE [dbo].[STAFF] ADD UNIQUE NONCLUSTERED 
(
	[STF_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
ALTER TABLE [dbo].[REQUEST]  WITH CHECK ADD FOREIGN KEY([BK_ISBN])
REFERENCES [dbo].[BOOK] ([BK_ISBN])
GO
ALTER TABLE [dbo].[REQUEST]  WITH CHECK ADD FOREIGN KEY([PAT_ID])
REFERENCES [dbo].[PATRON] ([PAT_ID])
GO
ALTER TABLE [dbo].[REQUEST]  WITH CHECK ADD FOREIGN KEY([JO_ISSN])
REFERENCES [dbo].[JOURNAL_ITEM] ([JO_ISSN])
GO
ALTER TABLE [dbo].[REQUEST]  WITH CHECK ADD FOREIGN KEY([STF_ID])
REFERENCES [dbo].[STAFF] ([STF_ID])
GO
USE [master]
GO
ALTER DATABASE [ALLARD_ILL] SET  READ_WRITE 
GO
