comp.lang.ada
 help / color / mirror / Atom feed
* Re: databases written in ada
       [not found] ` <3D547FFD.3030808@cogeco.ca>
@ 2002-08-10  5:13   ` Christopher Browne
  2002-08-10  9:13     ` Florian Weimer
  2002-08-11 17:34   ` Heikki Tuuri
  1 sibling, 1 reply; 7+ messages in thread
From: Christopher Browne @ 2002-08-10  5:13 UTC (permalink / raw)


The world rejoiced as "Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> wrote:
> tony wrote:
>  > but in which when something is stored then it is automatically
>  > stored to disk as well as being available in memory
>
> This comment, as worded, is difficult to understand precisely. APQ
> as well as any other Ada binding to an SQL database gives you the
> opportunity to insert rows, perform updates, perform deletes, or
> perform SELECT queries and retrieve results. There is also the GNADE
> project, which gives you the ability to do "embedded SQL" in Ada
> terms.

The comment is fairly readily understood, as it is commonly known in
OS literature by the term "orthogonal persistence."

The idea is that you have a set of datatypes which essentially "store
themselves."  

You don't have to do a "select" or "insert" or "update" in order to
get/put values.

Instead, by virtue of simply having a declaration like:

  value1, value2 : INTEGER;

Those values are directly tied to the database.

If you have the code:

  value1 := 25;
  value2 := 17;
  value1 := value1 + value2;

This would, behind the scenes, intersperse the assignments with
queries that might resemble:

  insert into int_table (key, value) values ('value1', 25);
  insert into int_table (key, value) values ('value2', 17);
  update int_table set value = 32 where key = 'value1';

It is quite common to set up database-backed classes in Java and C++
that create this sort of tie between objects and SQL databases.

