I'm using Adobe Photoshop Lightroom. This product uses a SQLite database.
I have used the option "Reverse engineering" to load the description of three tables: AgLibraryRootFolder (table with the root directories); AgLibraryFolder (table with the folders of the files) and AgLibraryFile (table with the image files).
The 1:n relationship between them are:
AgLibraryFile.folder = AgLibraryFolder.id_local
AgLibraryFolder.rootFolder = AgLibraryRootFolder.id_local
If have tried to paint this, but I can not do this. I always get automatically 2 foreign key rows and there should be only one.
What should do to create the right relationships?
I have added the model without relationships, a sample Lightroom database and the database schema as an attachment.