Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USE [master]
- GO
- /****** Object: Database [StudentDatabase] Script Date: 2019-09-20 15:05:49 ******/
- CREATE DATABASE [StudentDatabase]
- ALTER DATABASE [StudentDatabase] SET COMPATIBILITY_LEVEL = 140
- GO
- IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
- begin
- EXEC [StudentDatabase].[dbo].[sp_fulltext_database] @action = 'enable'
- end
- GO
- ALTER DATABASE [StudentDatabase] SET ANSI_NULL_DEFAULT OFF
- GO
- ALTER DATABASE [StudentDatabase] SET ANSI_NULLS OFF
- GO
- ALTER DATABASE [StudentDatabase] SET ANSI_PADDING OFF
- GO
- ALTER DATABASE [StudentDatabase] SET ANSI_WARNINGS OFF
- GO
- ALTER DATABASE [StudentDatabase] SET ARITHABORT OFF
- GO
- ALTER DATABASE [StudentDatabase] SET AUTO_CLOSE OFF
- GO
- ALTER DATABASE [StudentDatabase] SET AUTO_SHRINK OFF
- GO
- ALTER DATABASE [StudentDatabase] SET AUTO_UPDATE_STATISTICS ON
- GO
- ALTER DATABASE [StudentDatabase] SET CURSOR_CLOSE_ON_COMMIT OFF
- GO
- ALTER DATABASE [StudentDatabase] SET CURSOR_DEFAULT GLOBAL
- GO
- ALTER DATABASE [StudentDatabase] SET CONCAT_NULL_YIELDS_NULL OFF
- GO
- ALTER DATABASE [StudentDatabase] SET NUMERIC_ROUNDABORT OFF
- GO
- ALTER DATABASE [StudentDatabase] SET QUOTED_IDENTIFIER OFF
- GO
- ALTER DATABASE [StudentDatabase] SET RECURSIVE_TRIGGERS OFF
- GO
- ALTER DATABASE [StudentDatabase] SET DISABLE_BROKER
- GO
- ALTER DATABASE [StudentDatabase] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
- GO
- ALTER DATABASE [StudentDatabase] SET DATE_CORRELATION_OPTIMIZATION OFF
- GO
- ALTER DATABASE [StudentDatabase] SET TRUSTWORTHY OFF
- GO
- ALTER DATABASE [StudentDatabase] SET ALLOW_SNAPSHOT_ISOLATION OFF
- GO
- ALTER DATABASE [StudentDatabase] SET PARAMETERIZATION SIMPLE
- GO
- ALTER DATABASE [StudentDatabase] SET READ_COMMITTED_SNAPSHOT OFF
- GO
- ALTER DATABASE [StudentDatabase] SET HONOR_BROKER_PRIORITY OFF
- GO
- ALTER DATABASE [StudentDatabase] SET RECOVERY FULL
- GO
- ALTER DATABASE [StudentDatabase] SET MULTI_USER
- GO
- ALTER DATABASE [StudentDatabase] SET PAGE_VERIFY CHECKSUM
- GO
- ALTER DATABASE [StudentDatabase] SET DB_CHAINING OFF
- GO
- ALTER DATABASE [StudentDatabase] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
- GO
- ALTER DATABASE [StudentDatabase] SET TARGET_RECOVERY_TIME = 60 SECONDS
- GO
- ALTER DATABASE [StudentDatabase] SET DELAYED_DURABILITY = DISABLED
- GO
- ALTER DATABASE [StudentDatabase] SET QUERY_STORE = OFF
- GO
- USE [StudentDatabase]
- GO
- /****** Object: Table [dbo].[Course] Script Date: 2019-09-20 15:05:49 ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Course](
- [courseID] [nchar](10) NOT NULL,
- [credits] [nchar](10) NOT NULL,
- [name] [nchar](10) NOT NULL,
- CONSTRAINT [PK_Course] PRIMARY KEY CLUSTERED
- (
- [courseID] 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
- /****** Object: Table [dbo].[HasStudied] Script Date: 2019-09-20 15:05:49 ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[HasStudied](
- [ssn] [nchar](10) NOT NULL,
- [courseID] [nchar](10) NOT NULL,
- [grade] [nchar](10) NOT NULL
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Student] Script Date: 2019-09-20 15:05:49 ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Student](
- [ssn] [nchar](10) NOT NULL,
- [name] [nchar](10) NOT NULL,
- [address] [nchar](10) NOT NULL,
- CONSTRAINT [PK_Student] PRIMARY KEY CLUSTERED
- (
- [ssn] 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
- ALTER TABLE [dbo].[HasStudied] WITH CHECK ADD CONSTRAINT [FK_HasStudied_Course] FOREIGN KEY([courseID])
- REFERENCES [dbo].[Course] ([courseID])
- GO
- ALTER TABLE [dbo].[HasStudied] CHECK CONSTRAINT [FK_HasStudied_Course]
- GO
- ALTER TABLE [dbo].[HasStudied] WITH CHECK ADD CONSTRAINT [FK_HasStudied_Student] FOREIGN KEY([ssn])
- REFERENCES [dbo].[Student] ([ssn])
- GO
- ALTER TABLE [dbo].[HasStudied] CHECK CONSTRAINT [FK_HasStudied_Student]
- GO
- USE [master]
- GO
- ALTER DATABASE [StudentDatabase] SET READ_WRITE
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement