[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to package a database (not program)?

On Tue, Dec 09, 2003 at 11:06:51PM -0800, David Braun wrote:

> The data comes from the USDA as a file designed to be imported into a
> relational database (such as MySQL).  It's really not very useful
> otherwise.  My question is how do I package this correctly?  I want my
> package to import it into a database, but I don't want to dictate to the
> user which database program to use.  Something appropriate might be for
> the configure script to ask the user for the name of a SQL server, along
> with a user name and a password.  I'm not sure this would be sufficient,
> though, because as a new student of SQL I'm learning there's no standard
> way of creating a database (horror!).  So maybe this would mean the
> package would have to look for local client drivers of MySQL,
> PostgreSQL, etc.

Not only that, the data types often vary for different databases, though
hopefully your data is simple enough that this isn't a problem.

I would simply include the SQL dump under /usr/share and leave it to the
user where to import it.  It's possible that they will want to create a new
database, or import it into an existing one (perhaps even with different
table names), or transform it from SQL into something else.

 - mdz

Reply to: