CLAIM (claimID, lodgedDate, status, policyID) Foreign key (policyID) references POLICY (PolicyID)
CLAIM_ITEMS (itemID, quantity, status,claimID) Foreign Key (claimID) references CLAIM (claimID)
SETTLED_CLAIM (claimID, settledDate, amountSettled) Foreign Key (claimID) references CLAIM (claimID)
REJECTED_CLAIM (claimID, rejectedDate, rejectedReason) Foreign Key (claimID) references CLAIM (claimID)
POLICY (policyID, effectiveFromDate, paidDate, isHomBuilding, isContentPolicy, TotalPolicy, propertyID) Foreign key (propertyID) References PROPERTY (propertyID)
HOME_BUILDING (HBpolicyID, houseType, yearBuilt, isAlarmFitted, windowLocks, insuredAmount, buildingPremiumAmount) Foreign key (HBPolicyID) references POLICY (PolicyID)
HOME_CONTENT (HCpolicyID, contentPremiumAmount) Foreign key (HCPolicyID) references POLICY (PolicyID)
CONTENT_ITEM (itemID, name, manufacturer, model, purchasePrice, quantity, claimedStatus, HCpolicyID) Foreign key (HCpolicyID) References HOME_CONTENT (HCPolicyID)
PERSON (personID, personName, street, city, postcode, personType)
PROPERTY (propertyID, street, city, postcode, personID) Foreign key (PersonID) References PERSON (PersonID)
ASSESSMENT (reportID, reportDate, initilaRecommendation, reportType, claimID, assessorID) Foreign key (assessorID) references ASSESSOR (assessorID)
FINALASSESSMENT (reportID, assessmentDate, reportType) Foreign key (reportID) References ASSESSMENT (reportID)
ASSESSOR (assesorID, name, street, city, postcode)
ASSESSORQUALIFICATIONS (assessorID, qualificationName, dateQualified) Foreign key (assessorID) references ASSESSOR (assessorID)
b). Functional dependencies
- Claim(claimID, lodgedDate, status, policyID)
(claimID)à (lodgedDate, status, policyID )
This means claimID determines all lodgedDate, status and policyID as shown below;
- Person(personID, personName, street, city, postcode, personType)
(personID)à (personName, street, city, postcode, personType)
This means that personID determines personName, street, city, postcode and personType
Demonstration of 3NF
Claim (claimID, lodgedDate, status, policyID)
- The relation is in 1NF because it has a primary key which identifies every claim. Every claim has one lodgedDate, one status and belongs to only one policy thus there are no repeating groups.
- The relation is 2NF because there is only candidate key which is claimID. All the other attributes are dependent on the claimID because the lodgedDate can be the same for two different claims, the status can be the same and a policy can have more than one claim thus this attributes cannot be guaranteed to be unique for a claim that is why the claimID is the only candidate key.
- The relation is in 3NF because claimID determines all the other attributes in the relation. THe lodgedDate cannot be used to determine the status and policyID because it is not unique thus claimID is the key attribute meaning there are no transitive dependencies present in the relation.
person (personID, personName, street, city, postcode, personType)
- THe relation is in 1NF because there are no repeating groups in the relation. The personID is the primary key and a person has only one name, street, city, postcode and is of only one type thus no attribute has repeating data.
- The relation is in 2NF because there are no partial dependencies in the relation. There is only one candidate key in the relaton which is the personID. All the attributes depend on the personID since the two people ca have the same name, same address and can be of the same type thus this cannot be guaranteed to be unique for every person.
- The relation is in 3NF because there are no transitive dependencies in the relation. THe key attribute is personID and determines all the other attributes. A personName cannot be used to determine the address nor can the address determine the name because these attributes are not unique for every person thus only the claimID can determine all the attributes.
The implementation of the database using Microsoft Access was very informative and challenging at the same time. I learnt a lot of things while implementing the database but the most two noticeable two lessons are;
- Enforcing referential integrity in a database and how it is important on ensuring data consistency. While creating the relationships between different tables, I realized that enforcing data integrity either for deleting or updating of records ensures that the transaction is done for both the child table and the parent table depending on what was specified during the creation of the relationship between the two tables.
- Using access to create a report from a query. By writing a query using SQL Access Query Builder I learnt that generating a report is very easy and can be done from any type of query. After generating the report from a query the next step is to design it depending on the fields making up the report.
While undertaking the task I found some tasks easy to solve while other parts of the task were difficult to implement. One of the most difficult part for me was writing complex queries using Access Query Builder. However, by doing research I was able to write highly efficient queries that produced the desired results.