-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
CREATE DATABASE YANLIB; | ||
|
||
USE YANLIB; | ||
|
||
CREATE SCHEMA sample; | ||
|
||
CREATE TABLE sample.DeveloperTypes | ||
( | ||
Code INT PRIMARY KEY NOT NULL, | ||
Name NVARCHAR(100) NOT NULL, | ||
IsActive BIT NOT NULL, | ||
CreatedDate DATETIME NOT NULL, | ||
ModifiedDate DATETIME | ||
); | ||
|
||
CREATE TABLE sample.Developers | ||
( | ||
Id VARCHAR(20) PRIMARY KEY NOT NULL, | ||
Name NVARCHAR(100) NOT NULL, | ||
Phone VARCHAR(20), | ||
IdCard VARCHAR(20) NOT NULL, | ||
DeveloperTypeCode INT NOT NULL, | ||
IsActive BIT NOT NULL, | ||
Version INT NOT NULL, | ||
CreatedDate DATETIME NOT NULL, | ||
ModifiedDate DATETIME, | ||
FOREIGN KEY (DeveloperTypeCode) REFERENCES sample.DeveloperTypes(Code) | ||
); | ||
|
||
CREATE TABLE sample.Certificates | ||
( | ||
Id VARCHAR(20) PRIMARY KEY NOT NULL, | ||
Name NVARCHAR(100) NOT NULL, | ||
GPA DOUBLE PRECISION, | ||
DeveloperId VARCHAR(20), | ||
CreatedDate DATETIME NOT NULL, | ||
ModifiedDate DATETIME | ||
); |