Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Storing GUIDs in Oracle
Jeff Boenig wrote:
> I did check the SQL Reference and the only occurrence of GUID that I found
> (aside from alot of hits on the word Guide) is the documentation for the
> SYS_GUID() function. That answers the question of whether a GUID can be
> stored in the database. The other part of my question is whether you can use
> it as a primary key. The documentation talks about RAW and LOB datatypes
> together and states that LOB columns cannot be used as primary keys and
> cannot be indexed. It doesn't say whether the same applies to RAW columns.
>
> I was also hoping to find out if anyone has tried this with the ADO.NET to
> see if it converts the column properly. I was also hoping to get some
> feedback from people who have used GUIDs as primary keys in Oracle
> databases, to find out what they thought of the technique.
>
> There isn't a straightforward answer to my questions in the SQL Reference. I
> want to design my database to work equally well with MS-SQL and Oracle,
> which is why I thought posting these questions on this newsgroup would be a
> constructive thing to do.
>
> The purpose of a newsgroup is exchange ideas and experience. That's what I
> was looking for and I think that my questions are relevant.
>
> If you didn't think my question was worthy of answer, you shouldn't have
> posted a response. I think you took the trouble to respond because you get
> some sort of weird satisfaction out of telling someone to RTFM. No, I don't
> know as much about Oracle as you do. You're soooo smart. Maybe the hostile
> response had something to do with my mention of MS-SQL.
>
> "Maximus" <qweqwe_at_qwqwewq.com> wrote in message
> news:bzxTa.523341$Vi5.13452754_at_news1.calgary.shaw.ca...
> > "Jeff Boenig" <jeff.boenig_at_elsitech.com> wrote in message
> > news:3f1e9642$1_at_btitelecom.net...
> > > I'm developing a .NET application that will support both MS SQL Server
> and
> > > Oracle 9i and above. I want to use GUIDs as the primary key in several
> > > tables. MS SQL supports this nicely using the UNIQUEIDENTIFIER data
> type.
> > > The ADO.NET OleDb data provider automatically converts it to a
> > System.Guid.
> > >
> > > Is it possible to store GUIDs in Oracle databases? There doesn't appear
> > to
> > > be a GUID data type in Oracle 9i. Could I store it as RAW(16)? If I do,
> > > would I be able to create an index on that column? Does Oracle 10i have
> > > support for GUID?
> >
> > Load the Oracle SQL reference into Adobe Acrobat, search for "GUID."
> >
> > Why are so many programmers completely useless at doing basic research?
> >
> > Yes I'm flaming you.
> >
> >
I can't speak for Maximus but will give you the following for your perspective.
So drop the attitude ... we aren't biggots ... and understand that to work with Oracle REQUIRES reading and research. And that to get along in this group requires demonstrating that you have made an effort to help yourself.
Regards,
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Fri Jul 25 2003 - 12:10:47 CDT
![]() |
![]() |