Re: [sqlite] suggestion on the database design

2009-08-20 Thread pierr
John Machin wrote: > > On 21/08/2009 1:29 PM, pierr wrote: >> >> Simon Slavin-2 wrote: >>> >>> On 21 Aug 2009, at 3:26am, pierr wrote: >>> I did not know the sequence in defining the field matters. This is what I should have done. >>> Sorry, I should have explained better. You were r

Re: [sqlite] suggestion on the database design

2009-08-20 Thread John Machin
On 21/08/2009 1:29 PM, pierr wrote: > > Simon Slavin-2 wrote: >> >> On 21 Aug 2009, at 3:26am, pierr wrote: >> >>> I did not know the sequence in defining the field matters. This is >>> what I should have done. >> Sorry, I should have explained better. You were right: there is no >> difference.

Re: [sqlite] suggestion on the database design

2009-08-20 Thread pierr
Simon Slavin-2 wrote: > > > On 21 Aug 2009, at 3:26am, pierr wrote: > >> I did not know the sequence in defining the field matters. This is >> what I should have done. > > Sorry, I should have explained better. You were right: there is no > difference. I was just rearranging the fields in

Re: [sqlite] suggestion on the database design

2009-08-20 Thread John Machin
On 21/08/2009 12:59 PM, Simon Slavin wrote: > On 21 Aug 2009, at 3:26am, pierr wrote: > >> I did not know the sequence in defining the field matters. This is >> what I should have done. > > Sorry, I should have explained better. You were right: there is no > difference. I was just rearranging

Re: [sqlite] suggestion on the database design

2009-08-20 Thread Simon Slavin
On 21 Aug 2009, at 3:26am, pierr wrote: > I did not know the sequence in defining the field matters. This is > what I should have done. Sorry, I should have explained better. You were right: there is no difference. I was just rearranging the fields in the classic way: with the primary key

Re: [sqlite] suggestion on the database design

2009-08-20 Thread pierr
Simon Slavin-2 wrote: > > If ts_start is an always increasing integer (i.e. no two records have > the same value) then I would see it as your primary key and as your > row id. In other words, your structure is more like > > CREATE TABLE IF NOT EXISTS tblIndex( > ts_start INTEGER PRI

Re: [sqlite] suggestion on the database design

2009-08-20 Thread Simon Slavin
On 20 Aug 2009, at 2:33pm, pierr wrote: > We have a database with a very simple schema: >CREATE TABLE IF NOT EXISTS tblIndex( > frame_type INT, > pts VARCHAR(5), > ts_start INT primary key, > ts_end INT) > > And the application scenario is : > 1. Every second usr will ins

Re: [sqlite] suggestion on the database design

2009-08-20 Thread P Kishor
On Thu, Aug 20, 2009 at 8:33 AM, pierr wrote: > > Hi, >  We have a database with a very simple schema: >    CREATE TABLE IF NOT EXISTS tblIndex( >     frame_type  INT, >     pts  VARCHAR(5), >     ts_start  INT primary key, >     ts_end  INT) > > And the application scenario is : > 1. Every second

[sqlite] suggestion on the database design

2009-08-20 Thread pierr
Hi, We have a database with a very simple schema: CREATE TABLE IF NOT EXISTS tblIndex( frame_type INT, pts VARCHAR(5), ts_start INT primary key, ts_end INT) And the application scenario is : 1. Every second usr will insert 2 ~ 50 records ,and the ts_start fields of