Re: Newbie- Can I create a new MySQL database from within my app?
From: Ian Hinson (pparagon_at_bigpond.net.au)
Date: 12/18/04
- Next message: Peter: "Re: Reading all the packets from NIC"
- Previous message: Thaddy de Koning: "Re: thread sync"
- In reply to: Mike Barnard (at work): "Re: Newbie- Can I create a new MySQL database from within my app?"
- Next in thread: J West: "Re: Newbie- Can I create a new MySQL database from within my app?"
- Reply: J West: "Re: Newbie- Can I create a new MySQL database from within my app?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 18 Dec 2004 17:40:20 GMT
"Mike Barnard (at work)" <junk@thunderin.co.uk> wrote in message
news:drt6s0lt1sc4rajkoff4rs9ne9q95dj655@4ax.com...
> On Fri, 17 Dec 2004 11:17:00 -0000, "J West" <jimw@fluffypaws.co.uk>
> wrote:
>
>>I have no experience of creating a database in code (Not something I would
>>recommend doing) but there are distribution utilities available for MYSQL.
>
> Hi.
>
> Remembering I'm a REAL newbie, why would you not reccomend this? In a
> finished application, if an end user wants to start another database
> would you normally say to them "No, the program you've bought from me
> doesn't do that. You'll have to also learn how to run MySQL just to
> start up.". To *me* that doesn't make sense.
I recently wrote a Delphi app that connected to a MySQL server.
The only reason I went down that path was that the MySQL server was already
up and running (on a Linux server also running Apache) and the customer
wanted a nice Windows GUI app to view and manipulate data with.
But if I was to write a standalone app from scratch for distribution to
customers that don't already have MySQL (and haven't specifically asked for
it!) there's no way I'd just decide that my "backend of choice" would be
MySQL.
Setting up a MySQL server and learning how to do even simple things like
create a database is a helluva learning curve. It's definitely out of the
realm of the typical end user, and even some programmers would struggle with
learning MySQL if they've had no real exposure to SQL and database admin in
general.
FWIW, MySQL can easily reproduce a database and its tables by importing from
an "sql dump" that contains all the CREATE TABLE etc statements.
Doing it from inside a program might be possible via the LibMySQL.DLL.
(Now that's a whole new learning curve in itself)
But before you even get to that stage you should familiarise yourself with
the general workings of MySQL such as how to set up user accounts and
passwords, permissions, how to use the mysqladmin utility etc. The user
manual is 1200 pages (good luck) and mostly it's all about horrible text
based DOS window stuff.
> In the instance I am thinking of, the tables would be fixed in design,
> and easily reproducable. It's just that other instances of it (for
> say different years or different (same job) organisations) would be
> needed to be created.
Erm. How good is your knowledge of sound database design? One thing sticks
out like a sore thumb: You shouldn't need to be creating a new instance of
the whole database every year else something is fundamentally wrong with
your db structure.
Could I recommend for anyone who might some day need to connect to MySQL
from a Delphi app that you can't go past setting up the MyODBC driver then
using Delphi's ADO components via "Microsoft OLE DB Provider for ODBC
Drivers". (I gave dbExpress a shot, but IMHO the ADO route was much more
straighforward.)
Ian.
- Next message: Peter: "Re: Reading all the packets from NIC"
- Previous message: Thaddy de Koning: "Re: thread sync"
- In reply to: Mike Barnard (at work): "Re: Newbie- Can I create a new MySQL database from within my app?"
- Next in thread: J West: "Re: Newbie- Can I create a new MySQL database from within my app?"
- Reply: J West: "Re: Newbie- Can I create a new MySQL database from within my app?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|