I'm using Google Cloud Platform to host a web app. The app has a typical database structure, with a schema defined by Django migrations. For one of the models,
Song, each record should be associated with an object stored in Cloud Storage which contains the audio of that song. Since this audio is created and stored immediately after the database record is created, what I've done historically is to simply title the object with the ID of the database record, so that each object would be stored as
Is there a better approach to this? As long as each database record has a static ID, I can't see any critical issues with this one (and indeed, I've used it successfully in past projects of mine). But I have a hunch that many people would consider this a weak coupling and could open up the possibility for bugs.