Re: mySQL integer types

2012-01-17 Thread Pete
Hi Bob, I don't think that's true. I think you can have it not autoincrement and supply the primary key value yourself when you insert a row. In fact, you have to do that if the primary key is one of the text data types since autoincrement doesn't make any sense in that context. Pete On Mon,

Re: mySQL integer types

2012-01-17 Thread Bob Sneidar
Oh right duh that makes sense. I have no idea where I got that. Bob On Jan 17, 2012, at 11:47 AM, Pete wrote: Hi Bob, I don't think that's true. I think you can have it not autoincrement and supply the primary key value yourself when you insert a row. In fact, you have to do that if the

mySQL integer types

2012-01-16 Thread Bob Sneidar
Hi all. I am a little bit concerned with defining integer types. The manual defines INT as using 4 bytes for storage, for a maximum of 4294967296 values. However, I read somewhere (possibly here) that for auto incrementing keys I should use int(64) the maximum allowed. Does that mean that my

mySQL integer types

2012-01-16 Thread Bob Sneidar
Upon further investigation, I see that the number supplied as an argument to the data type is the actual number of digits or significant bits. I guess for my purposes bigint is all I will need for things like uniqueid's. I can write an overflow function at some point that will use vacated

Re: mySQL integer types

2012-01-16 Thread Jan Schenkel
Rochefoucauld) From: Bob Sneidar b...@twft.com To: How to use LiveCode use-livecode@lists.runrev.com Sent: Monday, January 16, 2012 8:14 PM Subject: mySQL integer types Hi all. I am a little bit concerned with defining integer types. The manual defines INT as using 4

Re: mySQL integer types

2012-01-16 Thread Pete
Hi Bob, Int(64) refers to the external display of a column, not its internal storage space. As you mentioned INT takes 4 bytes of storage but its external display format can be up 10 chars. I guess if you're really concerned about it, you could use BIGINT but there is no theoretical software

Re: mySQL integer types

2012-01-16 Thread Bob Sneidar
On Jan 16, 2012, at 12:56 PM, Pete wrote: In SQLite, if you define an INTEGER PRIMARY KEY column with AUTOINCREMENT keyword, primary key values are always allocated as the next highest value for the table, but if you omit the AUTOINCREMENT, then values freed up by deleted rows may get

Re: mySQL integer types

2012-01-16 Thread stephen barncard
I remember in Trevor's original DB abstraction library (before SQL Yoga) he used a manual indexing method, instead using a special table of indexes for each table that is used. That allowed the changing the actual value of the keys if needed. Automatic indexing is a feature that is not mandatory,