Hi all,
I need some advice regarding the database layout of the following problem:
I have a list P of PCs. I have a list S of Software. Both have different fields and are two models.Model subclasses.
Now, I want to store for each PC in P, which software from S is installed on it and with which version.
So, P has like a ManyToMany relation to S, however for each "link" the extra-field Version would be required.
In a table layout, this could look like this:
Table PC, with columns:
Name, IP ...
Table Software with columns:
Name, Description, ...
Table InstalledSoftware with Columns;
PC (links to PC.Name), Software (links to Software.Name), Version
With this layout, the problem could be layd out. The questions are:
- Is this the correct layout for this problem? Would you suggest something else?
- can Django support this? How would the code then look like, including relevant queries?
Thanks for your help!
Max