I'm a VB6 / MS Access programmer trying to get up to speed in the world of
ASP.NET and SQL Server 2000. I'm on a fairly large web database project so
I'm trying to use VisualUML for management of the database schema. I expect
many generations of design as the requirements become defined in an iterate
process. Therefore a DB design tools like VisualUML is highly desirable.
When I worked through the WebMatrix tutorials I built a table in SQL Server
Enterprise Manager whose Create SQL looks like this (generated from SQL
Query Analyzer):
CREATE TABLE [wmt_Orders] (
[OrderID] [int] IDENTITY (1, 1) NOT NULL ,
[OrderDate] [datetime] NOT NULL ,
[CustomerName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS N
OT NULL
,
CONSTRAINT [PK_wmt_Orders] PRIMARY KEY CLUSTERED
(
[OrderID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
I've been trying to use VisualUML to create the *same* *exact* thing.
Here's my first "maybe" try (from SQL Query Analyzer):
CREATE TABLE [wmt_Orders_2] (
[OrderID] [int] NOT NULL ,
[OrderDate] [datetime] NOT NULL ,
[CustomerName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS N
OT NULL
,
PRIMARY KEY CLUSTERED
(
[OrderID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
I noticed the lack of the CONSTRAINT on the primary key. Here are two more
tries, setting various attributes in VisualUML.
CREATE TABLE [wmt_Orders_3] (
[OrderID] [int] IDENTITY (100, 1) NOT NULL ,
[OrderDate] [datetime] NOT NULL ,
[CustomerName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS N
OT NULL
,
PRIMARY KEY CLUSTERED
(
[OrderID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [wmt_Orders_4] (
[OrderID] [int] IDENTITY (100, 1) NOT NULL ,
[OrderDate] [datetime] NOT NULL ,
[CustomerName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS N
OT NULL
,
PRIMARY KEY CLUSTERED
(
[OrderID]
) ON [PRIMARY] ,
UNIQUE NONCLUSTERED
(
[OrderID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
I haven't been able to figure out how to make VisualUML create a table whose
CREATE SQL is identical to that created "by hand." Are any of these "close
enough" to be completely useful? (If so I hope it's wmt_Orders_2 ! <g> )
The project I'm working on has scores of tables and quite a few 0-M:0M
(zero-Many:zero-Many) relationships so I really want to avoid future
problems caused by current ignorance. ;-)
Thanks, & please go easy on the SQL Server 2000 newbie! <g>
-- MarkHi Mark,
I learned you want to use VisualUML to create table DDL as below:
CREATE TABLE [wmt_Orders] (
[OrderID] [int] IDENTITY (1, 1) NOT NULL ,
[OrderDate] [datetime] NOT NULL ,
[CustomerName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS N
OT NULL
,
CONSTRAINT [PK_wmt_Orders] PRIMARY KEY CLUSTERED
(
[OrderID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
For this VisualUML question, you can post it into the VisualUML forum for
further support.
http://www.visualobject.com/forums/
http://www.visualuml.com/default.htm
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
This document contains references to a third party World Wide Web site.
Microsoft is providing this information as a convenience to you. Microsoft
does not control these sites and has not tested any software or information
found on these sites; therefore, Microsoft cannot make any representations
regarding the quality, safety, or suitability of any software or
information found there. There are inherent dangers in the use of any
software found on the Internet, and Microsoft cautions you to make sure
that you completely understand the risk before retrieving any software from
the Internet.
No comments:
Post a Comment