473,657 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1399
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******* *************@g iganews.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.OrderExpe diterEmpID
join Emp E2 on Emp.EmpID = Order.QualityCo ntrolEmpID

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******** ************@gi ganews.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
2425
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 own e-mail l.braidi@delfi.it Thanks Lorenzo Braidi
1
1543
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 user. Thanks! <Keeps fingers crossed> Jack
0
1480
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 Tim
15
2455
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 upgrade because the database admin or even the developer is going to convince management it's worth the cost regardless if SQL server can do C# or VB.NET stored procedures. This is because the performance is terrible and Oracle has had Java stored...
1
1561
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 and use them as you would within any other .Net assembly. So what I'm looking for is some sort of best-practice document that explores the design implications of this. Any oo developer that does a lot of database-centric design has probably built a...
4
1669
by: trexim | last post by:
It seems that .NET does not support xsd:extension and xsd:attribute. What is the alternative? Thanks,
0
1420
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 and another which has the same keys but has an additional level of nest which produces a much smaller DataSet.cs file using command line xsd test.xml /d
53
4063
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 object shall have its stored value modified at most once by the evaluation of an expression. Furthermore, the prior value shall be accessed only to determine the value to be stored." Can someone give me examples of expressions that "barely"...
52
2859
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 database (especially with some of the hype about what can be done in Yukon). Before passing this off as an absurd statement, it could be done and would simplify code dramatically. To me, it's one of those things that people just simply don't think...
0
8395
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6166
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.