可能有点多,麻烦了!!!我真的很急啊!
1). Product Catalog Search Indexing
1a). Draw the entity-relationship (ER) diagram for a Product Catalog.Sample Data:Catalog “A” contains
Category “A1” contains
Products P1 ($1.99), P2 ($2.99), P3 ($3.99), P4 ($4.99)
Category “A2” contains
Category “A21” contains
Products P5 ($5.99), P6 ($6.99)
Category “A22” contains
Products P7 ($7.99), P8 ($8.99)Catalog “B” contains
Category “B1” contains
Category “B11” contains
Products P1 ($11.99), P2 ($12.99)
Category “B12” contains
Products P3 ($13.99), P4 ($14.99)
Category “B2”
Products P5 ($15.99), P6 ($16.99), P7 ($17.99), P8 ($18.99)Hints:
• This is NOT a Binary Tree.  A Category may contain more than two (2) Child-Categories, and/or more than two (2) Child-Products.  For example, Category A1 contains four (4) Products: P1, P2, P3 and P4.
• Prices are “attached to” Category – Product combinations.  As such, Prices are Category specific.  For example, under Catalog A -> Category A1, Product P1 is $1.99.  Under Catalog B -> Category B1 -> Category B11, Product P1 is $11.99.
• Product may show up in different Catalogs and Categories.  For example, Product P1 shows up under Catalog A -> Category A1, but also shows up under Catalog B -> Category B1 -> Category B11. 
1b). Design and implement, in Java / C# / C++, the data structure and algorithm for generating a Product Search Index Table from the Product Catalog.

Sample Input: (Same as the Sample Data in #1a)Catalog “A” contains
Category “A1” contains
Products P1 ($1.99), P2 ($2.99), P3 ($3.99), P4 ($4.99)
Category “A2” contains
Category “A21” contains
Products P5 ($5.99), P6 ($6.99)
Category “A22” contains
Products P7 ($7.99), P8 ($8.99)Catalog “B” contains
Category “B1” contains
Category “B11” contains
Products P1 ($11.99), P2 ($12.99)
Category “B12” contains
Products P3 ($13.99), P4 ($14.99)
Category “B2”
Products P5 ($15.99), P6 ($16.99), P7 ($17.99), P8 ($18.99)Sample Output: Product Search Index TableCatalog / Category Path Product Name Price
A -> A1 P1 $1.99 
A -> A1 P2 $2.99 
A -> A1 P3 $3.99 
A -> A1 P4 $4.99 
A -> A1 -> A21 P5 $5.99 
A -> A1 -> A21 P6 $6.99 
A -> A2 -> A22 P7 $7.99 
A -> A2 -> A22 P8 $8.99 
B -> B1 -> B11 P1 $11.99 
B -> B1 -> B11 P2 $12.99 
B -> B1 -> B12 P3 $13.99 
B -> B1 -> B12 P4 $14.99 
B -> B2 P5 $15.99 
B -> B2 P6 $16.99 
B -> B2 P7 $17.99 
B -> B2 P8 $18.99 Note:  Given Product Name, one can use this table to find all Catalog / Category Paths in O(1) time via a hash table look-up.