There is a database in which the user's shopping list is stored. It has two tables Type_product and Product. The first table stores just the names of products, for example - yogurt, juice, etc., and in the second of their names given by the manufacturer, for example, Danone yogurt or Dobry juice.

enter image description here

However, there is one thing - yogurt can be strawberry or peach, like apple juice or pineapple. At the moment, their taste characteristics are written in the title. But do we need to allocate them into a separate reference table, and if so, how to do it? Since the table products in the examples are not limited, they can store many characteristics that are specific only to specific products.

  • It is necessary to allocate them or not - it is necessary to ask you. Still depends on the purpose of the database. From what is happening on technology with these products and records about them. It may be enough to leave it as it is and make over the types of more types of products where there will be large groups, such as "yogurt". Or can make a directory of types tree. - Mike
  • In principle, what is available now suits me: the user sees the full name of the purchase, for example, strawberry yogurt Danone, and the desired product can be found through a search that searches for all the words included in the name. However, this interests me because I don’t know how it looks from the point of view of normalization - is it broken or not? - Nineor
  • Well, normalization depends on the tasks. If for example you need to compare the annual sales of the whole strawberry with the sales of the whole cherry - then of course this characteristic of the product becomes significant and will have to be separated into a separate entity. Well, or if you need to count the number of adjectives in the names of products - then you have to somehow break the names into parts of speech. - Mike

0