Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Key
Message
 
To
06/06/2003 07:42:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00797053
Message ID:
00797131
Views:
25
Your point is noticable enough. Practically & Feasibility are two important points with developers.

I got some good article with me on RowID. Just went through our course of discussion.

Would like to give a look.

Aashish




>It generates the unique RowID. Why not use it then.
>From VFP side you wouldn't update that value. ie:
>Table (RowID PK generated as a default by Oracle, otherfield char(10))
>insert into yourTable (otherfield) values ('newrecord')
>
>Better implementation might be generating a GUID at VFP side and submit that as a key to backend.
>Cetin
>
>>Tha table in itself dosent generate Primark Key. It generates RowID which is unique to itself and used for Oracle table Operation.
>>
>>User generates key through sequence or any customized logic. But in no case you can define
>>
>>Creat Table Emp (Code Number(10)constraint p_key Primary Key default Sequence.Nextval)
>>
>>This kind of statement is wrong as it dosent support pseudo columns(Sequence.nextval) in Default clause.
>>
>>OR mention the null or empty in The Code is Primary.
>>
>>
>>Aashish
>>
>>>I mean backend wouldn't take but generate the id itself. If you'd generate then you'd decide to update it too or not.
>>>Cetin
>>>
>>>
>>>>Can't understand what you mean by ?
>>>>
>>>> surrogate IOW autogenerated ids.
>>>>
>>>>
>>>>Aashish
>>>>
>>>>>Take ? I said surrogate IOW autogenerated ids.
>>>>>Cetin
>>>>>
>>>>>>Well, primary key defined fields in Oracle dosent take empty or null values.
>>>>>>
>>>>>>Aashish
>>>>>>
>>>>>>>I believe in Oracle too you can generate surrogate primary keys.
>>>>>>>Cetin
>>>>>>>>I am mainly an Oracle guy. So it was tough for me to digest.
>>>>>>>>
>>>>>>>>Aashish
>>>>>>>>
>>>>>>>>>>Hi,
>>>>>>>>>>
>>>>>>>>>>Primary key accepts empty values. Should Primark Key behave like this ?
>>>>>>>>>>Am I wrong somewhere ?
>>>>>>>>>
>>>>>>>>>If a primary key is accepting an empty value it's normal. It ensures value would be unique but doesn't guarantee it wouldn't be empty. ie: For an integer PK 0 is a perfectly legal value.
>>>>>>>>>But if a primary key is accepting empty values then you've a problem. Keys might not be updating at all.
>>>>>>>>>Not empty is something you should control as well as not null.
>>>>>>>>>Cetin
--
--
Aashish Sharma
Tele Nos: +1-201-490-5405
Mobile: +91-9821053938
E-Mail:
aashish@aashishsharma.com
write2aashish@gmail.com

You better believe in yourself... if you don't, who else will ?
TODAY is a gift, that's why it's called PRESENT
Previous
Reply
Map
View

Click here to load this message in the networking platform