@Override
	public boolean removeChild(String name) throws NotEmptyException {

		lock.acquire();
		try {
			checkDeleted();
			DBRecord rec = fragmentAdapter.getFragmentRecord(name);
			boolean deleteChild = false;

			if (rec != null) {
				// make sure that I am a parent of this child
				long childID = rec.getKey();
				DBRecord pcRec = parentChildAdapter.getParentChildRecord(key, -childID);
				if (pcRec == null) {
					// check for module record
					return removeModuleRecord(name);
				}
				Field[] keys = parentChildAdapter.getParentChildKeys(-childID,
					ParentChildDBAdapter.CHILD_ID_COL);
				if (keys.length == 1) {
					FragmentDB frag = moduleMgr.getFragmentDB(childID);
					if (!frag.isEmpty()) {
						throw new NotEmptyException(frag.getName() + " is not empty");
					}
					deleteChild = true;
				}
				return removeChild(childID, pcRec, true, deleteChild);
			}
			return removeModuleRecord(name);
		}
		catch (IOException e) {
			moduleMgr.dbError(e);
		}
		finally {
			lock.release();
		}
		return false;
	}
Constructor
@param moduleMgr module manager
@param cache ModuleDB cache
@param record database record for this module
@throws IOException if database IO error occurs
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/module/ModuleDB.java