master-detail relations guide required [message #510394] |
Sat, 04 June 2011 14:40 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
hi, my name is usman I am new in developing. I'm using oracle 9i and 6i developer suit
my question is that : can we make relation between two tables where master-table is in form means showing single record
whereas the detail-table is in tabular form , is it possible ?
the situation is like this
master table: student_no , student_name ,student_class
detailed table: book_name , total_marks , gained_marks ,credit_hours , gpa...
detailed block is in tabular form say showing 8 records of books
English , math so on and marks accordingly ..
after execute query in detailed tabled shows 8 books and gpa etc
against single name and roll number field in the master table.
means recored in master table is "usman" and in detailed table it's showing
8 books and gpa etc.
how can I do that ?
|
|
|
|
Re: master-detail relations guide required [message #510398 is a reply to message #510397] |
Sat, 04 June 2011 16:26 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
thanks dear , I got this example already. . .. .
according to the explanation we must have same fields in both the tables emp_tbl and dpt_tbl , and the fields 'emp_dpt_no' and dpt_no must exist in both the blocks .. and in the relation we keep them equal
dpt.dpt_no= emp.emp_dpt_no
like this? I have made it, it works
but I have problem like this
in student information I have name and roll number(in the master table)
but in academic performance table (which is detailed and tabular) there is no need to enter roll number again and again before starting enter data in each record, like book name , total marks and gpa etc ...
simply no same fields to be made in relation, so how can I display all the academic performance in detail block by having roll number in master table?
|
|
|
|
Re: master-detail relations guide required [message #510411 is a reply to message #510399] |
Sun, 05 June 2011 10:38 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
cookiemonster wrote on Sat, 04 June 2011 17:48How are these two tables related exactly?
actually relation is that: university grants a student only one roll number but in a class 6 subjects are taught so single student attempts exams of 6 subjects. . . .. . ..
I hope my dear friend cookiemonster you got my point. . .?
|
|
|
|
Re: master-detail relations guide required [message #510422 is a reply to message #510398] |
Sun, 05 June 2011 14:59 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
usman_noshahi wrote on Sat, 04 June 2011 23:26I have roll number (in the master table) but in detailed table there is no need to enter roll number again and again before starting enter data in each record
Exactly.
Roll number is to be used in order to join master and detail blocks. You will (most probably) display "roll number" item in master block and enter value in there.
If master-detail relationship is correctly set, Forms will maintain "roll number" item's value in detail block. Therefore, you don't need to DISPLAY roll number item in detail block (but it must EXIST in detail block).
|
|
|