Hi Ummul,
To read a "FOREIGN KEY constraint" error from the database, you need to know how to parse the error message, and especially the "OSFRK_" identifier. This is the actual foreign key constraint in the database, preventing you from inserting a record that has no foreign key identifier, in case it is a mandatory Attribute. Here is how it parses:
OSFRK indicates that it is an OutSystems FoReign Key. OSUSR_CJM_PERSONPHOTO is the database table that contains the foreign key. "OSUSR" is a generic indication for OutSystems USeR tables (a.k.a. Entities), "CJM" is a hashcode for the UploadImage Module. PERSONPHOTO corresponds to the PersonPhoto Entity. OSUSR_CJM_PERSON_ID indicates that there's an Attribute in the PersonPhoto Entity that refers to a Person Id.
Next, it tells you in what database the error occured (which is not interesting in this case), and then it lists the table (Entity), dbo.OSUSR_CJM_PERSON (so it pertains to the Person Entity), and the column "ID". This means that there's no corresponding "Id" in "Person" to the corresponding Attribute you're trying to store in PersonPhoto.
Looking at you data model, The Id of PersonPhoto is of type Person Identifier, so after saving a Person, you need to store the Id in PersonPhoto.Id. Currently, you assign EmployeeId, but if the Screen was started creating a new employee, EmployeeId is still empty. So you need to assign the Id of the CreateOrUpdatePerson in the Save Screen Action to EmployeeId, and it should work.