Deploying database apps

J

J L

I am coming from the VB6/DAO/Jet world and am looking for advice and
opinions on how to deploy databased apps.

In the VB6 world, my app would create the MDB programatically on thie
initial startup. I have not developed any SQL based apps yet but see
the need arising soon.

Here are my questions:

1. Is the approach of creating the database programatically feasible
and/or a good idea in .Net?

2. Does anyone distribute an empty or template database with the app?
If so how?

3. What other options are there?

4. In most cases I will be using the Jet engine but may also use MSDE
or SQL Server or mySql or Firebird...any comments on each of these?

My overall objective is to have a DAL to allow use of any of the above
databases. I am not sure how realistic that is but that is my goal.

TIA
John
 
G

Guest

J L said:
Here are my questions:

1. Is the approach of creating the database programatically feasible
and/or a good idea in .Net?

Sure. Set up a custom installer that installs the database on a server. Make
it optional and have a check for a database with the same name, so you do not
overwrite. BUt, this is the same as a VB application.
2. Does anyone distribute an empty or template database with the app?
If so how?

In general, databases are scripted out if you are talking SQL Server. For
MDB, the Jet Provider for OLEDB can run DDL, so you can run a creation script
for it, as well. Not sure for all databases (actually, not true, as I know
some cannot be created through the drivers and providers available with MDAC).
3. What other options are there?

Covered, I believe, above.
4. In most cases I will be using the Jet engine but may also use MSDE
or SQL Server or mySql or Firebird...any comments on each of these?

As long as MySQL and Firebird support DDL, you are golden. You will create a
separate custom install class for each type of database and use it when the
database type is chosen. You may be able to refactor this down to fewer
classes than one per database type.
My overall objective is to have a DAL to allow use of any of the above
databases. I am not sure how realistic that is but that is my goal.

I created a generic DBHelper class (traffic cop, of sorts) and added it to
the DAAB, along with an OracleHelper. The new Enterprise Library ships with
Oracle and can be customized for any number of databases. Either option is
fine.

To make things easier, have the database type as a config option alongside
the connection string. You can parse out provider and determine where to send
information, but it is easier if specified (not as realistic with shrink-wrap
ware, however).

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top