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: Please help! --- RELATION challenge in forms 4.5

Re: Please help! --- RELATION challenge in forms 4.5

From: Deb Ghosh <ghoshd_at_btlip46.bt.co.uk>
Date: 1997/07/18
Message-ID: <33CF3650.7BB3@btlip46.bt.co.uk>#1/1

> I have 3 tables:
> table A (1--->> many) table AB (many <<---1) table B
> HOW DO I SET UP MY RELATIONS TO ACHIEVE THIS?
You can set the relation in the database as :

create table A (

a1	number(3)	primary key,
a2	varchar2(10));

create table B (
b1	number(3)	primary key,
b2	varchar2(10));

create table AB (
a1	number(3),
b1	number(3),
ab1	varchar2(10),
constraint ab_fk1	foreign key(a1) references A(a1),
constraint ab_fk2	foreign key(b1) references B(b1)
);

In Form4.5 while creating a block you can set the master detail relation. you can have both the master (table) blocks or you can have any one of them.
If you have just one relation the user have to enter the other fk in the detail block.

> CAN I SET UP TABLE AB AS THE MASTER TO TABLE B??
Yes, you can. But as I have said the user have to enter fk of table A before committing the records.

> THE USERS NEED TO BE ABLE TO ADD NEW RECORDS TO TABLE B WHILE VIEWING TABLE A INFO. ANY IDEAS?
Create all the blocks. however while creating detail block AB, you can select just one relation. If you select master block A then it will set the relation with block A. So, for block B, move the cursor to block B->Relation and create a relation where detail block will be AB(already created) and set the relation.
now set display property of fk to FALSE and Canvas to NULL.

Hope that helps!
Debabrata Received on Fri Jul 18 1997 - 00:00:00 CDT

Original text of this message

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