hi. Im afiya . i have a company's product catalogue . Im asked to represent the products in treeview control of VS2008 . Please can any one tell me how the database must be designed so that i can add a product as parent node or child node on the basis of products and its type.
the products are listed as
product code|| product name ||product description || price
abc1001 ABCD its description
1.xyz its description 23000
i ss its description 67000
as you can see the main product does not have price defined ..
so it is really becoming hard for me to design a database..
There are many products which dont even have any sub types and many of them have so many sub type .. so please tell me how to design a database for such product listing..
please its urgent...
P.S -can u refer me any book for database design
aida21
0
Newbie Poster
Recommended Answers
Jump to Postproduct_name varchar(50),
product_type char(1),//C for category and I for ITEM
price numeric(8,2)
product_level
parent_id numeric(5),
child_id numeric(5),
level numeric(2)example of PRODUCT_MASTER TABLE
PRODUCT_ID, PRODUCT_NAME, PRODUCT_TYPE, PRICE
0 , 'PRODUCTS', 'C',NULL //ROOT NODE
1, 'CATE 1','C', NULL // CATEGORY 1
2, 'CATE 2' ,'C', NULL // CATEOGORY 2
…
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.