SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 30th, 2004, 01:17 AM
plasma800 plasma800 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Houston
Posts: 407 plasma800 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 13 m 36 sec
Reputation Power: 5
Send a message via Yahoo to plasma800
Before i get ahead of myself.. database design critque plllleeassee...

Scope of project:create simple browse down (+search) engine/site for various telecom and networking parts arranged by manufactuer then brand then part to show a list of vendors that carry said product arranged by price and reorderable..

In reading other posts, figure it might not be a bad idea to run down my little structure and some sample data..

ttProducts
prodID (autonumber)
item (m7310, Trunk Module)
model (NT8B75, VB-44210)
manuID (from ttManu, to identify manufacturer)
catID (from ttCat, to identify category)
photo (for addition of url to pic)

ttManu
manuID (autonumber)
manu (Nortel Networks - Norstar)

ttCategory
catID (auto)
category (category part may fit in, Phones, Cards, Voicemail..)

ttVendors
vendorID (auto)
company
address1
address2
city, state, zipcode, phone, phone800, fax, email, website, login, password, descrip, added_on, active

ttInventory the table to tie em all together
invID (auto)
prodID (from ttProducts)
vendorID (from ttVendors)
newprice (price for part new, if any)
refurbprice (price for part used, if any)
oosprice (price for part out of service, if any)
warranty
venddescrip (short description from vendor for said part)

ttFeedback
feedID (auto)
vendorID (identifies who feedback was left for)
feedback (comments)
dateleft
leftby

--------------------
whole point of project is simple easy browse down to part, then see list of vendors. User selects Maufacturer from home page, is presented with a list of categories for parts matching said manu. User selects cateogry and is presented with list of all parts matching manu and category. User clicks part and is presented with list of vendors, 1 to 3 prices (whatever vendor filled in for part when adding it to browse) plus shot descrip from vendor if they left one, if not, filled in with vendor main descrip, if none, call blank. List is presented with lowest NEW price first and may be reordered by lowest Refurb price and again by lowest OOS Price, but all data displayed remains the same.

user may alternativly use a single serach text box to query db and pull anything that matches what they typed in in price order from the inventory table..

Will that data seem at first glance to fit together ok?
Thanks so much for alllll the help i get here.. it's truely tremendous!!!

Last edited by plasma800 : March 30th, 2004 at 01:21 AM.

Reply With Quote
  #2  
Old March 30th, 2004, 04:22 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 13
Ata glance it looks good

I do disagree with the though of using an AutoNumber (PK) for link tables (ttInventory), it opens you up to duplicate data. You could inadvertently add the same prodID and VendorID without knowing it, unless you program in data integrity. I perfer to use the DB for this.

I would do this

ttInventory the table to tie em all together
prodID (from ttProducts) (PK/FK)
vendorID (from ttVendors) (PK/FK)
newprice (price for part new, if any)
refurbprice (price for part used, if any)
oosprice (price for part out of service, if any)
warranty
venddescrip (short description from vendor for said part)

S-

Reply With Quote
  #3  
Old March 30th, 2004, 04:50 PM
plasma800 plasma800 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Houston
Posts: 407 plasma800 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 13 m 36 sec
Reputation Power: 5
Send a message via Yahoo to plasma800
Ok cool..
so you're saying ditch the invID from ttInventory and use the prodID as the primary key for the invnetory table right?

makes perfect sense pending the answer to that question..

Reply With Quote
  #4  
Old March 30th, 2004, 04:58 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 13
Use both ProdID and VendorID as combined concatenated PK (two fields-one key)

S-

Reply With Quote
  #5  
Old March 30th, 2004, 05:02 PM
plasma800 plasma800 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Houston
Posts: 407 plasma800 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 13 m 36 sec
Reputation Power: 5
Send a message via Yahoo to plasma800
i c.. not sure how to set that up...

and will that effect that fact that more than 1 vendor will be shown for one product...

it shouldnt though should it, cause each pair would be unique.... prodID 1 & vendorID 2
prodID 1 & vendorID 3, etc....

the whole point at the end, is to show a list of vendors that carry the selected part... the parts themselves are obvioulsy in the product table, vendors over there.. so forth..

Reply With Quote
  #6  
Old March 30th, 2004, 05:07 PM
plasma800 plasma800 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Houston
Posts: 407 plasma800 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 13 m 36 sec
Reputation Power: 5
Send a message via Yahoo to plasma800
i ALSO have to plan for the fact that SOME parts won't have a model number at ALL.

Reply With Quote
  #7  
Old March 30th, 2004, 05:56 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 13
Quote:
Originally Posted by plasma800
i c.. not sure how to set that up...


Which DB are you using?



Quote:
Originally Posted by plasma800
and will that effect that fact that more than 1 vendor will be shown for one product...

it shouldnt though should it, cause each pair would be unique.... prodID 1 & vendorID 2
prodID 1 & vendorID 3, etc....

the whole point at the end, is to show a list of vendors that carry the selected part... the parts themselves are obvioulsy in the product table, vendors over there.. so forth..


Yes

S-

Reply With Quote
  #8  
Old March 31st, 2004, 12:21 AM
plasma800 plasma800 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Houston
Posts: 407 plasma800 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 13 m 36 sec
Reputation Power: 5
Send a message via Yahoo to plasma800
sql 7, and i have no idea how to make it do that.. Im fairly new at it ..

I went into the db tonight, and started to make the primary key of the ttInventory table the prodID column, but once a column is a primary key, you can have no duplicates right?

and I already have some products in there, of which multiple rows have the same prodID, so I figured better to wait til i had this figured out.

To make things easier... i've decided to keep a screenshot of my table diagram around in case anyone needs it..
located here > http://www.teletechnology.net/db.gif - might have to tell explorer or whatever u use to view image full size.. it's big but only 26k

Last edited by plasma800 : March 31st, 2004 at 12:30 AM.

Reply With Quote
  #9  
Old March 31st, 2004, 05:40 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 13
When in the design mode of the table Select To Rows (both Fields) at one time and then click on the PK toolbar button. This should allow you to specify both field, combined, are the primary key.

S-

Reply With Quote
  #10  
Old March 31st, 2004, 05:43 PM
plasma800 plasma800 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Houston
Posts: 407 plasma800 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 13 m 36 sec
Reputation Power: 5
Send a message via Yahoo to plasma800
I C I C......
Thanks so much dood! You guys are freakin awesome!

-- bows --

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Before i get ahead of myself.. database design critque plllleeassee...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT