I'm currently trying to create an Information Sys开发者_如何转开发tem of customers who does have different prices for one generic set of products.
For example, there's a list of customers, then once you choose one, the system will show a generic product list but a set of price list specifically encoded for that specific customer. I'm sorry but i'm not that good with databases, and I'm using ms access as the database and VB.Net as the programming language.
I imagine, at its simplest, you would have a table for the products, a table for the customers, and a table for customer product prices with foreign keys to the product and customer tables.
What you're describing is called a many-to-many relationship between customers and products (each product can be associated with many customers and each customer can be associated with many products), where the association itself also has business-relevant data (the price). (As opposed to a many-to-many relationship without relevant data in the middle, such as if the products were a fixed price. This may make a difference in your code or how you use tools for data access, such as a pre-packaged ORM.)
精彩评论