View previous topic :: View next topic |
Author |
Message |
binduvnair Beginner
Joined: 07 Jan 2003 Posts: 16 Topics: 8
|
Posted: Thu Aug 14, 2003 6:23 am Post subject: Database Design |
|
|
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 |
|
 |
tramasamy Beginner
Joined: 17 Dec 2002 Posts: 12 Topics: 8
|
Posted: Sat Aug 30, 2003 8:39 pm Post subject: |
|
|
Do u have any constraint in putting the "sales order transaction" and "sales Order header " as child segments under any one of the root segments (database).
It would be easy to define the database once u give me all the procesing that u r going to perform .
Thanks & Regards
Rams |
|
Back to top |
|
 |
tramasamy Beginner
Joined: 17 Dec 2002 Posts: 12 Topics: 8
|
Posted: Sat Aug 30, 2003 8:52 pm Post subject: |
|
|
Do you have any idea of setting the secondary key for the database ? If so please let me know.
Thanks
Rams |
|
Back to top |
|
 |
binduvnair Beginner
Joined: 07 Jan 2003 Posts: 16 Topics: 8
|
Posted: Fri Sep 05, 2003 7:03 am Post subject: |
|
|
Hello All,
We did it as two databases. First had customer,transaction header and detail segements and second had only item master segment. We retrieved the item code from the customer master and queried the item master for that item code.
Thanks for all the help,
Regards,
Bindu |
|
Back to top |
|
 |
|
|