Interest in //Web //Win //Mobile //Database & //Life

Sql Server Database File Using Visual Studio 2015

Check out the beginners level tutorial video on, how to create Sql Server database file using Visual Studio 2015.  This database file consists of two tables with a Primary Key, Foreign Key relationship between them.

Scripts to create the tables are given at the end of the post. Thank You.

You Tube

Vimeo

https://vimeo.com/161350101

 

 

CREATE TABLE [dbo].[Department] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Title] NVARCHAR (50) NOT NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
);

CREATE TABLE [dbo].[Employee] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Name] VARCHAR (MAX) NOT NULL,
[DeptId] INT NOT NULL,
PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_Employee_Department] FOREIGN KEY ([DeptId]) REFERENCES [dbo].[Department] ([Id])
);

 

DatabaseSql ServerVisual Studio

Md Shiefuzzaman • April 3, 2016


Previous Post

Next Post

Leave a Reply

Your email address will not be published / Required fields are marked *