[cad-linux] Re: database cad system

  • From: Thomas Schmidt <thomas.schmidt@xxxxxxxxxx>
  • To: cad-linux@xxxxxxxxxxxxx
  • Date: Tue, 24 Jun 2003 13:08:14 +0200

Hi Eric,

The data you can store in a database depends on the database you use.
Simple data types like strings, ints, and floats are supported by all dat=
abases.
If you like to store more complex data types you either have to break the=
m
down into simple data types or you have to choose a database which allows
you to define new data types.

Nearly all databases support storage of binary data.
But this is usually used to store binary files into the database.=20

The integration of a modeller and a database is not easy, but you should
resist the temptation to use vba. This is a windows-only thing. There are
many ways to work with databases in a plattform independent way.
To access open source databases, there are drivers for many languages,
including perl,python,ruby,... whatever.

The most popular open source database servers are mysql and postgresql.
mysql is fast as hell, but it does not have support for transactions and =
reasonable locking.
Unless you want a single use/single process system, mysql is a bad choice=
 for your project.=20
I would highly recommend postgresql, as it provides transactions, good lo=
cking, used defined datatypes,
and triggers.=20

Triggers also answer your last question. They allow you to run some code
when certain conditions are met. Its up to the developer to define the co=
nditions
and to implement the code to run.

If you want to get serious about your ideas, I would recommend the=20
book "PostgreSQL Developer's Handbook". It gets you started with the
postgresql database server and the sql language.

Bye,
Thomas

> > The following was supposedly scribed by
> > Brian Johnson
> > on Monday 23 June 2003 11:01 am:
> >
> >use DBI;
>
> Yes, thanks.  It looks like this will be a very useful tool in my futur=
e
> projects.  I know very little about SQL right now (except for a
> roughly-how-it-works and that it is a networked database), so I've got
> quite a bit of work to do in that respect.  It doesn't seem really
> well-suited to geometry, but it looks like a "front end" would allow yo=
u to
> more easily manipulate objects.  What about binary data?  Can you store=
 a
> float in the table without storing it as a string (and could you match =
on
> the binary data?)
>
> It seems that the real trick here is going to be getting a modeling or
> drafting (or both) package to "play nice" with the sql (maybe via vba, =
but
> I'd rather steer clear of that route unless it is unavoidable).
>
> Are there any database servers that allow data to be recalculated based=
 on
> other updated data, or do these relationships have to be handled by an
> external program (maybe a change to one field would initiate a call to =
an
> external process?)
>
> --Eric


Other related posts: