AnsweredAssumed Answered

Can the primary key of a table be multiple fields?

Question asked by wladdy on Oct 19, 2010
Latest reply on Nov 13, 2013 by MANOJKESWANI

Title

Can the primary key of a table be multiple fields?

Post

I am migrating from Access to Filemaker and I have the following question.

Can the primary key of a table be multiple fields?

In Access, I used to have a database with three tables: 'Days', 'Shows' to record performances given on various days and 'Acts' to record the various acts making up each performance.

PK for 'Days' was field 'DayID'

PK for 'Shows' were fields 'ShowDayID' (child of 'DayID') and 'ShowRank' (1, 2, 3, etc)

PK for 'Acts' were fields 'ActDayID' (child of 'ShowDayID'), 'ActShowRank' (child of 'ShowRank') and 'ActRank' (1, 2, 3, etc).

This system had the advantage of keeping all fields meaningful, avoiding artificial ID fields such as 'ShowID' or 'RankID'. Of course, the database was merely to record what had happened and thus the contents of the fields would never change once recorded.

Is there a way to replicate a similar approach in FileMaker? Is there a better way altogether?

Thank you very much!

Outcomes