mysql - Database approach for different product types -


There are different product / service types listed in my e-commerce application such that each product / service type has different properties / properties. For, a mobile phone has various properties like CDMA / GSM and a TV has different sets of features like USB / HDMI. Many product types are initially available and I will continue to add different product / service types.

So my question is, should I need a separate table for each product / service type in my database because each product / service has different attributes (columns) or whether a different, but better approach is? The estimated number of product / service types is 50+.

Your case is an example of class / subclass or type / sub-type. Buffalo is "generalization / expertise" in ER modeling

Here is a list of tags related to questions like yours:

If you have these three tags If you read the tag wiki, then there are answers to the questions tagged with those three tags, besides the signal on designing for the outline of some common case, which will help you.

If you want to do a little bit more research on the web, then I recommend Martin Fowler's web page where it outlines the single table of heritage and class table inheritance. This basics cover very well if you still want to go deeper, then you will need to consult a textbook.

All these techniques arise from the fact that there was no mechanism to provide the relational data model nor the legacy of vanilla SQL modelor.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -