Dear all

I 'm a newbies for use BackEnd Oracle. I was started develop
accounting application by VFP9 for front end and Oracle 8i for BackEnd.
Due to i no have exprerience about Oracle. Then i scare and no
understatding how-to. My point is very clear : When you use foxpro
table you can use SET RELATION to make an One 2 many relationship but
How to do in Remote views? Please give me more detail suggestion and i
hope to get answer as soon as possible.

Best Regards,

R. Prawit
Bangkok/Thailand.

Re: How to make One 2 many relationship when use remote view. by Bernhard

Bernhard
Thu Oct 26 06:11:38 CDT 2006

Hi R.Prawit

> I 'm a newbies for use BackEnd Oracle. I was started develop
> accounting application by VFP9 for front end and Oracle 8i for BackEnd.
> Due to i no have exprerience about Oracle. Then i scare and no
> understatding how-to. My point is very clear : When you use foxpro
> table you can use SET RELATION to make an One 2 many relationship but
> How to do in Remote views? Please give me more detail suggestion and i
> hope to get answer as soon as possible.

I think there are 2 basic ways to use relation:

one is: include in your query both sides of the 1 to many relation:
SELECT ... FROM parent JOIN child ON parent.id = child.parentid ...
This would be the more SQL-ish way.
Of course, in foxpro you now have a not normalized table, but this does not
matter since in the back end the data remains normalized.

the other way would be: build two queries, one for the parent side and one for
the child side. Then in foxpro relate them as usually.

So, if your are new to backend database, it would be a good idea to read some
books about SQL.

Regards
Bernhard Sander

Re: How to make One 2 many relationship when use remote view. by Dan

Dan
Thu Oct 26 11:00:57 CDT 2006

Remember the Rule #1 when using back-end data: bring down the smallest
number of records possible.

I'd do this with two updateable parameterized remote views, and no relation
at all. Your parameter will be the primary key for ONE parent record. Your
first view will bring one parent, and the second view will bring all the
children for that one parent.

For reporting, where you need more than one parent row, you can join
parent/child records in the view's SQL. Of course in this scenario you don't
need the view to be updateable.

There is considerable effort involved in making an 1-Many view updateable,
so leave that as a last resort.

And remember Rule #1, above. <g>

Dan

pwjargon2002 wrote:
> Dear all
>
> I 'm a newbies for use BackEnd Oracle. I was started develop
> accounting application by VFP9 for front end and Oracle 8i for
> BackEnd. Due to i no have exprerience about Oracle. Then i scare and
> no understatding how-to. My point is very clear : When you use foxpro
> table you can use SET RELATION to make an One 2 many relationship but
> How to do in Remote views? Please give me more detail suggestion and i
> hope to get answer as soon as possible.
>
> Best Regards,
>
> R. Prawit
> Bangkok/Thailand.