• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1976
  • Last Modified:

Timestamp in Visio

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
sainavya1215
Asked:
sainavya1215
  • 4
  • 3
2 Solutions
 
LowfatspreadCommented:
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
 
sainavya1215Author Commented:
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
 
LowfatspreadCommented:
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LowfatspreadCommented:
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
 
sainavya1215Author Commented:
Thanks a lot for the info provided...
0
 
sainavya1215Author Commented:
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
 
sainavya1215Author Commented:
Hi low No answer from you after u posted ur last question regarding 3 tables referential integrity quesiton.........whats wrong???
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now