View previous topic :: View next topic
|
Author |
Message |
bindu
New User
Joined: 02 Jun 2003 Posts: 1
|
|
|
|
Hello All,
I have the following segments:
1. CUSTOMER MASTER with the fields:
Customer Code CUMCUSCDE Alphanumeric 5 Primary Key
Customer Name CUMCUSNME Alphanumeric 30
Address CUMCUSADD Alphanumeric 30
City CUMCUSCTY Alphanumeric 30
Region CUMCUSREG Alphanumeric 2
Country CUMCUSCNT Alphanumeric 30
Telephone CUMCUSTEL Alphanumeric 15
2. ITEM MASTER :
with the following fields:
Field Description Name Type Size Remarks
Item Code ITMCDE Alphanumeric 5 Primary Key
Item Description ITMDES Alphanumeric 30
Price ITMPRC Numeric 9,2
Stock on Hand ITMSTK Numeric 6,0
3. SALES ORDER HEADER with the following fields
Field Description Name Type Size Remarks
Sales Order Number SOHORDNUM Alphanumeric 6 Primary Key
Sales Order Date SOHDT Date 10 Alternate Key
Customer Code SOHCUSCDE Alphanumeric 5
Order Status SOHORDSTS Alphanumeric 1
4. SALES ORDER TRANSACTION :
Field Description Name Type Size Remarks
Sales Order Number SODORDNUM Alphanumeric 6
Item Code SODITMCDE Alphanumeric 5
Quantity Ordered SODQTY Numeric 6
Can any body guide on how to design the database for this? We thought of going like this
customer master ->sales order header -> sales order transaction -> item master
But we were adviced not to go for this. But for 2 data bases one with customer master as root and another with item master as root.
But from item master we need to retreive item details once we give customer code. If we go for the above design how will we retrieve?
Can you please advice?
Thanks and Regards,
Bindu |
|
Back to top |
|
|
maverick
New User
Joined: 13 Nov 2003 Posts: 2
|
|
|
|
The 2nd idea is right . You will need to create 2 databases
1. customer master ->sales order header -> sales order transaction
2. item master
Once you get the customer code . You will have to go to the sales order transaction for that customer to know what that customer has ordered Then for each item code you will have to do a GU on the item master database to get the details . |
|
Back to top |
|
|
b_ramu78
New User
Joined: 29 Apr 2005 Posts: 1 Location: hyd
|
|
|
|
Hi Guys,
Good morning!
I have an quick deliverable to be made and i need your help in it as i do not have time to look in to books. ..
Can some give me the code to eliminate the Duplicate records through Internal sort ( Sort should be done thru cobol program ) or any mechanism using a Cobol program ..
Thanks in Advance!
Regards, |
|
Back to top |
|
|
|