FourthWorld wrote: Mon Mar 11, 2024 5:33 am
You're fine with "RDBS" but not "RDBMS"? What did "M" do to raise your ire?
Didn't think I'd need to further clarify, but since you explicitly ask:
SQLite is
file storage and while accessed with similar commands to RDBMS's, itself is
not an RDBMS. Neither would it be "relational" in this context, it would be a pure, 1 table/1 field flat file alternative for the context described. At least no more 'relational' than a text file.
And may I remind you, it was
you that it was you that conflated this by bringing this up as an argument against
SQLite, not me:
FourthWorld wrote: Sun Mar 10, 2024 5:31 pm
The structural housekeeping of RDBMSs is not trivial.
It's a non-argument you chose to argue -
SQLite has no "structural housekeeping" requirement - at least no more than a spreadsheet or a text file. Because it's not an RDBMS.
SQLite does however confer an inherent compression (approx 80% compression of ascii text
without having to zip/unzip) - the fact you are obviously unaware of this is not an argument.
And lets not conflate the technical specifications from
SQLite's website with LiveCode's marketing blurb. It's not a "boast" from
SQLite.org, and contrary to LC's marketing blurb, it also provides a long and detailed listing where
SQLite should
not be used.
Bruce's requirement is an edge case and thanks to Bernd, there is an exceptional solution.
But it's not transferable without modification.
SQLite is a more re-usable solution (obviously not for Bruce, as he has a text file requirement).
Generic approach and re-usability are always my starting points - It's not about oneupmanship, neither is it about "my contentment" (please
do try to keep the patronising to a minimum).
In case you are wondering, retrieval of the last 200 records in a >127,000 record, very complex medical imaging database with
BLOB image data took an average 93 milliseconds on 10 reads. I suspect that the read time will be of this order of magnitude no matter what the size of the database, and possibly faster if actually optimised indexes etc.
So as a generic solution this stands.
The SQL I used is simple and probably not the fastest:
Code: Select all
SELECT * FROM (
SELECT * FROM <table> ORDER BY <column> DESC LIMIT 200
)
ORDER BY <column> ASC;
My point is that without having to invent a creative solution, there is an immediate, fast
generic solution, for anyone else that may need this, even if it's not the fastest for a specific solution (obviously this does not apply to the OP's requirement of a text file).
I am usually quite content, thank you for asking; I hope you are too.