Connecting to Base through php ODBC

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER

Connecting to Base through php ODBC

Postby noobie34 » Tue May 20, 2008 5:22 am

I use php to connect to Microsoft Access and MySQL.

Can I connect to Base using php and ODBC?
noobie34
 
Posts: 2
Joined: Tue May 20, 2008 5:18 am

Re: Connecting to Base through php ODBC

Postby TerryE » Tue May 20, 2008 1:51 pm

Base maintains its files in an Open Document Format (which basically a ZIPped bunched of XML files and attachements) , where ODF is used for the reports, forms, etc. The database itself is stored inside the ODF container as a binary attachment. The actual D/B engine is the Java based database HSQL; The D/Bs binary format is just the native HSQL format.

Architecturally this has a lot of limitations compared to a conventional database. First, you need to think of an ODB file as a document which embeds a database, rather than a database which embeds meta objects to present it (as in access). Manipulating an ODB database involves unzipping the entire D/B, manipulating it then zipping it up again to save it. This approach does not scale well. Also, the HSQL engine is basically a bunch of java classes which present a JDBC interface.

I could go on but the short answer is really no, you can't easily integrate Base into php with ODBC.

In my view irs a realy shame that OOo doesn't also support a SQLite D/B binary D/B format as an alternative to the ODF encapsulated HSQL format for those that want to attach a small D/B to their applications this way. When using a D/B in MSO, I nearly always used Access this way using ODBC or the RDO JET interface, rather than using a native Access application. In fact SQLite has really replaced Access in this niche and has become the most widely used D/B package on the planet. (The podcast FLOSS Weekly 26 — SQLite give a fascinating overview.)
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
TerryE
 
Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK

Re: Connecting to Base through php ODBC

Postby noobie34 » Tue May 20, 2008 3:30 pm

Too bad that Base expects other databases to support ODBC so that it can connect to them, but does not itself support ODBC.

Thanks a lot for the information. I do not need to waste any more time with Base.
noobie34
 
Posts: 2
Joined: Tue May 20, 2008 5:18 am

Re: Connecting to Base through php ODBC

Postby TerryE » Tue May 20, 2008 4:10 pm

Just out of interest, what are you trying to do functionally?

Since you are posting to this forum, I assume that you are integrating php and some form of office automation or document management. If you want a real shared D/B then you really want to consider using MySQL or PostgreSQL. The learning curve is a little more but they are serious D/B products, and FANTASTIC value (at $0). Their footprint is also pretty lightweight compared to some other alternatives. MySQL is probably the better for small installations, and it does have good ODBC support.

As I said if you want a file based approach you could consider SQLite, which positions itself nearer the JET (Access) engine niche, apart from the fact it is faster, cheaper and totally open. All Apple devices, most high end Mobile phones, PDAs, Multimedia Appliances, and many Applications embed SQLite.
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
TerryE
 
Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK


Return to External Data Sources

Who is online

Users browsing this forum: No registered users and 2 guests