In Master Detail relationship sometimes user needs to delete master row, if you try to delete master row before deleting child rows, runtime will not allow deletion of parent row if any child row exist.
You will need to delete all child rows before deleting parent record. For this ADF business components provides very useful option.
When you describe Association for your Master-detail Relation, under relationship tab will Display Behavior tab as shown in the following screenshot.
You will have to select “Implement Cascade Delete” option. This option will allow you to delete all child rows unconditionally with parent row.