J
Jose Lopes
I’m dealing with this doubt for quite sometime. It all begins with table
design. I’m putting this here to see if someone can just point me out in the
right direction because I already build my DB from scratch a zillion times
now.
I work in a factory where we build three different types of products: A, B
and C. Workers are used to distinguish them apart by this letter type. They
are different just in this type (field) but all other properties (height,
length, weight, etc) are present in the three. When a costumer makes an order
(6 char string), it can be made of one A product and/or by B and /or C.
Example: in order 005675 was requested one A and one C; order 005676 was just
one A. But the workers are used to distinguish the products by an incremental
numeration of the three products (…A0025, A0026, A0027 and so on). This means
that the late order 005675 had an A0026 and C0015, order 005676 had just
A0027, and the next order 005677 will have an A0028, B0125 and C0016. I hope
I got it clear to understand.
I’m trying to achieve an auto numbering function for these increments, by
using a ProductType field (string type size 1) for the first letter and the
ProductReference (A####) would be a calculated field. So I thought of
creating a ORDERS table where I input the order number and client data, and
three different tables to PRODUCT_A, PRODUCT_B and PRODUCT_C, all related by
the ProductReference field. This way I will also be able to easily count and
report several things about the production although this will just end up
repeating the height, length, weight, dates, due dates, production dates on
each table… a complete waste of time. And this... doesn't smells right to me
My request: can someone point me out a correct way to structure this?
Many thanks for the help.
design. I’m putting this here to see if someone can just point me out in the
right direction because I already build my DB from scratch a zillion times
now.
I work in a factory where we build three different types of products: A, B
and C. Workers are used to distinguish them apart by this letter type. They
are different just in this type (field) but all other properties (height,
length, weight, etc) are present in the three. When a costumer makes an order
(6 char string), it can be made of one A product and/or by B and /or C.
Example: in order 005675 was requested one A and one C; order 005676 was just
one A. But the workers are used to distinguish the products by an incremental
numeration of the three products (…A0025, A0026, A0027 and so on). This means
that the late order 005675 had an A0026 and C0015, order 005676 had just
A0027, and the next order 005677 will have an A0028, B0125 and C0016. I hope
I got it clear to understand.
I’m trying to achieve an auto numbering function for these increments, by
using a ProductType field (string type size 1) for the first letter and the
ProductReference (A####) would be a calculated field. So I thought of
creating a ORDERS table where I input the order number and client data, and
three different tables to PRODUCT_A, PRODUCT_B and PRODUCT_C, all related by
the ProductReference field. This way I will also be able to easily count and
report several things about the production although this will just end up
repeating the height, length, weight, dates, due dates, production dates on
each table… a complete waste of time. And this... doesn't smells right to me
My request: can someone point me out a correct way to structure this?
Many thanks for the help.