-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDatabaseInitScript.sql
More file actions
47 lines (40 loc) · 836 Bytes
/
DatabaseInitScript.sql
File metadata and controls
47 lines (40 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
drop database if exists Dominion
create database Dominion
use Dominion
drop table if exists Users
create table Users
(
UserID int primary key,
UserName varchar(15),
FirstName nvarchar(30),
LastName nvarchar(30),
OrgID int,
AuthLevel int
)
drop table if exists StockList
create table StockList
(
StockID int primary key,
ItemName nvarchar(100),
ImagePath nvarchar(500),
OrgID int
)
drop table if exists Requests
create table Requests
(
ReqID int primary key,
UserID int foreign key references Users(UserID),
OrgID int,
StockID int foreign key references StockList(StockID),
ReqDesc nvarchar(100),
ReqItems nvarchar(500),
ReqStatus nvarchar(100)
)
drop table if exists Inventory
create table Inventory
(
StockID int foreign key references StockList(StockID),
ItemName nvarchar(100),
Quantity int,
OrgID int,
)