I'm developing an Android application and JSON web services. Android application will consume those web services.
Also, I will have a database on both sides, and server side and client side will have the same Database schema.
I will explain what I'm trying to do:
- Users create one EReport or more.
- Every EReport has one QAP. QAP table will be a copy of server side database.
- Every QAP has one or more Defect. Defect will be a copy of server side database.
- A user can define defects if he or she needs it. To do it, I have added EReportDefect table.
- A Defect could have one or more photos. I create EReportDefImg to store the relation between an EReport, and EReportDefect and one or more images.
My question is: Do I need eReportId as FK on EReportDefImg?
I've added that column because I could use to find all defect's images for an EReport.