The cool part is that if the program were shut down, you could [by
some Really Complex magic I'll not imagine too hard about] see the
program start back up, and continue where it left off, with the
various variables holding their database-backed values.

Presumably you could create an Ada class that would allow doing
something sort of like this.  

Presumably you'd not want _all_ variables database-backed, as
performance would Suck Spectacularly.  But it's a pretty normal
exercise using JDBC to design classes to let you define some
"database-backed variables."

It probably ought to be left as an exercise for the reader :-)
-- 
(reverse (concatenate 'string "moc.enworbbc@" "sirhc"))
http://www3.sympatico.ca/cbbrowne/linux.html
"So, does this mean goodbye to the "Bluescreen of Death" and hello to
the "Bluescreen of Holy Vengeance?"" -- Observed on Slashdot after
hearing Al Qaeda terrorists may have hacked on Windows XP...



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: databases written in ada
       [not found] <3D53CE34.45F25F4@btinternet.com>
@ 2002-08-10  7:20 ` Caffeine Junky
       [not found] ` <3D547FFD.3030808@cogeco.ca>
  1 sibling, 0 replies; 7+ messages in thread
From: Caffeine Junky @ 2002-08-10  7:20 UTC (permalink / raw)


On Fri, 09 Aug 2002 10:14:53 -0400, tony wrote:


> does anyone know of any databases written in ada in which ada types can
> be stored. I'm looking for something which is very basic, but in which
> when something is stored then it is automatically stored to disk as well
> as being available in memory
 
Check out the Eaglespeed and FIRM databases over at 

	http://www.lockheedmartin.com/syracuse/eaglespeed/

They're written in Ada(as far as I know), but they are a little pricey.

St4pL3



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: databases written in ada
  2002-08-10  5:13   ` Christopher Browne
@ 2002-08-10  9:13     ` Florian Weimer
  2002-08-10 15:22       ` Christopher Browne
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Weimer @ 2002-08-10  9:13 UTC (permalink / raw)


Christopher Browne <cbbrowne@acm.org> writes:

> The comment is fairly readily understood, as it is commonly known in
> OS literature by the term "orthogonal persistence."
>
> The idea is that you have a set of datatypes which essentially "store
> themselves."  

And how is this supposed to work if there are multiple users of the
same database?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: databases written in ada
  2002-08-10  9:13     ` Florian Weimer
@ 2002-08-10 15:22       ` Christopher Browne
  2002-08-11 13:20         ` Florian Weimer
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Browne @ 2002-08-10 15:22 UTC (permalink / raw)


Quoth Florian Weimer <fw@deneb.enyo.de>:
> Christopher Browne <cbbrowne@acm.org> writes:
>> The comment is fairly readily understood, as it is commonly known in
>> OS literature by the term "orthogonal persistence."
>>
>> The idea is that you have a set of datatypes which essentially "store
>> themselves."  
>
> And how is this supposed to work if there are multiple users of the
> same database?

I suppose that means that the datatypes have to be able to have some
sort of identity so that you can distinguish between instances that
may be associated with a particular user and those that need to have
'global' scope and would be shared across users.

I didn't say it was going to be _easy_ :-).
-- 
(reverse (concatenate 'string "gro.mca@" "enworbbc"))
http://www.ntlug.org/~cbbrowne/sap.html
"What I find most amusing  about com and .NET  is that they are trying
to solve a problem I only had when programming using MS tools."
-- Max M <maxm@mxm.dk> (on comp.lang.python)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: databases written in ada
  2002-08-10 15:22       ` Christopher Browne
@ 2002-08-11 13:20         ` Florian Weimer
  0 siblings, 0 replies; 7+ messages in thread
From: Florian Weimer @ 2002-08-11 13:20 UTC (permalink / raw)


Christopher Browne <cbbrowne@acm.org> writes:

>> And how is this supposed to work if there are multiple users of the
>> same database?
>
> I suppose that means that the datatypes have to be able to have some
> sort of identity so that you can distinguish between instances that
> may be associated with a particular user and those that need to have
> 'global' scope and would be shared across users.

This won't solve the fundamental problem: even if you automatically
introduce transactions, the underlying database will sometimes have
to roll back transactions if they are not serializable.  As a result,
the transaction has to be started from scratch.  I don't see how you
can do this implicitly (at least in a language which is not purely
functional).



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: databases written in ada
       [not found] ` <3D547FFD.3030808@cogeco.ca>
  2002-08-10  5:13   ` Christopher Browne
@ 2002-08-11 17:34   ` Heikki Tuuri
  2002-08-15 22:02     ` Poutanen Olavi
  1 sibling, 1 reply; 7+ messages in thread
From: Heikki Tuuri @ 2002-08-11 17:34 UTC (permalink / raw)


Hi!

"Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> wrote in message
news:3D547FFD.3030808@cogeco.ca...
> tony wrote:
> > does anyone know of any databases written in ada in which ada types can
> > be stored. I'm looking for something which is very basic, ...
>
> I am personally not aware of _any_ database that is written in Ada.
>
> PostgreSQL is a good Open Sourced database, if "open source" is one of
your
> requirements. Another is MySQL, although it lacks transactions, which is
> something I consider essential functionality (I understand that they
> now (finally) understand that they do need it, and now working in that
> direction to provide it).

MySQL nowadays has full support of transactions through the InnoDB and BDB
backends.
...
> Warren.

Best regards,

Heikki Tuuri
Innobase Oy
---
InnoDB - transactions, row level locking, and foreign key support for MySQL
See http://www.innodb.com, download MySQL-Max from http://www.mysql.com





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: databases written in ada
  2002-08-11 17:34   ` Heikki Tuuri
@ 2002-08-15 22:02     ` Poutanen Olavi
  0 siblings, 0 replies; 7+ messages in thread
From: Poutanen Olavi @ 2002-08-15 22:02 UTC (permalink / raw)



:> > does anyone know of any databases written in ada in which ada types can
:> > be stored. I'm looking for something which is very basic, ...
:>
:> I am personally not aware of _any_ database that is written in Ada.

A very looong time ago I was involved in the Nokia MPS 10 project. That
was a proprietary hw architecture machine that had Ada as its sole
programming language (or more precicely, Ada/MPS, which was quite near
to Ada 83).

I was project manager in a project, where we implemented a relational
database management system in Ada, DMS/MPS 10. That work has been reported
in the Ada-Europe conference (see the proceedings book) that was held in
Paris (in 1984?).

Olavi Poutanen
Testwell Oy
www.testwell.fi
Testing tools for [Ada 83], C, C++ and Java



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-08-15 22:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3D53CE34.45F25F4@btinternet.com>
2002-08-10  7:20 ` databases written in ada Caffeine Junky
     [not found] ` <3D547FFD.3030808@cogeco.ca>
2002-08-10  5:13   ` Christopher Browne
2002-08-10  9:13     ` Florian Weimer
2002-08-10 15:22       ` Christopher Browne
2002-08-11 13:20         ` Florian Weimer
2002-08-11 17:34   ` Heikki Tuuri
2002-08-15 22:02     ` Poutanen Olavi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox