0% found this document useful (0 votes)
41 views2 pages

Database Schema for Client and Sales Management

Uploaded by

kasacah241
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views2 pages

Database Schema for Client and Sales Management

Uploaded by

kasacah241
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Crate the table described below:


Table Name: CLIENT_MASTER
Description: Used to store client information
Column Name Data Type Size Default Attributes
Primary Key/first letter must start with
CLIENT NO Varchar 2 6 'C'
NAME Varchar 2 20 Not Null
ADDRESS1 Varchar 2 30
ADDRESS2 Varchar 2 30
CITY Varchar 2 15
PINCODE Number 8
STATE Varchar 2 15
BALDUE Number 10,2

Table Name: PRODUCT_MASTER


Description: Used to store product information
Column Name Data Type Size Default Attributes
Primary Key/first letter must start with
PRODUCT NO Varchar 2 6 'P'
DESCRIPTION Varchar 2 15 Not Null
PROFITPERSCENT Number 4,2 Not Null
UNITMEASURE Varchar 2 10 Not Null
QTYONHAND Number 8 Not Null
REORDERLVL Number 8 Not Null
SELLPRICE Number 8,2 Not Null,Cannot be 0
COSTPRICE Number 8,2 Not Null,Cannot be 0

Table Name: SALESMAN_MASTER


Description: Used to store salesman information working for the company.

Column Name Data Type Size Default Attributes


Primary Key/first letter must start with
SALESMAN NO Varchar 2 6 'S'
SALESMAN NAME Varchar 2 20 Not Null
ADDRESS1 Varchar 2 30 Not Null
ADDRESS2 Varchar 2 30
CITY Varchar 2 20
PINCODE Number 8,2
STATE Varchar 2 20
SALAMT Number 8.2 Not Null,Cannot be 0
TGTTOGET Number 6,2 Not Null,Cannot be 0
YTDSALES Number 6,2 Not Null
REMARKS Varchar 2 60

Table Name: SALES_ORDER


Description: Used to store client's orders
Column Name Data Type Size Default Attributes
Primary Key/first letter must start with
ORDER NO Varchar 2 6 'O'
Foreign Key refernces ClientNo of
CLIENT NO Varchar 2 6 Client_Master Table
OERDER_DATE Date Not Null
DELY ADDR Varchar 2 25
Foreign Key refernces SalesmanNo of
SALESMAN NO Varchar 2 6,2 Salesman_Master Table
DELYTYPE Char 1 F Delivery:Part (P)/ full (F)
BILLYN Char 1
DELYDATE Date Cannot be less than Order_Date
Values (' In
Process','Fulfilled','BackOrder','Cancell
OREDERSTATUS Varchar 2 10 ed')

Table Name: SALES_ORDER_DETAILS


Description: Used to store client's orders with details of each product ordered
Column Name Data Type Size Default Attributes
Foreign Key references OrderNo of
ORDER NO Varchar 2 6 Sales_Order Table
Foreign Key refernces ProductNo of
PRODUCT NO Varchar 2 6 Product_Master Table
QTYOREDERED Number 8
QTYDISP Number 8
PRODUCTRATE Number 10,2

You might also like