Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

3 Entities Relationship (Newbie)


This topic is 5790 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have 3 Entities: ENTRY, BOOK and DOCUMENT.

The ENTRY can only have one type: BOOK or DOCUMENT.

How can I achive it. I created the relationships, Primary and Forein keys, but it does not work the way I want.I did try to validate with no results, besides the ugly dialog box pops up!

Please see an attachment ( I left a very few attributes to keep database clear.) and help me or at least point me what should I do.

note:

The structure of tables must be preserved because there will be a huge data imported from a PostgreSQL.

Thank you very much!

ENTRIES.fp7.zip

Posted (edited)

You have it backwards. You should not have an fk_entryID in Books and Documents. You need an EntryType and bookID or documentID field in Entries which will contain the book or document primary key. Can an entry be both a book and a document? If so, you will want either a Type field in Entries and then two fields (one for bookID and one for documentID) ... or you will want a join table.

The ENTRY can only have one type: BOOK or DOCUMENT.

In general, your Entry table is your 'many' side, pulling in only ONE ID from either book or document. But you also don't need both a book and document table. You can share the same table and just include a SourceType field (see attached). Sometimes you NEED to split tables but I do not believe you need to do it here.

But your split of data still seems a bit off ... your Source (Library) should contain your book titles or document titles as well (I think). Anyway, I didn't do anything with this portion, only your book/document table. :wink2:

LaRetta

ENTRIESrev.zip

Edited by Guest
Posted

You see DOCUMENT, BOOK (there are more not in a sample) are all subsets of ENTRY.

If I do your way a cohesiveness will be lost, and that's what I do not want.

I am posting a data model of that database to give you idea how it looks in PostgreSQL,

it's not finished as I'm in progress of drawing, but the main thing is there, so you should be able to get a clear picture.

FileMaker is very friendly, but I must tell you that tables and relationships are very confusing.

I guess I must get some book and study those proprietaries of FileMaker.

Thank you very much for your time.

ENTRIES-Model.pdf.zip

This topic is 5790 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.