1: USE [OSM]
2: GO
3: CREATE TABLE [dbo].[Nodes](
4: [node_Id] [bigint] NOT NULL,
5: [id] [bigint] NULL,
6: [lat] [float] NULL,
7: [lon] [float] NULL,
8: [geog] [geography] NULL,
9: CONSTRAINT [PK_Nodes] PRIMARY KEY CLUSTERED
10: (
11: [node_Id] ASC
12: )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
13: ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
14:
15: CREATE TABLE [dbo].[NodeTag](
16: [key] [nvarchar](250) NULL,
17: [value] [nvarchar](3000) NULL,
18: [node_Id] [bigint] NULL
19: ) ON [PRIMARY];
20: GO
21: CREATE TABLE [dbo].[Relation](
22: [relation_Id] [bigint] NOT NULL,
23: [id] [bigint] NULL,
24: [visible] [bit] NULL,
25: CONSTRAINT [PK_Relation] PRIMARY KEY CLUSTERED
26: (
27: [relation_Id] ASC
28: )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
29: ) ON [PRIMARY]
30: GO
31: CREATE TABLE [dbo].[RelationMember](
32: [type] [nvarchar](8) NULL,
33: [ref] [bigint] NULL,
34: [role] [nvarchar](250) NULL,
35: [relation_Id] [bigint] NULL,
36: [RelationPosition] [int] IDENTITY(1,1) NOT NULL
37: ) ON [PRIMARY]
38:
39: GO
40: CREATE TABLE [dbo].[RelationTag](
41: [key] [nvarchar](250) NULL,
42: [value] [nvarchar](3000) NULL,
43: [relation_Id] [bigint] NULL
44: ) ON [PRIMARY]
45:
46: GO
47: CREATE TABLE [dbo].[Way](
48: [way_Id] [bigint] NOT NULL,
49: [id] [bigint] NULL,
50: [visible] [bit] NULL,
51: CONSTRAINT [PK_Way] PRIMARY KEY CLUSTERED
52: (
53: [way_Id] ASC
54: )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
55: ) ON [PRIMARY]
56:
57: GO
58: CREATE TABLE [dbo].[WayNode](
59: [ref] [bigint] NULL,
60: [way_Id] [bigint] NULL,
61: [WaiNodePosition] [bigint] IDENTITY(1,1) NOT NULL
62: ) ON [PRIMARY]
63: GO
64: CREATE TABLE [dbo].[WayTag](
65: [key] [nvarchar](250) NULL,
66: [value] [nvarchar](3000) NULL,
67: [way_Id] [bigint] NULL
68: ) ON [PRIMARY]
69:
70: GO