Assignment With Answers
Assignment With Answers
Assignment With Answers
--------------------------------------------------------------------------------------------------------------------------
Name:
----------------------------------------------------------------------------------------------------------------------------
Write down the syntax for each of the question below with answer/output
----------------------------------------------------------------------------------------------------------------------------
(1) create database “policyDB”
----------------------------------------------------------------------------------------------------------------------------
(2) create collection named “policyHolders”
FieldsName:
"insuredFirstName" :
"insuredLastName" :
“Age”:
“DateOfBirth”:
"State" :
“email" :
"PhoneNumber" :
"Status" :
"Beneficiaries" :
“Relationship”:
----------------------------------------------------------------------------------------------------------------------------
(3) create collection named “claims”
FieldsName:
“ID”:
"claimNumber" :
" lineOfBusiness" :
"insuredFullName" :
"insuredFName" :
"insuredLName" :
"insuredDOB" :
"dateOfDeath" :
" Status" :
"effectiveDate" :
"insuredState" :
----------------------------------------------------------------------------------------------------------------------------
Queries
----------------------------------------------------------------------------------------------------------------------------
(1) Insert at least 10 documents in the collection policyHolders
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
(4) Update claims with at least 3 parameters separately
----------------------------------------------------------------------------------------------------------------------------
(6) Delete the PolicyHolder by name starting with letter A.
----------------------------------------------------------------------------------------------------------------------------
(7) Delete a claim which was created on a particular date.
----------------------------------------------------------------------------------------------------------------------------
(8) Delete all from PolicyHolders collection who have age greater than “ 80”
----------------------------------------------------------------------------------------------------------------------------
(9) Update the PolicyHolders Relationship to Married where Age is > 25.
----------------------------------------------------------------------------------------------------------------------------
(10) Update the claims where dateOfDeath is 1 year before the current date
JSON:
----------------------------------------------------------------------------------------------------------------------------
2. claims
----------------------------------------------------------------------------------------------------------------------------
XML:
----------------------------------------------------------------------------------------------------------------------------
Create a XML format report for
3. policyHolders
and
4. claims
----------------------------------------------------------------------------------------------------------------------------
API:
----------------------------------------------------------------------------------------------------------------------------
Create API for policyHolders and claims includes the following methods:
policyHolders:
POST:
GET,
GetOne with params:
PUT
Delete