Sıralama: Administration
Gruplar: Administrators
Katılan: 6.05.2014(UTC) Mesajlar: 670
19 Kere Teşekkür Etti. 152 Mesajına Toplam 253 Kere Teşekkür Edildi.
|
Originally Posted by: vesta sql serverda emlak sistemi yapıcam tablomu nası oluşturmam lazım yardım edin lütfen Merhabalar Ben daha önce söyle bir script yazmıstım insallahy işinize yarar Kod:
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[Yasi] Script Date: 05/29/2013 11:04:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Yasi](
[id] [int] IDENTITY(1,1) NOT NULL,
[Yasi] [varchar](30) NULL,
CONSTRAINT [PK_Yasi] 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 OFF
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[TuvaletSayisi] Script Date: 05/29/2013 11:04:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[TuvaletSayisi](
[id] [int] IDENTITY(1,1) NOT NULL,
[TuvaletSayisi] [varchar](30) NULL,
CONSTRAINT [PK_TuvaletSayisi] 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 OFF
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[Satilik] Script Date: 05/29/2013 11:04:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Satilik](
[id] [int] IDENTITY(1,1) NOT NULL,
[EmlakciId] [int] NULL,
[MalSahibiId] [int] NULL,
[SatilikMetrekare] [int] NULL,
[SatilikFiyat] [decimal](18, 0) NULL,
[SatilikIl] [int] NULL,
[SatilikIlce] [int] NULL,
[SatilikMahalle] [int] NULL,
[SatilikAdres] [varchar](200) NULL,
[SatilikYasi] [int] NOT NULL,
[SatilikIsitmaTuru] [int] NULL,
[SatilikKullanimDurumu] [int] NULL,
[SatilikKrediDurumu] [int] NULL,
[SatilikBulunduguKat] [int] NULL,
[SatilikEmlakTipi] [int] NULL,
[SatilikOdaSayisi] [int] NULL,
[SatilikOtoparkTuru] [int] NULL,
[SatilikBanyoSaiyisi] [int] NULL,
[SatilikTuvaletSayisi] [int] NULL,
[SatilikKayitTarihi] [datetime] NULL,
[SatilikNot] [varchar](500) NULL,
[SatilikAktif] [int] NULL,
CONSTRAINT [PK_Satilik] 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 OFF
GO
ALTER TABLE [dbo].[Satilik] ADD CONSTRAINT [DF_Satilik_SatilikKayitTarihi] DEFAULT (getdate()) FOR [SatilikKayitTarihi]
GO
ALTER TABLE [dbo].[Satilik] ADD CONSTRAINT [DF_Satilik_SatilikAktif] DEFAULT ((1)) FOR [SatilikAktif]
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[Resim] Script Date: 05/29/2013 11:04:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Resim](
[id] [int] IDENTITY(1,1) NOT NULL,
[KiralikId] [int] NULL,
[SatilikId] [int] NULL,
[ResimAdresi] [varchar](250) NULL,
[ResimKayitTarihi] [datetime] NULL,
CONSTRAINT [PK_Resim] 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 OFF
GO
ALTER TABLE [dbo].[Resim] ADD CONSTRAINT [DF_Resim_ResimKayitTarihi] DEFAULT (getdate()) FOR [ResimKayitTarihi]
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[OtoparkTuru] Script Date: 05/29/2013 11:04:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[OtoparkTuru](
[id] [int] IDENTITY(1,1) NOT NULL,
[OtoparkTuru] [varchar](30) NULL,
CONSTRAINT [PK_OtoparkTuru] 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 OFF
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[OdaSayisi] Script Date: 05/29/2013 11:04:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[OdaSayisi](
[id] [int] IDENTITY(1,1) NOT NULL,
[OdaSayisi] [varchar](30) NULL,
CONSTRAINT [PK_OdaSayisi] 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 OFF
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[Musteri] Script Date: 05/29/2013 11:04:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Musteri](
[id] [bigint] IDENTITY(1,1) NOT NULL,
[EmlakciId] [int] NULL,
[MusteriAdi] [varchar](20) NULL,
[MusteriSoyadi] [varchar](20) NULL,
[MusteriCinsiyet] [int] NULL,
[MusteriDogumTarihi] [datetime] NULL,
[MusteriTelefon] [varchar](15) NULL,
[MusteriEmail] [varchar](100) NULL,
[MusteriKayitTarihi] [datetime] NULL,
[MusteriIl] [int] NULL,
[MusteriIlce] [int] NULL,
[MusteriAktif] [int] NULL,
CONSTRAINT [PK_Musteri] 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 OFF
GO
ALTER TABLE [dbo].[Musteri] ADD CONSTRAINT [DF_Musteri_MusteriKayitTarihi] DEFAULT (getdate()) FOR [MusteriKayitTarihi]
GO
ALTER TABLE [dbo].[Musteri] ADD CONSTRAINT [DF_Musteri_MusteriAktif] DEFAULT ((1)) FOR [MusteriAktif]
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[MalSahibi] Script Date: 05/29/2013 11:04:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[MalSahibi](
[id] [int] IDENTITY(1,1) NOT NULL,
[EmlakciId] [int] NULL,
[MalSahibiAdi] [varchar](20) NULL,
[MalSahibiSoyadi] [varchar](20) NULL,
[MalSahibiCinsiyet] [int] NULL,
[MalSahibiIl] [int] NULL,
[MalSahibiIlce] [int] NULL,
[MalSahibiAdres] [varchar](200) NULL,
[MalSahibiEmail] [varchar](100) NULL,
[MalSahibiTelefon] [varchar](15) NULL,
[MalSahibiKayitTarihi] [datetime] NULL,
[MalSahibiAktif] [int] NULL,
CONSTRAINT [PK_MalSahibi] 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 OFF
GO
ALTER TABLE [dbo].[MalSahibi] ADD CONSTRAINT [DF_MalSahibi_MalSahibiKayitTarihi] DEFAULT (getdate()) FOR [MalSahibiKayitTarihi]
GO
ALTER TABLE [dbo].[MalSahibi] ADD CONSTRAINT [DF_MalSahibi_MalSahibiAktif] DEFAULT ((1)) FOR [MalSahibiAktif]
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[KullanimDurumu] Script Date: 05/29/2013 11:04:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[KullanimDurumu](
[id] [int] IDENTITY(1,1) NOT NULL,
[KullanimDurumu] [varchar](30) NULL,
CONSTRAINT [PK_KullanimDurumu] 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 OFF
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[KrediDurumu] Script Date: 05/29/2013 11:04:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[KrediDurumu](
[id] [int] IDENTITY(1,1) NOT NULL,
[KrediDurumu] [varchar](30) NULL,
CONSTRAINT [PK_KrediDurumu] 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 OFF
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[Kiralik] Script Date: 05/29/2013 11:04:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Kiralik](
[id] [int] IDENTITY(1,1) NOT NULL,
[EmlakciId] [int] NULL,
[MalSahibiId] [int] NULL,
[KiralikMetrekare] [int] NULL,
[KiralikFiyat] [decimal](18, 0) NULL,
[KiralikDepozito] [decimal](18, 0) NULL,
[KiralikIl] [int] NULL,
[KiralikIlce] [int] NULL,
[KiralikMahalle] [int] NULL,
[KiralikAdres] [varchar](200) NULL,
[KiralikYasi] [int] NOT NULL,
[KiralikIsitmaTuru] [int] NULL,
[KiralikKullanimDurumu] [int] NULL,
[KiralikKrediDurumu] [int] NULL,
[KiralikBulunduguKat] [int] NULL,
[KiralikEmlakTipi] [int] NULL,
[KiralikOdaSayisi] [int] NULL,
[KiralikOtoparkTuru] [int] NULL,
[KiralikBanyoSaiyisi] [int] NULL,
[KiralikTuvaletSayisi] [int] NULL,
[KiralikKayitTarihi] [datetime] NULL,
[KiralikNot] [varchar](500) NULL,
[KiralikAktif] [int] NULL,
CONSTRAINT [PK_Kiralik] 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 OFF
GO
ALTER TABLE [dbo].[Kiralik] ADD CONSTRAINT [DF_Kiralik_KiralikKayitTarihi] DEFAULT (getdate()) FOR [KiralikKayitTarihi]
GO
ALTER TABLE [dbo].[Kiralik] ADD CONSTRAINT [DF_Kiralik_KiralikAktif] DEFAULT ((1)) FOR [KiralikAktif]
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[IsitmaTuru] Script Date: 05/29/2013 11:04:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[IsitmaTuru](
[id] [int] IDENTITY(1,1) NOT NULL,
[IsitmaTuru] [varchar](30) NULL,
CONSTRAINT [PK_IsitmaTuru] 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 OFF
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[IliskiSatilik] Script Date: 05/29/2013 11:03:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[IliskiSatilik](
[id] [bigint] IDENTITY(1,1) NOT NULL,
[EmlakciId] [int] NULL,
[MusteriId] [bigint] NULL,
[SatilikId] [int] NULL,
[Iliski] [int] NULL,
[IliskiTarihi] [datetime] NOT NULL,
CONSTRAINT [PK_IliskiSatilik] 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
ALTER TABLE [dbo].[IliskiSatilik] ADD CONSTRAINT [DF_Iliski_IliskiSatilik] DEFAULT ((1)) FOR [Iliski]
GO
ALTER TABLE [dbo].[IliskiSatilik] ADD CONSTRAINT [DF_Iliski_IliskiSatilikTarihi] DEFAULT (getdate()) FOR [IliskiTarihi]
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[IliskiKiralik] Script Date: 05/29/2013 11:03:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[IliskiKiralik](
[id] [bigint] IDENTITY(1,1) NOT NULL,
[EmlakciId] [int] NULL,
[MusteriId] [bigint] NULL,
[KiralikId] [int] NULL,
[Iliski] [int] NULL,
[IliskiTarihi] [datetime] NOT NULL,
CONSTRAINT [PK_Iliski] 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
ALTER TABLE [dbo].[IliskiKiralik] ADD CONSTRAINT [DF_Iliski_Iliski] DEFAULT ((1)) FOR [Iliski]
GO
ALTER TABLE [dbo].[IliskiKiralik] ADD CONSTRAINT [DF_Iliski_IliskiTarihi] DEFAULT (getdate()) FOR [IliskiTarihi]
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[EmlakTipi] Script Date: 05/29/2013 11:03:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[EmlakTipi](
[id] [int] IDENTITY(1,1) NOT NULL,
[EmlakTipi] [varchar](30) NULL,
CONSTRAINT [PK_EmlakTipi] 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 OFF
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[Emlakci] Script Date: 05/29/2013 11:03:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Emlakci](
[id] [int] IDENTITY(1,1) NOT NULL,
[EmlakciAdi] [varchar](20) NULL,
[EmlakciSoyadi] [varchar](20) NULL,
[EmlakciCinsiyet] [int] NULL,
[EmlakciSirketAdi] [varchar](100) NULL,
[EmlakciUyelikTarihi] [datetime] NULL,
[EmlakciUyelikBitisTarihi] [datetime] NULL,
[EmlakciEmail] [varchar](100) NULL,
[EmlakciIl] [int] NULL,
[EmlakciIlce] [int] NULL,
[EmlakciAdres] [varchar](200) NULL,
[EmlakciTelefon] [varchar](15) NULL,
[EmlakciKullaniciAdi] [varchar](20) NULL,
[EmlakciSifre] [varchar](20) NULL,
[EmlakciAktif] [int] NULL,
CONSTRAINT [PK_Emlakci] 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 OFF
GO
ALTER TABLE [dbo].[Emlakci] ADD CONSTRAINT [DF_Emlakci_EmlakciUyelikTarihi] DEFAULT (getdate()) FOR [EmlakciUyelikTarihi]
GO
ALTER TABLE [dbo].[Emlakci] ADD CONSTRAINT [DF_Emlakci_EmlakciAktif] DEFAULT ((1)) FOR [EmlakciAktif]
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[Cinsiyet] Script Date: 05/29/2013 11:03:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Cinsiyet](
[id] [int] IDENTITY(1,1) NOT NULL,
[Cinsiyet] [varchar](10) NULL,
CONSTRAINT [PK_Cinsiyet] 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 OFF
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[BulunduguKat] Script Date: 05/29/2013 11:03:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BulunduguKat](
[id] [int] IDENTITY(1,1) NOT NULL,
[BulunduguKat] [varchar](30) NULL,
CONSTRAINT [PK_BulunduguKat] 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 OFF
GO
USE [EmlakSistem]
GO
/****** Object: Table [dbo].[BanyoSayisi] Script Date: 05/29/2013 11:03:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BanyoSayisi](
[id] [int] IDENTITY(1,1) NOT NULL,
[BanyoSayisi] [varchar](30) NULL,
CONSTRAINT [PK_BanyoSayisi] 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 OFF
GO
|