Hello world programmer ....... I have a doubt I hope you can help me what happens is that I have a table in sql with the following fields:
LINEA varchar(10) primary key
GRUPO varchar(10) primary key
SUB_GRUPO varchar(10) primary key
,DESCRIPCION LARGA varchar(50)
DESCRIPCION CORTA varchar(10)
What I try to do in this table is to join 3 tables in one, I explain: the line field belonged to a table called LINEA with its long and short description, the field group belonged to a table called GROUP with its long and short description, and so for the sub_group
What I want to do is the following:
that when registering a new Line is stored in the field line with its long and short description, the group and sub group fields must be empty,
LINEAS | GRUPOS | SUB_GRUPOS | DESCRIP_LARGA | DESCRIP_CORTA
tableros | | | tableros de plasticos | tabplas
and when registering a GROUP the existing LINES must appear to be able to create the group, consequently the field sub_group must be empty,
LINEAS | GRUPOS | SUB_GRUPOS | DESCRIP_LARGA | DESCRIP_CORTA
tableros | empotrados | | empotrados de 2 | emp2
and finally when you want to add a sub_group 1 I have to know the line then the group and there create the new sub_grupo I do not know if I let myself understand,
LINEAS | GRUPOS | SUB_GRUPOS | DESCRIP_LARGA | DESCRIP_CORTA
tableros |empotrados | tapa blanca | tapas de 4 | tab4
That's the way I want to save my data in a single table I hope you can help me or give me an alternative solution.