[sharing is fun] rough example of tags and database with JS and sqlite.

    Aug 14 2011 | 2:26 am
    I got curious about this today, and didn't feel like going outside, in spite of a beautiful Saturday. Just one of those days! http://lividinstruments.com/dl/tagDatabase.zip This has the raw commands necessary for building up a database in sqlite that can tag items with keywords. It is based on Tim Place's example, and is very terse. However, it outlines all the stuff that is needed, and is a good foundation for starting your interface for this type of thing. Andrew Benson's example here https://cycling74.com/tutorials/data-collection-building-databases-using-sqlite/ would be a good starting point on how to roll some of these raw commands into more usable javascript.
    To figure this out, I used a nice example I found from searching: http://sqliteforum.com/showthread.php?tid=82
    This patch also has a couple example of how to use the "LIKE" command in sql to search for stuff in the database. Hope this helps someone out there!
    Peter Nyboer http://www.lividinstruments.com twitter: @lividindustry

    • Aug 15 2011 | 11:39 pm
      As someone who uses MS SQL at work, I always wondered if it was possible to do this is max - this is great, thanks! Now I just have to think about something cool to do with it :)
      One thing, is it possible to have the data stored permanently rather than using RAM?
    • Aug 16 2011 | 2:08 am
      Yes, it seems to store to disk by default when you open a database. In the example, the file is saved to the same folder as the Max application. When you open it the next time, it loads all the contents.