[cad-linux] Re: database access methods

  • From: Jim Parker <hopeye@xxxxxxxxxx>
  • To: cad-linux@xxxxxxxxxxxxx
  • Date: Thu, 15 May 2003 09:11:12 -0400

G'Day !

I think that both of you have valid points.  A library of functions 
creating a standard API for plugins is very desirible.  But you should 
also remember it is nearly impossible to anticipate every possible 
situation to access data.

Also when the end user hits save, you need functions to automagically 
write to the db.  So writing to the db should be invisible to the 
user.  This requires a library.

I have some example code demonstrating the use of embedded SQL.  This 
is how all the big boys write programs to access thier db's.  
PostgreSQL uses a subset of this.  I do not know if mySQL implements 
embedded SQL, but I would be willing to share the code.  If not there 
are several projects that use mysql, you could look at.


cheers,
Jim Parker


On 2003.05.15 01:17 Eric Wilhelm wrote:
> 
> > The following was supposedly scribed by
> > Brian Johnson
> > on Wednesday 14 May 2003 11:41 pm:
> 
> >Some apps will not need any access to the parametric entities at all
> but
> > will still want to get access to the data
> >
> >Project management apps come to mind .. they could use project
> summary data
> > and create new tables for tracking time, tasks, deliverables,
> tracking the
> > number of plots for each sheet, billing, etc
> 
> So would these apps want to use a library as a front-end to the
> database?  It
> seems likely.  After all, if they can access the data in a more
> cad-centric
> way via the library, they would be able to focus on the data being
> gathered,
> and not on wading through the rest of the format/database.
> 
> Also, if this project-management data is stored in the database,
> wouldn't
> providing write methods for such apps benefit the developer of the app
> as
> well as the integrity of the entire system?
> 
> I'm starting to see this as a 3-4 layered system:
> 
> for modeling/geometric work:
>       gui
>       modeling kernel
>       access library
>       database
> 
> for pm/administration/accounting:
>       gui/spreadsheet
>       access library
>       database
> 
> for performing inspections using your cell-phone:
>       phone/viewer
>       access library
>       database
> 
> How does this sound?
> 
> --Eric
> 
> 

Other related posts: