Composition - this is a special type of association used for modelling 'Ownership'. This is very similar to Aggregation with the only difference that it depicts a Whole-part relationship and the 'part' entity doesn't have its own independent existence. The existence of entity depicting 'whole' giverns the lifetime of the 'part' entity as well. For example: Consider two entities Employee (EmpNo, Name, EmailId, Salary, DeptNo, Address) and EmailId (ID, domain). Now an independent instance of EmailId entity doesn't really make sense unless it's associated with an Employee instance.
Composition is normally understood as a "contains-a" relations. Similar to Aggregation, a Composition also forms a Tree only and not a Graph as it can't be cyclic. In UML notation, a Compsoition is depicted by a filled diamond and a solid line.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.