How would you organize this?
-
Hello all,
I am working in a program where I must store device settings into a database.
There are multiple machines, and each machine can have some devices.
Each device can have different settings and communication protocols with different parameters.I have thought on making this:
tMachines registers will have "id" and "name".
tDevices registers will have "id", "idMachine", "name", "communication_protocol", "device_type".
tProtocol_sockets registers will have "id", "idDevice", "port", "IP_address"...
tProtocol_232 registers will have "id", "idDevice", "port", "baudrate", "parity"...
tPowerSupplyParameters registers will have "id", "idDevice", "number_of_channels",...That way from the PLC code I will be able to get the type of communication used checking the tDevices "communication_protocol" and then, knowing this I will be able to get the right parameters from the right table "tProtocol_sockets " or "tProtocol_232" and finally I will be able to get the specific parameters for that device after getting "device_type" from the tDevices table and querying the right table (i.e. "tPowerSupplyParameters")...
Does all this sounds OK to you?
As usual, thank you very mcuh for your time and help.
-
@shikha.agnito If you're going to post the output of an AI chat, at the very least you need to indicate that it's the output of an AI chat, and indicate which AI engine you used to generate it.
Just copying the AI's output and posting it as your own work stinks of plagiarism.
-
Not only plagiarism @Richard-Deeming, one comes to CP to ask people with experience and knowledge hints, best ways to do things... I can ask Copilot, or any other AI out there the same question... This is plain stupid and doesn't help anyone.
And clearly, I must fall down the tree and wake up a little... :D:D:D:D