Automatic duplicate attachment and URL

For example, I have a table with columns.

  1. I need to automate the filling of the “URL” and “photo” columns. The “URL” will be the same for all columns, so I need it to be automatically duplicated when filling the “name” column.
    How can I do it?
  2. Next question:
    How to bind the column name “name” to a specific attachment “photo”?
    For example, so that when the name “rat”, is added, the already added photo, which is in this table, appears in the “attachments” column automatically?
    Thanks!