By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,346 Members | 2,331 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,346 IT Pros & Developers. It's quick & easy.

Adding a 'Quotation' table - how best to?

stonward
100+
P: 145
My user now wants to store (for a few months at least) QUOTATION data. I can add a table of course, with a unique ID for each quote, but it seems to me that all the other fields (bar the date) can be derived from the other tables...if i put the relevant fields in the Quote table they will be duplicates won't they? Won't this compromise my normalization efforts? Anyone got an idea of how best to crack this little item? Thanks,

Stonward
Jul 23 '07 #1
Share this Question
Share on Google+
4 Replies


missinglinq
Expert 2.5K+
P: 3,532
A little more info on exactly what you're trying to accomplish, as well as your current data structure, might help! Is this a price quote for a job/service? If so, where is the data on this stored? Does it have a unique identifying number/code? Why do you feel the need for a separate quotation table? Every developer's situation is unique, but I can't imagine needing a table simply to hold this one piece of information plus a single date.

You're correct in thinking that you don't want to store redundant data any more than is absolutely necessary! You need some Primary/Foreign keys to join this information together. As I said, if we need a little more about your actual situation , we may be able to better advise you!

Welcome to TheScripts!

Linq ;0)>
Jul 23 '07 #2

FishVal
Expert 2.5K+
P: 2,653
My user now wants to store (for a few months at least) QUOTATION data. I can add a table of course, with a unique ID for each quote, but it seems to me that all the other fields (bar the date) can be derived from the other tables...if i put the relevant fields in the Quote table they will be duplicates won't they? Won't this compromise my normalization efforts? Anyone got an idea of how best to crack this little item? Thanks,

Stonward
Use FKs instead of data duplicates.
Does this make a sence? :)
Jul 23 '07 #3

stonward
100+
P: 145
Thanx for replying so quickly guys! I'm modernising a database system I built a couple of years ago. It's a basic stock system with sales and purchasing ability. Now we need to add a quotation facility...I'd already built the form when the (main) user came to me asking that the data be saved. This is costings, (cost per item, VAT, total), quantity, PRODUCT ID (and details) and customer ID (and details) if known. Obviously I can't use the Sales/Purchase tables, so I couldn't see any other way than to add a table.

With reference to the FK idea, I'm not sure how that would help?

My tables are linked of course, with Products linked to Orders and Order Details (to get over the many to many problem) and likewise with Purchases. Suppliers and Customers have a simple one to many with the Orders/Purchases tables.

Could I just use a report, via a query, using a table to save just the quote ID and date perhaps?
Jul 23 '07 #4

FishVal
Expert 2.5K+
P: 2,653
Thanx for replying so quickly guys! I'm modernising a database system I built a couple of years ago. It's a basic stock system with sales and purchasing ability. Now we need to add a quotation facility...I'd already built the form when the (main) user came to me asking that the data be saved. This is costings, (cost per item, VAT, total), quantity, PRODUCT ID (and details) and customer ID (and details) if known. Obviously I can't use the Sales/Purchase tables, so I couldn't see any other way than to add a table.

With reference to the FK idea, I'm not sure how that would help?

My tables are linked of course, with Products linked to Orders and Order Details (to get over the many to many problem) and likewise with Purchases. Suppliers and Customers have a simple one to many with the Orders/Purchases tables.

Could I just use a report, via a query, using a table to save just the quote ID and date perhaps?
Sorry, this doesn't make a sence.
Would you be so kind to post tables metadata. I think you should revise table relationships.
Jul 23 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.