Skip to content

Commit

Permalink
Create YANLIB.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
Tynab committed Jul 28, 2023
1 parent 6211930 commit 1c734e5
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions database/YANLIB.sql
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
);

0 comments on commit 1c734e5

Please sign in to comment.