#1 Creating relationships

closed-invalid
nobody
None
5
2010-09-27
2010-07-13
Anonymous
No

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.

Discussion

  • Lightroom model + database + schema

     
    Attachments
    • labels: 897144 -->
    • status: open --> closed-invalid
     
  • Hello.

    It is a good to keep the same column name in both sides of the relationship. If you want different names, you can edit the relationship by double clicking it.