On Tue, Jun 23, 2009 at 4:51 PM, MB Software Solutions, LLC < [email protected]> wrote:
> I like to design in n-tier fashion, so that I can use either a VFP or > non-VFP (like MySQL) backend on the flip of a switch. > > I'm creating a new framework that will use GUID primary keys instead of > integers. > > My question is this: is it best to generate those GUIDs from the app or > use some stored proc in the database? I'm thinking the former should > suffice, but of course I have slight concern of some freak occurrence of > the same string key. Very remote chance probably, but I like to be sure > and use the best practice if possible. > --------------------------------- My take on this point. GUIDs are easier to deal with toady and into the future. Ints can run out of #s, and trust me if your system is big enough it will multiple times, just ask Hilton Hotels Auditing group. :) GUIDs give you an impact on INSERTS today. There is no free lunch! The freedom of combining your data into another system that bought your client, or taking in another that your client just bought is PROBABLE. Resetting their int keys to fit yours will SUCK. Where do I create my GUID? In the app. Why have to do an insert to get a result back to then update in ram your child values that also need to be inserted with the parent key as well. Last point here. "some freak occurrence of the same string key." What part of Uniqueidentifier don't you understand. A GUID looks like a string but it is not. -- Stephen Russell Sr. Production Systems Programmer SQL Server DBA Web and Winform Development Independent Contractor Memphis TN 901.246-0159 --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

