Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best Way To Set Up This Data
Message
General information
Forum:
Microsoft SQL Server
Category:
Database design
Title:
Best Way To Set Up This Data
Miscellaneous
Thread ID:
01433177
Message ID:
01433177
Views:
113
I posted on this some time ago, but the requirements have changed, and I need to figure out the best way to structure the data , so here goes..

My client has provided me with HP Parts data in form of CSV files. So far I have 8 files, but there will be more. The files contain 2 different structures:
Product Series
Product Number
Product Name
Part Number
Category
Keyword
Part Description (Enhanced)
Description (Product)
New Part Number
and
Product Series
Product Number
Part Number
Category
Keyword
Part Description (Enhanced)
Description (Product)
You will notice that Product Name and New Part Number do not exist in the second file, but that'ok. As far as I know all the Excel files that I will be getting from the client will have one of these 2 formats.. Basically each Excel file is a non-normalized table of Server and Part info. The server info is repeated for each part. What I have done is create the following 3 tables in SQL:
HPProductsData  -- Servers
HPPartsData  -- Parts
HPProductsPartsData  -- Server/Parts Link Table
Here's the fun part. The users will be entering lists of server numbers and or part numbers. For each server that is found, the server info and all part info must be returned. It wll be displayed in a treeview. A part can be a parent with subordinate parts under it. All part info must be returned including all subordinate data. If just a part number is entered, then the part and all it's subordinate data must be retuned.

What I'm looking for is opinions on this setup and recomendations for retrieving the data in the format descied above. The structures of the SQL tables is below:
CREATE TABLE HPProductsPartsData
	(RowId  INT IDENTITY PRIMARY KEY,
	 ProductId  INT NOT NULL,
	 PartId  INT NOT NULL,
	 Src_File_Name  VARCHAR(100))


CREATE TABLE HPPartsData
	(PartId  INT IDENTITY PRIMARY KEY,
	 Part_Number  VARCHAR(100),
	 New_Part_Number  VARCHAR(100),
	 Keyword  VARCHAR(30),
	 Category  VARCHAR(30),
	 Part_Description  VARCHAR(MAX),
	 Src_File_Name  VARCHAR(100))

CREATE TABLE HPProductsData
	(ProductId  INT IDENTITY PRIMARY KEY,
	 Product_Series  VARCHAR(100),
	 Product_Number  VARCHAR(20),
	 Product_Name  VARCHAR(100),
	 Product_Description VARCHAR(MAX),
	 Src_File_Name  VARCHAR(100))
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Reply
Map
View

Click here to load this message in the networking platform