Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*==============================================================*/
- /* DBMS name: Microsoft SQL Server 2012 */
- /* Created on: 06.12.2017 13:04:49 */
- /*==============================================================*/
- /*==============================================================*/
- /* Table: ADRES */
- /*==============================================================*/
- create table ADRES (
- ID_ADRES int not null,
- MIASTO varchar(50) not null,
- KOD_POCZTOWY varchar(0) not null,
- ULICA varchar(70) not null,
- NR varchar(15) not null,
- constraint PK_ADRES primary key nonclustered (ID_ADRES)
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('ADRES') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'ADRES'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'adres osoby
- ',
- 'user', @CurrentUser, 'table', 'ADRES'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('ADRES')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_ADRES')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'ADRES', 'column', 'ID_ADRES'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID_ADRES',
- 'user', @CurrentUser, 'table', 'ADRES', 'column', 'ID_ADRES'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('ADRES')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'MIASTO')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'ADRES', 'column', 'MIASTO'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'miasto w jakim mieszka dana osoba',
- 'user', @CurrentUser, 'table', 'ADRES', 'column', 'MIASTO'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('ADRES')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'KOD_POCZTOWY')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'ADRES', 'column', 'KOD_POCZTOWY'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'kod pocztowy osoby',
- 'user', @CurrentUser, 'table', 'ADRES', 'column', 'KOD_POCZTOWY'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('ADRES')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ULICA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'ADRES', 'column', 'ULICA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ulica na jakiej mieszka dana osoba',
- 'user', @CurrentUser, 'table', 'ADRES', 'column', 'ULICA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('ADRES')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'NR')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'ADRES', 'column', 'NR'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'numer mieszkania na jakim mieszka dana osoba',
- 'user', @CurrentUser, 'table', 'ADRES', 'column', 'NR'
- go
- /*==============================================================*/
- /* Table: AKTOR */
- /*==============================================================*/
- create table AKTOR (
- ID_AKTORA int not null,
- IMIE varchar(30) not null,
- NAZWISKO varchar(30) not null,
- constraint PK_AKTOR primary key nonclustered (ID_AKTORA)
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('AKTOR') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AKTOR'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'Encja opisująca aktora',
- 'user', @CurrentUser, 'table', 'AKTOR'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('AKTOR')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_AKTORA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AKTOR', 'column', 'ID_AKTORA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'id aktora
- ',
- 'user', @CurrentUser, 'table', 'AKTOR', 'column', 'ID_AKTORA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('AKTOR')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'IMIE')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AKTOR', 'column', 'IMIE'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'imie aktora',
- 'user', @CurrentUser, 'table', 'AKTOR', 'column', 'IMIE'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('AKTOR')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'NAZWISKO')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AKTOR', 'column', 'NAZWISKO'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'nazwisko aktora',
- 'user', @CurrentUser, 'table', 'AKTOR', 'column', 'NAZWISKO'
- go
- /*==============================================================*/
- /* Table: AKTOR_FILM */
- /*==============================================================*/
- create table AKTOR_FILM (
- ID_FILMU int not null,
- ID_AKTORA int not null
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('AKTOR_FILM') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AKTOR_FILM'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'INTERSEKCJA AKTOR-FILM',
- 'user', @CurrentUser, 'table', 'AKTOR_FILM'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('AKTOR_FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_FILMU')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AKTOR_FILM', 'column', 'ID_FILMU'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID wypozyczanego filmu ',
- 'user', @CurrentUser, 'table', 'AKTOR_FILM', 'column', 'ID_FILMU'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('AKTOR_FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_AKTORA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AKTOR_FILM', 'column', 'ID_AKTORA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'id aktora
- ',
- 'user', @CurrentUser, 'table', 'AKTOR_FILM', 'column', 'ID_AKTORA'
- go
- /*==============================================================*/
- /* Index: FK_AKTOR_AKTORFILM_FK */
- /*==============================================================*/
- create index FK_AKTOR_AKTORFILM_FK on AKTOR_FILM (
- ID_AKTORA ASC
- )
- go
- /*==============================================================*/
- /* Index: FK_FILM_AKTORFILM_FK */
- /*==============================================================*/
- create index FK_FILM_AKTORFILM_FK on AKTOR_FILM (
- ID_FILMU ASC
- )
- go
- /*==============================================================*/
- /* Table: AUTOR */
- /*==============================================================*/
- create table AUTOR (
- ID_AUTORA int not null,
- IMIE varchar(30) not null,
- NAZWISKO varchar(30) not null,
- constraint PK_AUTOR primary key nonclustered (ID_AUTORA)
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('AUTOR') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AUTOR'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'encja opisująca Autora',
- 'user', @CurrentUser, 'table', 'AUTOR'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('AUTOR')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_AUTORA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AUTOR', 'column', 'ID_AUTORA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID_AUTORA',
- 'user', @CurrentUser, 'table', 'AUTOR', 'column', 'ID_AUTORA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('AUTOR')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'IMIE')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AUTOR', 'column', 'IMIE'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'Imie autora',
- 'user', @CurrentUser, 'table', 'AUTOR', 'column', 'IMIE'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('AUTOR')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'NAZWISKO')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AUTOR', 'column', 'NAZWISKO'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'nazwisko autora',
- 'user', @CurrentUser, 'table', 'AUTOR', 'column', 'NAZWISKO'
- go
- /*==============================================================*/
- /* Table: AUTOR_FILM */
- /*==============================================================*/
- create table AUTOR_FILM (
- ID_FILMU int not null,
- ID_AUTORA int not null
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('AUTOR_FILM') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AUTOR_FILM'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'intersekcja FILM-AUTOR',
- 'user', @CurrentUser, 'table', 'AUTOR_FILM'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('AUTOR_FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_FILMU')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AUTOR_FILM', 'column', 'ID_FILMU'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID wypozyczanego filmu ',
- 'user', @CurrentUser, 'table', 'AUTOR_FILM', 'column', 'ID_FILMU'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('AUTOR_FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_AUTORA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'AUTOR_FILM', 'column', 'ID_AUTORA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID_AUTORA',
- 'user', @CurrentUser, 'table', 'AUTOR_FILM', 'column', 'ID_AUTORA'
- go
- /*==============================================================*/
- /* Index: FK_AUTOR_AUTORFILM_FK */
- /*==============================================================*/
- create index FK_AUTOR_AUTORFILM_FK on AUTOR_FILM (
- ID_AUTORA ASC
- )
- go
- /*==============================================================*/
- /* Index: FK_FILM_AUTORFILM_FK */
- /*==============================================================*/
- create index FK_FILM_AUTORFILM_FK on AUTOR_FILM (
- ID_FILMU ASC
- )
- go
- /*==============================================================*/
- /* Table: FILM */
- /*==============================================================*/
- create table FILM (
- ID_FILMU int not null,
- ID_JEZYKA int null,
- TYTUL varchar(100) not null,
- OPIS varchar(100) not null,
- ROK int not null,
- CZAS_WYPOZYCZENIA int not null,
- CENA_WYNAJMU float not null,
- OCENA float null,
- constraint PK_FILM primary key nonclustered (ID_FILMU)
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('FILM') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'FILM'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'Film który ma zostac wypozyczony',
- 'user', @CurrentUser, 'table', 'FILM'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_FILMU')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'ID_FILMU'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID wypozyczanego filmu ',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'ID_FILMU'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_JEZYKA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'ID_JEZYKA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'id jezyka',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'ID_JEZYKA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'TYTUL')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'TYTUL'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'tytul filmu',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'TYTUL'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'OPIS')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'OPIS'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'opis filmu',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'OPIS'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ROK')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'ROK'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'rok wydania filmu',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'ROK'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'CZAS_WYPOZYCZENIA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'CZAS_WYPOZYCZENIA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'na jaki okres czasu wypozyczany jest film
- ',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'CZAS_WYPOZYCZENIA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'CENA_WYNAJMU')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'CENA_WYNAJMU'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ena za dzien wypozyczenia',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'CENA_WYNAJMU'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'OCENA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'OCENA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ocena filmu przez klientow ktorzy obejrzeli film',
- 'user', @CurrentUser, 'table', 'FILM', 'column', 'OCENA'
- go
- /*==============================================================*/
- /* Index: FK_JEZYK_FILM_FK */
- /*==============================================================*/
- create index FK_JEZYK_FILM_FK on FILM (
- ID_JEZYKA ASC
- )
- go
- /*==============================================================*/
- /* Table: GATUNEK */
- /*==============================================================*/
- create table GATUNEK (
- ID_GATUNKU int not null,
- GATUNEK varchar(30) not null,
- constraint PK_GATUNEK primary key nonclustered (ID_GATUNKU)
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('GATUNEK') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'GATUNEK'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'encja opisująca gatunek',
- 'user', @CurrentUser, 'table', 'GATUNEK'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('GATUNEK')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'GATUNEK')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'GATUNEK', 'column', 'GATUNEK'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'Gatunek filmu',
- 'user', @CurrentUser, 'table', 'GATUNEK', 'column', 'GATUNEK'
- go
- /*==============================================================*/
- /* Table: GATUNEK_FILM */
- /*==============================================================*/
- create table GATUNEK_FILM (
- ID_GATUNKU int not null,
- ID_FILMU int not null
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('GATUNEK_FILM') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'GATUNEK_FILM'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'intersekcja FILM-Gatunek',
- 'user', @CurrentUser, 'table', 'GATUNEK_FILM'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('GATUNEK_FILM')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_FILMU')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'GATUNEK_FILM', 'column', 'ID_FILMU'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID wypozyczanego filmu ',
- 'user', @CurrentUser, 'table', 'GATUNEK_FILM', 'column', 'ID_FILMU'
- go
- /*==============================================================*/
- /* Index: FK_FILM_GATUNEKFILM_FK */
- /*==============================================================*/
- create index FK_FILM_GATUNEKFILM_FK on GATUNEK_FILM (
- ID_FILMU ASC
- )
- go
- /*==============================================================*/
- /* Index: FK_GATUNEK_GATUNEKFILM_FK */
- /*==============================================================*/
- create index FK_GATUNEK_GATUNEKFILM_FK on GATUNEK_FILM (
- ID_GATUNKU ASC
- )
- go
- /*==============================================================*/
- /* Table: JEZYK */
- /*==============================================================*/
- create table JEZYK (
- ID_JEZYKA int not null,
- NAZWA varchar(50) not null,
- constraint PK_JEZYK primary key nonclustered (ID_JEZYKA)
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('JEZYK') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'JEZYK'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'W jakim jezyku jest nagrany film',
- 'user', @CurrentUser, 'table', 'JEZYK'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('JEZYK')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_JEZYKA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'JEZYK', 'column', 'ID_JEZYKA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'id jezyka',
- 'user', @CurrentUser, 'table', 'JEZYK', 'column', 'ID_JEZYKA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('JEZYK')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'NAZWA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'JEZYK', 'column', 'NAZWA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'NAZWA JEZYKA',
- 'user', @CurrentUser, 'table', 'JEZYK', 'column', 'NAZWA'
- go
- /*==============================================================*/
- /* Table: KLIENT */
- /*==============================================================*/
- create table KLIENT (
- ID_KLIENTA int not null,
- ID_ADRES int not null,
- IMIE varchar(30) not null,
- NAZWISKO varchar(30) not null,
- EMAIL varchar(50) null,
- NIP char(13) not null,
- PESEL char(11) not null,
- TELEFON varchar(12) null,
- constraint PK_KLIENT primary key (ID_KLIENTA)
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('KLIENT') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'KLIENT'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'klient który chce wypozyczyc film',
- 'user', @CurrentUser, 'table', 'KLIENT'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('KLIENT')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_KLIENTA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'ID_KLIENTA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID_KLIENTA',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'ID_KLIENTA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('KLIENT')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_ADRES')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'ID_ADRES'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID_ADRES',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'ID_ADRES'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('KLIENT')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'IMIE')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'IMIE'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'IMIE pracownika lub klienta',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'IMIE'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('KLIENT')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'NAZWISKO')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'NAZWISKO'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'nazwisko pracownika lub klienta',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'NAZWISKO'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('KLIENT')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'EMAIL')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'EMAIL'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'email pracownika lub klienta',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'EMAIL'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('KLIENT')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'NIP')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'NIP'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'NIP pracownika lub klienta',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'NIP'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('KLIENT')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'PESEL')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'PESEL'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'pesel pracownika lub klienta
- ',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'PESEL'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('KLIENT')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'TELEFON')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'TELEFON'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'telefon pracownika lub klienta',
- 'user', @CurrentUser, 'table', 'KLIENT', 'column', 'TELEFON'
- go
- /*==============================================================*/
- /* Index: FK_OSOBA_ADRES2_FK */
- /*==============================================================*/
- create index FK_OSOBA_ADRES2_FK on KLIENT (
- ID_ADRES ASC
- )
- go
- /*==============================================================*/
- /* Table: PRACOWNIK */
- /*==============================================================*/
- create table PRACOWNIK (
- ID_KLIENTA int not null,
- ID_ADRES int not null,
- IMIE varchar(30) not null,
- NAZWISKO varchar(30) not null,
- EMAIL varchar(50) null,
- NIP char(13) not null,
- PESEL char(11) not null,
- TELEFON varchar(12) null,
- constraint PK_PRACOWNIK primary key (ID_KLIENTA)
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('PRACOWNIK') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'PRACOWNIK'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'pracownik wypozyczalni',
- 'user', @CurrentUser, 'table', 'PRACOWNIK'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('PRACOWNIK')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_KLIENTA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'ID_KLIENTA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID_KLIENTA',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'ID_KLIENTA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('PRACOWNIK')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_ADRES')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'ID_ADRES'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID_ADRES',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'ID_ADRES'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('PRACOWNIK')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'IMIE')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'IMIE'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'IMIE pracownika lub klienta',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'IMIE'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('PRACOWNIK')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'NAZWISKO')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'NAZWISKO'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'nazwisko pracownika lub klienta',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'NAZWISKO'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('PRACOWNIK')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'EMAIL')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'EMAIL'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'email pracownika lub klienta',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'EMAIL'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('PRACOWNIK')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'NIP')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'NIP'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'NIP pracownika lub klienta',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'NIP'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('PRACOWNIK')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'PESEL')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'PESEL'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'pesel pracownika lub klienta
- ',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'PESEL'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('PRACOWNIK')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'TELEFON')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'TELEFON'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'telefon pracownika lub klienta',
- 'user', @CurrentUser, 'table', 'PRACOWNIK', 'column', 'TELEFON'
- go
- /*==============================================================*/
- /* Index: FK_OSOBA_ADRES_FK */
- /*==============================================================*/
- create index FK_OSOBA_ADRES_FK on PRACOWNIK (
- ID_ADRES ASC
- )
- go
- /*==============================================================*/
- /* Table: WYPOZYCZENIE */
- /*==============================================================*/
- create table WYPOZYCZENIE (
- ID_WYPOZYCZENIA int not null,
- ID_FILMU int null,
- ID_KLIENTA int not null,
- PRA_ID_KLIENTA int not null,
- DATA_WYPOZYCZENIA datetime not null,
- DATA_ZWROTU datetime not null,
- KWOTA_WYPOZYCZENIA float not null,
- DATA_PLATNOSCI datetime not null,
- constraint PK_WYPOZYCZENIE primary key nonclustered (ID_WYPOZYCZENIA)
- )
- go
- if exists (select 1 from sys.extended_properties
- where major_id = object_id('WYPOZYCZENIE') and minor_id = 0)
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'przyporządkowanie filmu do klienta przy uzyciu pracownika',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('WYPOZYCZENIE')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_WYPOZYCZENIA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'ID_WYPOZYCZENIA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID_WYPOZYCZENIA filmu przez klienta
- ',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'ID_WYPOZYCZENIA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('WYPOZYCZENIE')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_FILMU')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'ID_FILMU'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID wypozyczanego filmu ',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'ID_FILMU'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('WYPOZYCZENIE')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'ID_KLIENTA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'ID_KLIENTA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID_KLIENTA',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'ID_KLIENTA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('WYPOZYCZENIE')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'PRA_ID_KLIENTA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'PRA_ID_KLIENTA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'ID_KLIENTA',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'PRA_ID_KLIENTA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('WYPOZYCZENIE')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'DATA_WYPOZYCZENIA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'DATA_WYPOZYCZENIA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'kiedy film zostal wypozyczony',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'DATA_WYPOZYCZENIA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('WYPOZYCZENIE')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'DATA_ZWROTU')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'DATA_ZWROTU'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'kiedy film zostal oddany lub ma byc oddany',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'DATA_ZWROTU'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('WYPOZYCZENIE')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'KWOTA_WYPOZYCZENIA')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'KWOTA_WYPOZYCZENIA'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'KWOTA JAKĄ MUSI ZAPŁACIC KLIENT ZA WYPOZYCZENIE',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'KWOTA_WYPOZYCZENIA'
- go
- if exists(select 1 from sys.extended_properties p where
- p.major_id = object_id('WYPOZYCZENIE')
- and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'DATA_PLATNOSCI')
- )
- begin
- declare @CurrentUser sysname
- select @CurrentUser = user_name()
- execute sp_dropextendedproperty 'MS_Description',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'DATA_PLATNOSCI'
- end
- select @CurrentUser = user_name()
- execute sp_addextendedproperty 'MS_Description',
- 'KIEDY KLIENT ZAPLACI/ZAPLACI',
- 'user', @CurrentUser, 'table', 'WYPOZYCZENIE', 'column', 'DATA_PLATNOSCI'
- go
- /*==============================================================*/
- /* Index: FK_KLIENT_WYPOZYCZENIE_FK */
- /*==============================================================*/
- create index FK_KLIENT_WYPOZYCZENIE_FK on WYPOZYCZENIE (
- ID_KLIENTA ASC
- )
- go
- /*==============================================================*/
- /* Index: FK_PRACOWNIK_WYPOZYCZENIE_FK */
- /*==============================================================*/
- create index FK_PRACOWNIK_WYPOZYCZENIE_FK on WYPOZYCZENIE (
- PRA_ID_KLIENTA ASC
- )
- go
- /*==============================================================*/
- /* Index: fk_film_wypozyczenie_FK */
- /*==============================================================*/
- create index fk_film_wypozyczenie_FK on WYPOZYCZENIE (
- ID_FILMU ASC
- )
- go
- create trigger "CLR Trigger_adres" on ADRES insert as
- external name %Assembly.GeneratedName%.
- go
- create trigger "CLR Trigger_klient" on KLIENT insert as
- external name %Assembly.GeneratedName%.
- go
- create trigger "CLR Trigger_pracownik" on PRACOWNIK insert as
- external name %Assembly.GeneratedName%.
- go
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement