Filemaker Pro 9 (50) Flashcards
This set entered on 5-12-2014
- 5.1.14.1 p 309. FINDING RELATIONSHIPS. Now that you have a list of entities, you need to figure out:
how they relate to one another
- Take two entities, CUSTOMERS and JOBS, and ask yourself how they go together. You might come up with this answer: “A CUSTOMER HIRES ME TO DO JOBS, and a JOB IS DONE FOR A CUSTOMER.” This sentence tells you TWO IMPORTANT THINGS:
a. CUSTOMERS and JOBS are RELATED.
b. ONE CUSTOMER HAS MANY JOBS, BUT EACH JOB HAS ONLY ONE CUSTOMER.
- By comparing different ENTITIES this way, you can see:
SEE HOW EACH RELATES TO ANOTHER, IF AT ALL.
- You begin by forming the relationships between tables by asking questions and forming answers, such as:
a. A CUSTOMER hires me to do JOBS, and a JOB is for a CUSTOMER.
b. A CUSTOMER is sent INVOICES, and an INVOICE is sent to a CUSTOMER.
c. A JOB takes TIME to do, and TIME is spent on a JOB.
- a) . A JOB has EXPENSES, and an EXPENSE is for one JOB.
b. A CUSTOMER is charged for EXPENSES, and an EXPENSE is charged to a CUSTOMER.
c. An INVOICE is for one JOB, and a JOB is billed on INVOICES.
d. An INVOICE has LINE ITEMS, and a LINE ITEM is on ONE INVOICE.
e. A CUSTOMER has an ADDRESS, and an ADDRESS is where a CUSTOMER lives.
f. An INVOICE is paid with PAYMENTS, and a PAYMENT is applied to INVOICES.
- Most of the items on that list easily translate into:
DATABASE RELATIONSHIPS. Each tells you about TWO ENTITIES on the LIST, and how THEY RELATE IN EACH DIRECTION.
- PAYMENTS, INVOICES, and CUSTOMER tables are straightforward, but what about TIME? What exactly is TIME and how is it handled in a DATABASE?
because the TIME ENTITY is quite common, there is a name for it: TIMESLIP. A TIMESLIP is sort of like an entry on a TIMESHEET. IT SAYS WHAT YOU WERE DOING FOR ONE PERIOD OF TIME.
- Using that explanation for TIME, the RELATIONSHIP between TIME and JOBS becomes clearer:
a JOB has TIMESLIPS, and a TIMESLIP is for one JOB.