EntryId uniqueIdnetifier PKey for this table ,UserId uniqueIdnetifier FKey to Blogers
,TimeStamp DateTime Sort filter ,Entry Text Content. uniqueIdnetifier = GUID to me, you could use an int but don't in this case. Pretty simple, lean and mean design. ......................... Stephen Russell - Senior Visual Studio Developer, DBA Memphis, TN 901.246-0159 From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jon Liu Sent: Tuesday, November 18, 2008 9:51 AM To: [email protected] Subject: [DotNetDevelopment] Re: Auto-generating a primary key Interesting, but the table is used to store user web blog entries, structure looks as follows: UserId,TimeStamp,Entry,EntryId I guess I could rely on the TimeStamp to be unique, but I feel like there should be a primary key directly assocated with the record as opposed to just a unique timestamp. On Tue, Nov 18, 2008 at 7:40 AM, Glenn <[EMAIL PROTECTED]> wrote: How do you plan to re-create that number so that you can access the record later? Any "random" value that you would use has to have the ability to be re-created later so that you can access that record. If you're simply putting records into a table for tracking, you don't necessarily need to have a primary key. You can use an un-keyed table. ...Glenn On Tue, Nov 18, 2008 at 10:22 AM, Jon Liu <[EMAIL PROTECTED]> wrote: Right, primary key values are unique. So what I am saying is I want to auto generate the Id like a counter. Example, when I insert an entry, I'd like it to generate EntryId=1, then on the next insertion, EntryId=2, then EntryId=3 so on and so forth... No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.6/1797 - Release Date: 11/18/2008 11:23 AM
