Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building an MS Access database using python

A primary goal of a project I plan to bid on involves creating a Microsoft Access database using python. The main DB backend will be postgres, but the plan is to export an Access image.

This will be a web app that'll take input from the user and go through a black box and output the results as an access db. The web app will be built on a linux server.

I have a few related questions:

  • Is there a reliable library or module that can be used?
  • What has your experience been using Access and python?
  • Any tips, tricks, or must avoids I need to know about?

Thanks :)

like image 283
dassouki Avatar asked May 05 '11 00:05

dassouki


People also ask

Can we use Access database in Python?

To access databases in Python, you'll need to use a database adapter. Python offers database adapters through its modules that allow access to major databases such as MySQL, PostgreSQL, SQL Server, and SQLite. Furthermore, all of these modules rely on Python's database API (DB-API) for managing databases.

What is an MDB?

A multilateral development bank (MDB) is an international financial institution chartered by two or more countries for the purpose of encouraging economic development in poorer nations. Multilateral development banks consist of member nations from developed and developing countries.


1 Answers

Could you use an sqlite database instead?

edit:

If it HAS to be on linux and it HAS to be to MS Access, then I'm pretty sure this is your only choice, but it costs $1,550.

You are either going to have to shell out the money, or convince the client to change one of the other two parameters. Personally, I would push to change the database file to sqlite.

Of course you could always code up your own database driver, but it would probably be worth the time to shell out the $1,550. mdbtools has been working on this for years and the project has been pretty much abandoned.

found it, kinda

Ok, so I just couldn't let this go and found that there is a java library called Jackcess that will write to MS Access mdb files on any platform that can run the jvm. Granted, it's java and not python, but maybe you could learn just enough java to throw an application together and execute it from python? Or just switch the whole app to java, whatever.

like image 129
James Avatar answered Sep 20 '22 13:09

James