Can anyone tell me what is Master deatail Relationship in Database Administation, it is somthing related to Base table blocks.
Any suggestions would be appreciated.
Thanks.
Can anyone tell me what is Master deatail Relationship in Database Administation, it is somthing related to Base table blocks.
Any suggestions would be appreciated.
Thanks.
hi eliotmc,
Master detail relationship in DBA, is an association between two base table blocks- a master blocks and a detail block. Furthermore, the relationship between the blocks reflects a primary key to foreign key relationship between the tables on which the blocks are based.
An example of this type of relationship is an invoice with a header and line items. The following example will lead you through creating a simple invoice entry screen as well as reports for printing the invoices.
First we need to create the tables, go to QueryView and run the following (each "create" statement must be run separately):
create invoice (customer, invoice, invoice_number) key(invoice)
create invoicelines (invoice, line_num, price, product, qty)
index(invoice) in invoice cascade
key(line_num)
Note that the invoice column's value will be a Timestamp to ensure uniqueness, but the user can enter their own number in the invoice_number field. The invoicelines table also has a Timestamp rule to ensure uniqueness on the line_num field.
cheers
hi,
The following explanation and Image will give u brief idea about the Master detail relationship.
A master-detail relationship is a one-to-many type relationship. A set of purchase orders and a set of line items belonging to each purchase order is an example of a master-detail relationship.
An application can use this master-detail relationship to enable users to navigate through the purchase order data and see the detail data for line items only when needed.
Hope this helps you.
Bookmarks