Advertisement
Advertisement
| 05.13.2008 at 05:33AM PDT, ID: 23397440 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: |
<root>
<Person>
<Name>John</Name>
<Asset>
<Description>John's first asset</Description>
</Asset>
<Asset>
<Description>John's second asset</Description>
</Asset>
<Asset>
<Description>John's third asset</Description>
</Asset>
</Person>
<Person>
<Name>Mary</Name>
<Asset>
<Description>Mary's first asset</Description>
</Asset>
<Asset>
<Description>Mary's second asset</Description>
</Asset>
</Person>
</root>
USE [mytestDB]
GO
/****** Object: Table [dbo].[People] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[People](
[PersonID] [int] IDENTITY(1,1) NOT NULL,
[Name] [nchar](50) NOT NULL,
CONSTRAINT [PK_People] PRIMARY KEY CLUSTERED
(
[PersonID] 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
/****** Object: Table [dbo].[Assets] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Assets](
[AssetID] [int] IDENTITY(1,1) NOT NULL,
[PersonID] [int] NOT NULL,
[AssetDescription] [nchar](200) NOT NULL,
CONSTRAINT [PK_Assets] PRIMARY KEY CLUSTERED
(
[AssetID] 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].[Assets] WITH CHECK ADD CONSTRAINT [FK_Assets_People] FOREIGN KEY([PersonID])
REFERENCES [dbo].[People] ([PersonID])
GO
ALTER TABLE [dbo].[Assets] CHECK CONSTRAINT [FK_Assets_People]
|