diff --git a/sql/.vs/sql/v14/.ssms_suo b/sql/.vs/sql/v14/.ssms_suo new file mode 100644 index 0000000..a833eff Binary files /dev/null and b/sql/.vs/sql/v14/.ssms_suo differ diff --git a/sql/sql.ssmssln b/sql/sql.ssmssln new file mode 100644 index 0000000..0f33ae1 --- /dev/null +++ b/sql/sql.ssmssln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# SQL Server Management Studio Solution File, Format Version 13.00 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{4F2E2C19-372F-40D8-9FA7-9D2138C6997A}") = "sql", "sql\sql.ssmssqlproj", "{75809D7E-7247-459C-A57C-6736E33D1FAA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Default|Default = Default|Default + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {75809D7E-7247-459C-A57C-6736E33D1FAA}.Default|Default.ActiveCfg = Default + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/sql/sql/setup_01_create_database.sql b/sql/sql/setup_01_create_database.sql new file mode 100644 index 0000000..24b7201 --- /dev/null +++ b/sql/sql/setup_01_create_database.sql @@ -0,0 +1,10 @@ +-- Dateiname create_database.sql +-- +-- Beschreibung: Query zum erstellen der Case Study DB +-- +-- Autor: Andreas Zweili +-- Datum: 2017-06-05 +-- Server Version: SQL Server 2016 + +if not exists (select * from sys.databases where name='marketdb') + CREATE DATABASE marketdb; diff --git a/sql/sql/setup_02_create_table.sql b/sql/sql/setup_02_create_table.sql new file mode 100644 index 0000000..7c8caae --- /dev/null +++ b/sql/sql/setup_02_create_table.sql @@ -0,0 +1,9 @@ +-- Dateiname create_table.sql +-- +-- Beschreibung: Queries zum erstellen der Tabellen der Case Study DB +-- +-- Autor: Andreas Zweili +-- Datum: 2017-06-05 +-- Server Version: SQL Server 2016 + +use marketdb; diff --git a/sql/sql/setup_03_insert_data.sql b/sql/sql/setup_03_insert_data.sql new file mode 100644 index 0000000..66184df --- /dev/null +++ b/sql/sql/setup_03_insert_data.sql @@ -0,0 +1,9 @@ +-- Dateiname insert_data.sql +-- +-- Beschreibung: Queries zum einfügen von Test Daten +-- +-- Autor: Andreas Zweili +-- Datum: 2017-06-05 +-- Server Version: SQL Server 2016 + +use marketdb; \ No newline at end of file diff --git a/sql/sql/setup_04_remove_database.sql b/sql/sql/setup_04_remove_database.sql new file mode 100644 index 0000000..5b7c2b9 --- /dev/null +++ b/sql/sql/setup_04_remove_database.sql @@ -0,0 +1,11 @@ +-- Removes the tables for the Flugzeug DB +-- +-- Author: Andreas Zweili +-- Erstellt: 2017-05-27 +-- DB-Server SQL Server 2016 + +use marketdb; + +use master; +if exists (select * from sys.databases where name='marketdb') + drop DATABASE marketdb; diff --git a/sql/sql/sql.ssmssqlproj b/sql/sql/sql.ssmssqlproj new file mode 100644 index 0000000..58b9132 --- /dev/null +++ b/sql/sql/sql.ssmssqlproj @@ -0,0 +1,52 @@ + + + + + + + 2017-06-05T12:49:04.4481167+02:00 + SQL + (local)\SQLEXPRESS + + Windows Authentication + + 15 + 0 + NotSpecified + + + + + + + + + + + setup_01_create_database.sql + + + + + + setup_02_create_table.sql + + + + + + setup_03_insert_data.sql + + + + + + setup_04_remove_database.sql + + + + + + + + \ No newline at end of file