473,408 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Yukon - will it support sequence object?

I did some search and didn't find anything about whether Yokon will
support sequence object. Appreciate it if you can reply with some
resources.

Thanks, James
Jul 20 '05 #1
6 1386
Yukon has ROW_NUMBER(), which gives similar functionality.

--
David Portas
SQL Server MVP
--
Jul 20 '05 #2
"David Portas" <RE****************************@acm.org> wrote in message news:<Da********************@giganews.com>...
Yukon has ROW_NUMBER(), which gives similar functionality.


David,

It looks like sequence is still tied to a given table, and will be
similar/same to identity column? Will Yukon support a sequencing
mechanism that is not specific to any table?

Thanks,
James
Jul 20 '05 #3
It isn't too difficult to use IDENTITY or even ROWVERSION as a
table-independent sequence generator. Just use a redundant table to generate
the sequence and then INSERT the keys where you need them.

I would much prefer to use a numbers table for this sort of thing. Making a
surrogate key serializable across multiple tables seems like the worst of
both worlds to me: a non-intelligent key plus a potential bottleneck and
resource hog.

--
David Portas
SQL Server MVP
--
Jul 20 '05 #4
> I would much prefer to use a numbers table for this sort of thing. Making a
surrogate key serializable across multiple tables seems like the worst of
both worlds to me: a non-intelligent key plus a potential bottleneck and
resource hog.


The advantage of the independent sequence is to allow your generated
value to have check digits etc applied before using it as a key in the
target table. Eg policy numbers or any number you expect a user to key
in for searches etc.

While there are alternatives, the sequence as specified in the
SQL-2003 standard is the most convenient and versatile method to
generate key values.

Christian.
Jul 20 '05 #5
You say Non-Intelligent Key .. I say Abstract Key.

The ID values should still be in temporal order (smaller ID # is earlier) so
its not truly without meaning.

The benefit of having a single pool of next id numbers to pull from across
all tables, is the ability to prevent bad joins by separating the domains of
each attribute.

If you have an employee and orders table both with an identity column the
following join will work even though its meaningless

select *
from Emp
join Order on Emp.EmpID = Order.OrderID

A single sequence generator that feeding both would mean that there never
would be an Order ID with the same value as an employee ID.

Also an Employee ID can be placed in other columns as an attribute without
causing confusion

select *
from Order
join Emp E1 on Emp.EmpID = Order.OrderExpediterEmpID
join Emp E2 on Emp.EmpID = Order.QualityControlEmpID

In this case a bad join would not bring back any rows (e.g. QC emps are not
listed in the Emp Table).

As for performance, I sort of see your point, but there are ways around that
if you really hit the wall (preallocate ranges for bulk operations, etc.)

We must not sacrifice the quality of the data in exchange for speed (in my
little value system anyway).


"David Portas" <RE****************************@acm.org> wrote in message
news:ja********************@giganews.com...
It isn't too difficult to use IDENTITY or even ROWVERSION as a
table-independent sequence generator. Just use a redundant table to generate the sequence and then INSERT the keys where you need them.

I would much prefer to use a numbers table for this sort of thing. Making a surrogate key serializable across multiple tables seems like the worst of
both worlds to me: a non-intelligent key plus a potential bottleneck and
resource hog.

--
David Portas
SQL Server MVP
--

Jul 20 '05 #6
> The ID values should still be in temporal order (smaller ID # is
earlier) so its not truly without meaning.


In a set-based INSERT all the rows are inserted simultaneously and they get
arbitrary keys. The sequence is non-deterministic and non-reproducable even
if you know the temporal order. There's a similar problem of how to merge
data from external sources into a table with a surrogate key. You are
heading for trouble as soon as you ascribe ANY meaning to a surrogate IMO.

--
David Portas
SQL Server MVP
--
Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Lorenzo Braidi | last post by:
Hallo everyone, is there someone who is partecipating to the Microsoft Yukon Beta test and who can send me some picture of the new GUI of Enterprise Manager and Query Analyser? Send it at my...
1
by: Jack Victor | last post by:
Hi, Can anyone please tell me if there will be support in SQL2005 - Yukon for datafiles to be placed on Compressed volumes or if there will be compression of the data that is transparent to the...
0
by: Tim Anderson | last post by:
I've posted my interview with Microsoft product manager Euan Garden which goes into some detail about XML support in the forthcoming SQL Server update. http://www.itwriting.com/sqlyukon.php ...
15
by: nospam | last post by:
Once Yukon is released (whenever that might be) does anyone from MS have any comment on licensing for Yukon and on SQL 2000. I really don't think anyone with SQL 2000 licenses are going to...
1
by: Jon | last post by:
Hola all, I've been pretty excited reading about the object features that are going into the next version of SQL Server. In short, you will be able to natively add objects as User defined types...
4
by: trexim | last post by:
It seems that .NET does not support xsd:extension and xsd:attribute. What is the alternative? Thanks,
0
by: magister | last post by:
Hello, Can anyone please help me to understand why when I use one XSD file to create a DataSet.cs file it gives me a much longer file with more cs code which allows Typing for all my elements...
53
by: Deniz Bahar | last post by:
I know the basic definition of a sequence point (point where all side effects guaranteed to be finished), but I am confused about this statement: "Between the previous and next sequence point an...
52
by: malcolm | last post by:
Here are a couple of dramatic requests that I've always thought should be implemented. 1) Uniform null. I wish .NET would implement a uniform value for nulls accross the board. Even into the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.