Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Can two sessions be bound in Oracle ?

Re: Can two sessions be bound in Oracle ?

From: ben brugman <ben_at_niethier.nl>
Date: Tue, 21 Oct 2003 14:01:10 +0200
Message-ID: <3f952008$0$245$4d4ebb8e@read.news.nl.uu.net>

"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message news:3f94ff18$0$246$ed9e5944_at_reading.news.pipex.net...
> I don't believe that there is any similar feature. However the likelihood
of
> you actually needing it is pretty remote given the different locking
> mechanism between the two systems.

The need in Oracle for this feature is definitely less than in SQL-server.

> Perhaps you could give an example of why
> you think you would need it?

Do we need it ? I do not know, at the moment I am looking into possibilities to in using databases under modular design. Here one (or more) databases are used by different software modules. The software modules are aware of each other and communicate with each other, but are not aware off how the module handles it's own data. It could be that a master detail relation is split over two different modules. One module is responsible for the detail the other for the master. If present in the same database, a referential constrait will be laid down in the database. On transaction might consist of two modules one responsible one table the other for the other table. Both inserting rows depending on each other.

Options to solve this problem.
1. Do not define a referential constraint. 2. Make sure the order of inserts (update/deletes) is always correct and that one transaction finishes before the other begins. 3. use the same connection.
4. use different connections but use bounded connections.

Offcourse each solution comes with it's problems. (Some known, some unknown problems).

Each module has a persistency layer which communicates with the database, the persistency layer maps the data to real tables and fields. Modules are not aware how this persistency layer is implemented. Modules communicate with each other with a 'sort off' messaging system and doing requests etc. they do not know how the request will be implemented. It could be that something is calculated (not using a database), but the module's can also access its persistency layer which communicates with the RDBMS.

Because I have no experience with this type of modular design and databases, any insight is welcomed by me.


What I am trying to prevent in my organisation that the database get's modularised, where constraints are not implemented in the database but 'only' in the business layer.
(Things as we insert a child but the mother is not known yet so the field must be capable of being/holding NULL, and/or the referential constraint can not be forced by the database, because the relation is only 'filled' at the end of the transaction).

What the developers would like is that they can pospone the enforcing of constraints till the moment they say, alle modules are ready.

I would like to meet (over the net) others having the similar requirements, or opinions about the above.

ben brugman.

>
>
> --
> Niall Litchfield
> Oracle DBA
> Audit Commission UK
> "ben brugman" <ben_at_niethier.nl> wrote in message
> news:3f94fd54$0$248$4d4ebb8e_at_read.news.nl.uu.net...
> > Can Oracle coordinate two or more connections, to prevent lock and
> deadlock
> > situations between two 'friendly' connections. For example one
application
> > having two connections but not wanting locks between them.
> >
> > Similar to :
> >
> > From the Books on Line from SQL-server :
> > "
> > Bound connections allow two or more connections to share the same
> > transaction and locks. Bound connections can work on the same data
without
> > lock conflicts. Bound connections can be created from multiple
connections
> > within the same application, or from multiple applications with separate
> > connections. Bound connections make coordinating actions across multiple
> > connections easier.
> > "
> >
> > thanks for your attention,
> > ben brugman
> >
> >
>
>
Received on Tue Oct 21 2003 - 07:01:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US