بررسی سیستم اسناد و املاک بخش نهم
دستورات SQL Server (نسخه 2005)جهت ایجاد این جداول:
USE [SabteAsnad]
GO
/****** Object: Table [dbo].[Malek] Script Date: 06/19/2008 19:29:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Malek](
[MalekID] [int] NOT NULL,
[MalekName] [nvarchar](50) COLLATE Arabic_CI_AS NULL,
[Phone] [nvarchar](50) COLLATE Arabic_CI_AS NULL,
[Mobile] [nvarchar](50) COLLATE Arabic_CI_AS NULL,
[Address] [nvarchar](200) COLLATE Arabic_CI_AS NULL,
[notes] [nvarchar](50) COLLATE Arabic_CI_AS NULL,
CONSTRAINT [PK_Malek] PRIMARY KEY CLUSTERED
(
[MalekID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
مشخصات موجوديتها و فيلدهاي جدول Masool: در اين جدول اطلاعات مربوط به مشتریان ذخيره مي شود و كليد اصلي اين جدول فيلد MasoolID مي باشد.
دستورات SQL Server (نسخه 2005)جهت ایجاد این جداول:
USE [SabteAsnad]
GO
/****** Object: Table [dbo].[MasOoleBkhsh] Script Date: 06/19/2008 19:29:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MasOoleBkhsh](
[MasoolID] [int] NOT NULL,
[MasoolNameSN] [nvarchar](50) COLLATE Arabic_CI_AS NULL,
[Phone] [nvarchar](50) COLLATE Arabic_CI_AS NULL,
[Mobile] [nvarchar](50) COLLATE Arabic_CI_AS NULL,
[Address] [nvarchar](200) COLLATE Arabic_CI_AS NULL,
[Nots] [nvarchar](200) COLLATE Arabic_CI_AS NULL,
CONSTRAINT [PK_MasOoleBkhsh] PRIMARY KEY CLUSTERED
(
[MasoolID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
مشخصات موجوديتها و فيلدهاي جدول Darkhast: در اين جدول اطلاعات مربوط به معاملات انجام شده ذخيره مي شود و كليد اصلي اين جدول فيلد DarkhstID مي باشد.
Caption
|
Field Size
|
Data Type
|
Field Name
|
Row
|
کد درخواست
|
Long Integer
|
AutoNumber
|
DarkhastID
|
1
|
کد مالک
|
Long Integer
|
Number (Look Up)
|
MelkID
|
2
|
کد نوع ملک
|
Long Integer
|
Number (Look Up)
|
MelkType
|
3
|
کد مسئول
|
Long Integer
|
Number (Look Up)
|
MasoolID
|
4
|
ملاحظات
|
-------
|
Memo
|
Notes
|
5
|
تاریخ انجام معامله
|
Long Integer
|
Number (Mask Def)
|
Date
|
6
|
دستمزد دریافتی
|
Currency
|
Currency
|
TotalPrice
|
7
|
دستورات SQL Server (نسخه 2005)جهت ایجاد این جداول:
USE [SabteAsnad]
GO
/****** Object: Table [dbo].[DaKhastHa] Script Date: 06/19/2008 19:27:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DaKhastHa](
[DarKhastID] [int] NOT NULL,
[MAlekID] [int] NULL,
[MelkType] [int] NULL,
[MasoolID] [int] NULL,
[MoaID] [int] NULL,
[Dateing] [int] NULL,
[TotalPrice] [money] NULL,
[Address] [nvarchar](250) COLLATE Arabic_CI_AS NULL,
[Notes] [nvarchar](max) COLLATE Arabic_CI_AS NULL,
CONSTRAINT [PK_DaKhastHa] PRIMARY KEY CLUSTERED
(
[DarKhastID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
USE [SabteAsnad]
GO
ALTER TABLE [dbo].[DaKhastHa] WITH CHECK ADD CONSTRAINT [FK_DaKhastHa_Malek] FOREIGN KEY([MAlekID])
REFERENCES [dbo].[Malek] ([MalekID])
GO
ALTER TABLE [dbo].[DaKhastHa] WITH CHECK ADD CONSTRAINT [FK_DaKhastHa_MasOoleBkhsh] FOREIGN KEY([MasoolID])
REFERENCES [dbo].[MasOoleBkhsh] ([MasoolID])
GO
ALTER TABLE [dbo].[DaKhastHa] WITH CHECK ADD CONSTRAINT [FK_DaKhastHa_MelkType] FOREIGN KEY([MelkType])
REFERENCES [dbo].[MelkType] ([MelkTypeID])
مشخصات موجوديتها و فيلدهاي جدول MelkType: در اين جدول اطلاعات نوع املاک ذخيره مي شود و كليد اصلي اين جدول فيلد MelkTypeID مي باشد.
Caption
|
Field Size
|
Data Type
|
Field Name
|
Row
|
کد نوع ملک
|
Long Integer
|
AutoNumber
|
MalekTypeID
|
1
|
نوع ملک
|
50
|
Text
|
MalekType
|
2
|
USE [SabteAsnad]
GO
/****** Object: Table [dbo].[MelkType] Script Date: 06/19/2008 19:34:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MelkType](
[MelkTypeID] [int] NOT NULL,
[MelkType] [nvarchar](50) COLLATE Arabic_CI_AS NULL,
CONSTRAINT [PK_MelkType] PRIMARY KEY CLUSTERED
(
[MelkTypeID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]