Not really. Just add another column to the “buildings” table which stores the ID of the original player who placed the building piece.
buildings table:
Then you can identify who built a specific building and handle access if it’s a door piece.
Another way would be to add the builder id to the building_instances table if needed. This is per building piece.
building_instances table:
Then just check if the player that is using a door or chest is the original builder and if true, he can access/open it.