Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
164 lines (160 sloc) 6.03 KB
USE [master]
GO
/****** Object: Database [VitoshAcademyCom2] Script Date: 10/4/2016 12:41:28 AM ******/
CREATE DATABASE [VitoshAcademyCom2]
CONTAINMENT = NONE
-- ON PRIMARY
--( NAME = N'VitoshAcademyCom', FILENAME = N'C:\Users\gropc\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB\VitoshAcademyCom.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB )
-- LOG ON
--( NAME = N'VitoshAcademyCom_log', FILENAME = N'C:\Users\gropc\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB\VitoshAcademyCom.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB )
GO
ALTER DATABASE [VitoshAcademyCom2] SET COMPATIBILITY_LEVEL = 130
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [VitoshAcademyCom2].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [VitoshAcademyCom2] SET ANSI_NULL_DEFAULT ON
GO
ALTER DATABASE [VitoshAcademyCom2] SET ANSI_NULLS ON
GO
ALTER DATABASE [VitoshAcademyCom2] SET ANSI_PADDING ON
GO
ALTER DATABASE [VitoshAcademyCom2] SET ANSI_WARNINGS ON
GO
ALTER DATABASE [VitoshAcademyCom2] SET ARITHABORT ON
GO
ALTER DATABASE [VitoshAcademyCom2] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [VitoshAcademyCom2] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET CURSOR_DEFAULT LOCAL
GO
ALTER DATABASE [VitoshAcademyCom2] SET CONCAT_NULL_YIELDS_NULL ON
GO
ALTER DATABASE [VitoshAcademyCom2] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET QUOTED_IDENTIFIER ON
GO
ALTER DATABASE [VitoshAcademyCom2] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET DISABLE_BROKER
GO
ALTER DATABASE [VitoshAcademyCom2] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [VitoshAcademyCom2] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET RECOVERY FULL
GO
ALTER DATABASE [VitoshAcademyCom2] SET MULTI_USER
GO
ALTER DATABASE [VitoshAcademyCom2] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [VitoshAcademyCom2] SET DB_CHAINING OFF
GO
ALTER DATABASE [VitoshAcademyCom2] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
GO
ALTER DATABASE [VitoshAcademyCom2] SET TARGET_RECOVERY_TIME = 60 SECONDS
GO
ALTER DATABASE [VitoshAcademyCom2] SET DELAYED_DURABILITY = DISABLED
GO
ALTER DATABASE [VitoshAcademyCom2] SET QUERY_STORE = OFF
GO
USE [VitoshAcademyCom2]
GO
ALTER DATABASE SCOPED CONFIGURATION SET MAXDOP = 0;
GO
ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET MAXDOP = PRIMARY;
GO
ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION = OFF;
GO
ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET LEGACY_CARDINALITY_ESTIMATION = PRIMARY;
GO
ALTER DATABASE SCOPED CONFIGURATION SET PARAMETER_SNIFFING = ON;
GO
ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET PARAMETER_SNIFFING = PRIMARY;
GO
ALTER DATABASE SCOPED CONFIGURATION SET QUERY_OPTIMIZER_HOTFIXES = OFF;
GO
ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET QUERY_OPTIMIZER_HOTFIXES = PRIMARY;
GO
USE [VitoshAcademyCom2]
GO
/****** Object: Table [dbo].[CityInfo] Script Date: 10/4/2016 12:41:28 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CityInfo](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Boss] [nvarchar](50) NULL,
[City] [varchar](255) NULL,
CONSTRAINT [PK_CityInfo] PRIMARY KEY CLUSTERED
(
[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
SET ANSI_PADDING ON
GO
/****** Object: Table [dbo].[Footballers] Script Date: 10/4/2016 12:41:28 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Footballers](
[ID] [int] IDENTITY(1,1) NOT NULL,
[FirstName] [varchar](255) NOT NULL,
[LastName] [varchar](255) NULL,
[Club] [varchar](255) NULL,
[CityID] [int] NULL,
PRIMARY KEY CLUSTERED
(
[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
SET ANSI_PADDING ON
GO
SET IDENTITY_INSERT [dbo].[CityInfo] ON
INSERT [dbo].[CityInfo] ([ID], [Boss], [City]) VALUES (1, N'Vitosh', N'Sofia')
INSERT [dbo].[CityInfo] ([ID], [Boss], [City]) VALUES (2, N'Vityata', N'Plovdiv')
INSERT [dbo].[CityInfo] ([ID], [Boss], [City]) VALUES (3, N'Vito', N'Varna')
SET IDENTITY_INSERT [dbo].[CityInfo] OFF
SET IDENTITY_INSERT [dbo].[Footballers] ON
INSERT [dbo].[Footballers] ([ID], [FirstName], [LastName], [Club], [CityID]) VALUES (1, N'Peter', N'The Keeper', N'NorthClub', 1)
INSERT [dbo].[Footballers] ([ID], [FirstName], [LastName], [Club], [CityID]) VALUES (2, N'Ivan', N'Mitov', N'EastClub', 2)
INSERT [dbo].[Footballers] ([ID], [FirstName], [LastName], [Club], [CityID]) VALUES (3, N'Stoyan', N'Mitkov', N'EastClub', 3)
INSERT [dbo].[Footballers] ([ID], [FirstName], [LastName], [Club], [CityID]) VALUES (4, N'Vitosh', N'Doynov', N'EastClub', 1)
INSERT [dbo].[Footballers] ([ID], [FirstName], [LastName], [Club], [CityID]) VALUES (5, N'Pesho', N'Stoyanov', N'SouthClub', 3)
INSERT [dbo].[Footballers] ([ID], [FirstName], [LastName], [Club], [CityID]) VALUES (6, N'Gosho', N'Kiriyakov', N'SouthClub', 1)
INSERT [dbo].[Footballers] ([ID], [FirstName], [LastName], [Club], [CityID]) VALUES (7, N'Haralampi', N'Iliev', N'SouthClub', 1)
SET IDENTITY_INSERT [dbo].[Footballers] OFF
ALTER TABLE [dbo].[Footballers] WITH CHECK ADD CONSTRAINT [FK_Footballers_CityInfo] FOREIGN KEY([CityID])
REFERENCES [dbo].[CityInfo] ([ID])
GO
ALTER TABLE [dbo].[Footballers] CHECK CONSTRAINT [FK_Footballers_CityInfo]
GO
USE [master]
GO
ALTER DATABASE [VitoshAcademyCom2] SET READ_WRITE
GO
You can’t perform that action at this time.