Hi,
I’m new to Django and relational tables in general.
OPTION 1
If I have a table with following fields
Name, Address, No Channels
Address can be between 1 and 512,
No channels between 1 and 8.
When the above table is submitted, I would like to populate a second table with the following,
Channel No Channel Details
Where the channel numbers would contain the no of channels submitted in the first model with the address offset. Channel details would be generic text to be updated by the user later.
For example, if the following was submitted to table 1.
Dimmer1 200 4
The second table is populated with
200 xxx
201 xxx
202 xxx
203 xxx
Subsequent submissions should append to table 2 in a similar way.
OPTION 2
Or would this be better as a single table,
Name, Address, No CH, C1 No, C1 Name, C2 No, C2 Name etc.
Use JS to hide the unused channels in a form based on address & No CH.
Using option 2, is there a “best method” to get the 8 separate fields into a single list?
Thanks
Shaun