On Mon, Apr 16, 2012 at 3:30 PM, Petite Abeille
<[email protected]> wrote:
>
> On Apr 16, 2012, at 9:09 PM, Kit wrote:
>
>> SELECT doc.record, t.rec FROM doc LEFT JOIN t ON doc.id=t.doc_id
>>      WHERE doc.id=id_xx AND created_on<=time_xx
>>      ORDER BY created_on DESC LIMIT 1;
>
> - how do you represent deleted rows?
> - how do you avoid version ambiguities (e.g. two rows created with the same 
> timestamp)?

The latter should be handled by having the create/modify time be part
of the primary key or otherwise part of a unique index.

The former could be done with a "not_after" column, say.

Nico
--
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to