
/****** Object:  Table [dbo].[tab_sms]    Script Date: 08/28/2013 13:45:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tab_sms](
	[id] [int] NOT NULL,
	[dhtID] [nvarchar](50) NULL,
	[Devname] [nvarchar](50) NULL,
	[SendPhone] [nvarchar](50) NULL,
	[Contex] [nvarchar](255) NULL,
	[_Flag] [nvarchar](10) NULL,
	[SendTime] [datetime] NULL,
	[AskTime] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[tab_ring]    Script Date: 08/28/2013 13:45:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tab_ring](
	[_ID] [int] NOT NULL,
	[asktime] [nvarchar](50) NULL,
	[askcontex] [nvarchar](50) NULL,
	[ringnumber] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[tab_HistoricalData]    Script Date: 08/28/2013 13:45:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tab_HistoricalData](
	[DevID] [nvarchar](255) NULL,
	[DevType] [smallint] NULL,
	[DevAddress] [nvarchar](50) NULL,
	[DevModel] [nvarchar](50) NULL,
	[DevName] [nvarchar](255) NULL,
	[DevLocation] [nvarchar](255) NULL,
	[Temp] [real] NULL,
	[Humi] [real] NULL,
	[TempRange] [nvarchar](50) NULL,
	[HumiRange] [nvarchar](50) NULL,
	[ReadTime] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[tab_data]    Script Date: 08/28/2013 13:45:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tab_data](
	[ID] [int] NOT NULL,
	[PortNo] [int] NULL,
	[_name] [nvarchar](255) NULL,
	[_map] [nvarchar](255) NULL,
	[_parentID] [nvarchar](50) NOT NULL,
	[_address] [smallint] NULL,
	[Temp] [real] NULL,
	[Humidity] [real] NULL,
	[ReadDate] [datetime] NULL,
	[_t_alarm] [nvarchar](255) NULL,
	[_h_alarm] [nvarchar](255) NULL,
	[_t_normal] [nvarchar](50) NULL,
	[_h_normal] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[tab_CurData]    Script Date: 08/28/2013 13:45:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tab_CurData](
	[C_ID] [nvarchar](50) NOT NULL,
	[C_Name] [nvarchar](255) NULL,
	[C_Address] [int] NULL,
	[C_Location] [nvarchar](50) NULL,
	[C_Temp] [float] NULL,
	[C_Humi] [float] NULL,
	[C_Static] [nvarchar](50) NULL,
	[C_Memo] [nvarchar](255) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[tab_alarm]    Script Date: 08/28/2013 13:45:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tab_alarm](
	[_name] [nvarchar](255) NULL,
	[_map] [nvarchar](255) NULL,
	[_sendsms] [nvarchar](50) NOT NULL,
	[_Number] [nvarchar](255) NULL,
	[_Address] [nvarchar](50) NOT NULL,
	[_Type] [nvarchar](10) NULL,
	[_Value] [real] NULL,
	[_Bound] [nvarchar](50) NULL,
	[_AlarmTime] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[t_gsm]    Script Date: 08/28/2013 13:45:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[t_gsm](
	[_id] [int] NOT NULL,
	[_tel] [nvarchar](50) NULL,
	[_memo] [nvarchar](255) NULL,
	[_type] [nvarchar](10) NULL
) ON [PRIMARY]
GO
