Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 5 of 5 total |
Autoinc's & GUID's |
Thu, Sep 19 2013 9:28 PM | Permanent Link |
Adam H. | Hi,
Just throwing a question out there regarding Autoinc's and GUID's. At preent I have GUID's in my application. They work extremely well. The main advantage I have with them is to use one field in one table to link to records in multiple tables knowing that there will never be a record (regardless of the table) with the same unique identifier. (ie, If I have a transaction table, I can have a field called Contract, and link this to either a purchase contract or sales contract record even though I have separate tables for purchase & sales contracts, knowing that it's a unique record, so it will only link where applicable) The only issue I have with GUID's is that because my application has so many lookup fields - every record takes up a number of bytes and thus makes the data quite large. (Backups, etc) However if I was to use Autoinc fields, I probably couldn't do what I'm doing, and would require separate fields. I was wondering would it be bad practise to use Autoinc fields, but say start the sales contracts at some very large number (ie, 100,000,000) and the purchase contracts at 1, knowing that the database will never end up having the same number for both a purchase contract and a sales contract? Would this be acceptable? I can't change my current application, but I'm just thinking out load for future applications. Best Regards Adam. |
Fri, Sep 20 2013 3:43 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Adam
>I was wondering would it be bad practise to use Autoinc fields, but say >start the sales contracts at some very large number (ie, 100,000,000) >and the purchase contracts at 1, knowing that the database will never >end up having the same number for both a purchase contract and a sales >contract? Would this be acceptable? Or you could have an extra 1 byte column with S or P in it and use a two column link. Roy Lambert [Team Elevate] |
Mon, Sep 23 2013 1:52 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Adam,
<< I was wondering would it be bad practise to use Autoinc fields, but say start the sales contracts at some very large number (ie, 100,000,000) and the purchase contracts at 1, knowing that the database will never end up having the same number for both a purchase contract and a sales contract? Would this be acceptable? >> Sure, as long as you were positive that you wouldn't have any conflicts. Ranges are used with replication sometimes to isolate autoinc/identity values between disparate locations. Tim Young Elevate Software www.elevatesoft.com |
Tue, Sep 24 2013 12:33 AM | Permanent Link |
Adam H. | Hi Roy,
> Or you could have an extra 1 byte column with S or P in it and use a two column link. Thanks. That is another idea. I guess I'm wanting to keep as simple as possible (and have always liked the current GUID where I don't have to care about such matters just do a join and forget ) Cheers Adam. |
Tue, Sep 24 2013 12:35 AM | Permanent Link |
Adam H. | Hi Tim,
> Sure, as long as you were positive that you wouldn't have any conflicts. > Ranges are used with replication sometimes to isolate autoinc/identity > values between disparate locations. Thanks for that. Gives me an idea of what I might be able to do in the future! Best Regards Adam. |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |