Book a Demo

Author Topic: GUID function  (Read 3673 times)

MiraPospisil

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
GUID function
« on: October 25, 2007, 04:35:17 am »
Hello

I'have EA repository in Oracle DB and just trying some DDL directly via SQL. I'have some question regarding this and GUID.

What is function of GUID?
Is necessary to provide GUID with creating attribute, tagged value, etc...?
How is GUID constructed? (if creation is needed for correct function of EA)

For example. I'v created attribute directly by inserting it into t_attribute table (with using correct sequence...). It appears in my class and after some manipulation it has also GUID (i think after renaming it).

TIA

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: GUID function
« Reply #1 on: October 25, 2007, 05:06:33 am »
This is simply a Globally Unique IDentifier. In the Unix world this would be a UUID. They are a 128-bit binary value. You could treat it as a very long integer for purposes of storage, or as a short binary value.

They are often expressed as a hex string, with dashes in specific places (strictly for readability). In the Microsoft world the string is often surrounded by braces.

Oracle provides the SYS_GUID function to generate new GUID values, which are stored in RAW(16) format.

There have been reported problems with the above function, particularly on AIX. I have not seen much on these issues for a year or more - but I've not been looking for such information either - so I don't know if or how Oracle may have addressed these issues.

HTH, David

PS: Look GUID up in WikiPedia, and follow the links.
« Last Edit: October 25, 2007, 05:07:40 am by Midnight »
No, you can't have it!

MiraPospisil

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: GUID function
« Reply #2 on: October 25, 2007, 05:53:04 am »
Thanks for quick answer

So if i manage to generate GUID and store it with other attributes of table all should be fine?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: GUID function
« Reply #3 on: October 25, 2007, 06:10:39 am »
Yes, sort of...

If you get EA to create an element (or whatever) and then call Update(), EA will create the necessary GUID. You can then query your new element (or whatever, again) to obtain this value; use the appropriate property.

You can also assign these yourself. You must do so immediately after creating the element, before you call Update(). EA will then use the value you supplied.

You can use these values for some calls to the XML interface. Remember that since a GUID would be an improper name syntax in XML, EA adds a prefix to the GUID. There are two functions of the Repository class that will convert from and to these values for you. [I'll leave it to you to look them up.]

HTH, David
No, you can't have it!