Choosing a database and LC tools

Peter Haworth pete at lcsql.com
Mon Aug 10 14:01:28 EDT 2015


Hi Tom,
SQLite should do what you need but a few notes for you.

SQLite doesn't have an array datatype.  The usual way of handling this type
of data in any SQL database is to store each key and value of the array in
a separate table that is linked to your main table by an id of some sort
that would have the same value in both tables.

You could also get round it by arrayEncoding them before putting them in
the database and then arrayDecoding them on the way out.

It's pretty easy to store images in columns with a data type of BLOB,
although it requires some slightly different LC coding to SELECT them.
Also be aware that LC used to encode BLOB data in a proprietary way but
then removed the encoding in a release which I can't quite remember.  Only
an issue if you expect to access the database with versions of LC both
before and after the change.  Plus it's controllable via an sqliteoption
parameter for revOpenDatabase.

I will contact you off list re contract work and a couple of other
suggestions.

Pete


On Mon, Aug 10, 2015 at 9:40 AM tbodine <bodine at bodinetraininggames.com>
wrote:

> Hi,
>
> I want to add a content library module to a LiveCode-built project. It will
> enable users to store, tag, sort and retrieve their content. I've read
> various threads and articles about databases, but I have minimal database
> experience and I want to get it right the first time. So I'd appreciate
> answers to these questions and any other insights:
>
> 1) Is SQLite the best choice for local database file with a Livecode
> interface? (Each database record will need to hold a few sentences of
> Unicode text, 1 or 2 small arrays, the text contents of a few cprops, and a
> field for tags the user can apply to categorize the various records.) I
> doubt the number of records would ever exceed 10,000 with an average more
> like 2,000.
>
> 2) The content of some records may have associated images or audio files. I
> can store the paths to those, but paths break easily. How much does it
> bloat
> or burden a database to store jpgs, pngs, wavs or aifs files in records?
>
> 3) I see there are a few 3rd-party tools for database work with Livecode.
> (SQLyoga, SQLiteAdmin and SQLMagic). Are there others? Are these current
> with LC7?
>
> 4) Are there contract developers in the LC community that specialize in
> setting up databases with LC interfaces?
>
> Thanks!
> Tom B.
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Choosing-a-database-and-LC-tools-tp4694777.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list