I am able to do this in Java with HSQLDB's jdbc driver as follows:
This would reference a db.script file located on the file system at C:\Test\ which contained the schema for all the tables being used as well as their data. Is it also possible to reference a HSQLDB script file within the same working directory as your PHP code using oci, odbc, pdo or something else?
When you break the big rules, you get a lot of little rules.
I see. The reason I'm wanting to do this is I'm dealing with large amounts of data from a web service and so have sacrificed memory for speed and of course I'm running into heap size issues just using arrays. Rather than just increasing PHP's heap size, I thought I'd use the on-demand'ness of a database to dump the data in bulk from the web service so I could query it as needed much faster. I was hoping to go with a "lite as can be" local file system database like HSQLDB which wouldn't require web server or a bunch of libraries to setup. Is there something akin to this in PHP, or should I be approaching the problem in another way?
When you break the big rules, you get a lot of little rules.
It isn't hard to set up MySQL, and using MySQL with PHP is a very common thing to do. They even gave it its own acronym: LAMP meaning Linux, Apache, MySQL, PHP. Not that you have to use all four of those technologies of course, I just mean that MySQL+PHP is a very common pairing.
Thanks for the advice. From what I'm reading online it seems like that's going to be my bread and butter for PHP development, though for this instance I'll probably go with SQLite.
When you break the big rules, you get a lot of little rules.
Just as a wrap up if anyone else new to PHP is trying to use a minimalist database with their PHP script, the following code works after enabling the php_sqlite3.dll extension in the php.ini file for Windows users. When run, this code will create a file test.db in the same directory where it is run.
When you break the big rules, you get a lot of little rules.
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
a bit of art, as a gift, the permaculture playing cards