Solved

Timestamp in Visio

Posted on 2004-03-20
7
1,891 Views
Last Modified: 2007-12-19
I have a timestamp column in SQLServer... While designing in Visio I dont have timestamp column ....How can I assign a timestamp datatype in visio???
0
Comment
Question by:sainavya1215
  • 4
  • 3
7 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 125 total points
ID: 10643283
Don't know

does visio support a rowversion datatype in which case that what an MS SQL Timestamp really is


otherwise  you'd need to create your own type which implemented as an 8byte "rowversion"

from SQL 2000 onwards Miscrosofts advice is to use rowversion instead of timestamp as they intend to align Timestamp with datetime
as per the ANSI 92 standard..

hth
0
 

Author Comment

by:sainavya1215
ID: 10643318
There is nothing such as rowVersion dataType  in  Visio.... I DINT FIND IT IN SQLSERVER2000 Too...

1) How can i use rowversion in sql server2000
2)How can I create a new datatype in visio of rowversion type when rowversion doesnot exist?
0
 
LVL 50

Assisted Solution

by:Lowfatspread
Lowfatspread earned 125 total points
ID: 10643332
from SQL 2000 BOL

search rowversion links to TIMESTAMP


timestamp
timestamp is a  data type that exposes automatically generated binary numbers, which are guaranteed to be unique within a database. timestamp is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes.

Remarks
The Transact-SQL timestamp data type is not the same as the timestamp data type defined in the SQL-92 standard. The SQL-92 timestamp data type is equivalent to the Transact-SQL datetime data type.

A future release of Microsoft® SQL Server™ may modify the behavior of the Transact-SQL timestamp data type to align it with the behavior defined in the standard. At that time, the current timestamp data type will be replaced with a rowversion data type.

Microsoft® SQL Server™ 2000 introduces a rowversion synonym for the timestamp data type. Use rowversion instead of timestamp wherever possible in DDL statements. rowversion is subject to the behaviors of data type synonyms. For more information, see Data Type Synonyms.

In a CREATE TABLE or ALTER TABLE statement, you do not have to supply a column name for the timestamp data type:

CREATE TABLE ExampleTable (PriKey int PRIMARY KEY, timestamp)

If you do not supply a column name, SQL Server generates a column name of timestamp. The rowversion data type synonym does not follow this behavior. You must supply a column name when you specify rowversion.

A table can have only one timestamp column. The value in the timestamp column is updated every time a row containing a timestamp column is inserted or updated. This property makes a timestamp column a poor candidate for keys, especially primary keys. Any update made to the row changes the timestamp value, thereby changing the key value. If the column is in a primary key, the old key value is no longer valid, and foreign keys referencing the old value are no longer valid. If the table is referenced in a dynamic cursor, all updates change the position of the rows in the cursor. If the column is in an index key, all updates to the data row also generate updates of the index.

A nonnullable timestamp column is semantically equivalent to a binary(8) column. A nullable timestamp column is semantically equivalent to a varbinary(8) column.

0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 50

Expert Comment

by:Lowfatspread
ID: 10643342
have you tried reverse engineering a table containing a timestamp column into visio to see what it does with it?

my long term suggestion though would be to use a proper database modelling tool not an overgrown flowchart drawing tool..
0
 

Author Comment

by:sainavya1215
ID: 10643349
Thanks a lot for the info provided...
0
 

Author Comment

by:sainavya1215
ID: 10643383
Hi Low,

I did reverse engineer a table from SQL Server ...Now it worked .... I can see the SQL Server dataTypes and it populated Timestamp field with timestamp column.

This means that we have to first have the tables in sqlserver and then use this tool...
0
 

Author Comment

by:sainavya1215
ID: 10644451
Hi low No answer from you after u posted ur last question regarding 3 tables referential integrity quesiton.........whats wrong???
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question