Unix Technical Forum

Values depending on other values

This is a discussion on Values depending on other values within the Oracle Database forums, part of the Database Server Software category; --> Hi all, I have to insert some rows in a database and some values in this rows depends on ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-23-2008, 05:55 AM
NegreT
 
Posts: n/a
Default Values depending on other values

Hi all,

I have to insert some rows in a database and some values in this rows
depends on the values of other rows in the database.

This new value must continue up to date dependig on the value of the
origin data.

¿How could I do this? I´ve been thinking of using triggers that update
the variable values but, is there any other way?

Thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-23-2008, 05:56 AM
Daniel Morgan
 
Posts: n/a
Default Re: Values depending on other values

NegreT wrote:

> Hi all,
>
> I have to insert some rows in a database and some values in this rows
> depends on the values of other rows in the database.
>
> This new value must continue up to date dependig on the value of the
> origin data.
>
> ¿How could I do this? I´ve been thinking of using triggers that update
> the variable values but, is there any other way?
>
> Thanks in advance


You should almost never store the result of a calculation in a
relational database. Why not calculate the value on the fly for display
on screen or in reports?

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
http://www.outreach.washington.edu/e...oa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-23-2008, 05:56 AM
NegreT
 
Posts: n/a
Default Re: Values depending on other values

Hi Daniel, thanks for your reply.

The situation is :

- I've got a table with records (each record is a state of a sensor).
- I've got a form that reads those records and can add more.

What I have to do:

- Users must be able to insert records with the current value of the sensor
(easy).
- Users must be able to insert records which values depends on other
sensors. The value of each of theese sensor is an equation which variables
are the values of other records.

I think I have two problems:

- How could I give the user an equation editor to write the equation whitout
knowing SQL. Anyone knows any SQL equation editor?

- How could I do to have the records up to date?


Thanks again, I think this is not a very easy issue.....







"Daniel Morgan" <damorgan@x.washington.edu> escribió en el mensaje
news:1074077757.364844@yasure...
> NegreT wrote:
>
> > Hi all,
> >
> > I have to insert some rows in a database and some values in this rows
> > depends on the values of other rows in the database.
> >
> > This new value must continue up to date dependig on the value of the
> > origin data.
> >
> > ¿How could I do this? I´ve been thinking of using triggers that update
> > the variable values but, is there any other way?
> >
> > Thanks in advance

>
> You should almost never store the result of a calculation in a
> relational database. Why not calculate the value on the fly for display
> on screen or in reports?
>
> --
> Daniel Morgan
> http://www.outreach.washington.edu/e...ad/oad_crs.asp
> http://www.outreach.washington.edu/e...oa/aoa_crs.asp
> damorgan@x.washington.edu
> (replace 'x' with a 'u' to reply)
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:10 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com