Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. MySQL
  4. How would you organize this?

How would you organize this?

Scheduled Pinned Locked Moved MySQL
5 Posts 3 Posters 153 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joan M
    wrote last edited by
    #1

    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.

    https://www.robotecnik.com freelance robots, PLC and CNC programmer.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Joan M
      wrote last edited by
      #2

      Thanks! I really thought it was.

      https://www.robotecnik.com freelance robots, PLC and CNC programmer.

      1 Reply Last reply
      0
      • Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote last edited by
        #3

        @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.

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        1 Reply Last reply
        1
        • J Offline
          J Offline
          Joan M
          wrote last edited by
          #4

          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

          https://www.robotecnik.com freelance robots, PLC and CNC programmer.

          1 Reply Last reply
          1
          • realJSOPR Offline
            realJSOPR Offline
            realJSOP
            wrote last edited by
            #5

            I suspected this would start happening (answering questions with AI responses and without attribution).

            1 Reply Last reply
            1
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups