Anda di halaman 1dari 19

ASSIGNMENT -2

2.1 Table Name : client_master

Description : use to store information about clients

Column Name

Data Type

Size

Attributes

client_no

Varchar

Primary key/first letter must start with �C�/not


null

name

Varchar

20

not null

address1

Varchar

30

not null

address2

Varchar

30

city

Varchar

15

state
Varchar

15

pincode

number

bal_due

money

10

. For creating database

. For creating table: client_master


. For inserting values to a table

. Data Output

Select * from client_master;

2.2 Table name : Product_master

Description : Used to store information about products

Column name

Data type

Size

Attributes

Product_no

Varchar

Primary key/first
letter must start with
�P�

Description

Varchar

Not null

Profit_percent

int
3

Not null

Unit_measure

Varchar

10

Not null

Qty_on_hand

Int

Not null

Recorder_lvl

Int

Not null

Sell_price

money

10

Not null,cannot be 0

Cost_price

money

10

Not null,cannot be 0
. For creating table: product_master

. For inserting values to a table

. Data Output

Select * from product_master;


2.3 Table name : Salesman_master

Description : Used to store information about salesman working in the company

. For creating table: salesman_master

Column Name

Datatype

Size

Constraints

salesman_no

varchar

Primary Key/first letter


must start with �S�

salesman_name

varchar

20

Not Null

address1

varchar

30

Not Null

address2

Varchar

30

city

varchar
20

pincode

number

state

varchar

20

sal_amt

money

tgt_to_get

number

Not null,cannot be 0

ytd_sales

int

Not Null, cannot be 0

remarks

varchar

60

Not Null
. For inserting values to a table
. Data Output

Select * from salesman_master;

2.4 Table name : sales_order

Description : Used to store information about order

Column Name

Datatype

Size

Default

Constraints

S_Order_No

Char

Primary Key

S_OrderDate

Date

Not Null

Client_No

Char

Foreign Key References


Client_No of
Client_Master Table

dely_addr

Varchar

25

Salesman_No

Char

Foreign Key References


Salesman_No of
Salesman_Master Table

delyType

Char

Delivery: part(P)/full(F)

billed_yn

Char

dely_date

Date

Cannot be less than


OrderDate

Order_Status

Varchar2
10

Values(�In process�,
�Fulfilled�, �Backorder�,
�Cancelled�)

. For creating table: sales_order


. For inserting values to a table

. Data Output

Select * from sales_order;

2.5 Table name : sales_order_details

Description : Used to store information about products ordered

Column

Data type

Size

attributes

s_order_no

varchar

Primary key/ Foreign


key references
s_order_no of
sales_order table

Product_no

varchar

Foreign key
references
product_no of
product_master table
Qty_ordered

Int

Qty_disp

Int

Product_rate

money

10
. For creating table: sales_order_details

. For inserting values to a table:

. Data Output

Select * from sales_order_details;

2.6 Table name : challan

Description : Used to store information about challan

Column

Data type

Size

Attributes

challan_no

Varchar

Primary key

s_order_no

Varchar

Foreign key references


s_order_no of
sales_order table

challan_date

Date

Billed_yn

char

Values(�y�,�n�)
. For creating table: challan

. For inserting values to a table

. Data Output

Select * from challan;

2.7 Table name : challan_details

Description : Used to store information about challan details

Column name

Data type

Size

Attributes

Challan_no

Varchar

Primary key/foreign
key references
challan_no of challan
table

Product_no

varchar

6
Primary key/foreign
key references
product_no of
product_master table

qty_disp

int

Not null
. For creating table: challan_details

. For inserting values to a table

. Data Output

Select * from challan_details;