@Override
	protected boolean hasBeenDeleted(DBRecord rec) {
		if (dataType == DataType.DEFAULT) {
			return rec != null || !codeMgr.isUndefined(address, addr);
		}
		DataType dt;
		if (rec != null) {
			// ensure that record provided corresponds to a DataDB record
			// since following an undo/redo the record could correspond to
			// a different type of code unit (hopefully with a different record schema)
			if (!rec.hasSameSchema(DataDBAdapter.DATA_SCHEMA)) {
				return true;
			}
			dt = codeMgr.getDataType(rec);
			if (dt == null) {
				Msg.error(this, "Data found but datatype missing at " + address);
			}
		}
		else {
			dt = codeMgr.getDataType(addr);
		}
		if (dt == null) {
			return true;
		}
		dataType = dt;
		baseDataType = getBaseDataType(dataType);
		length = -1; // set to compute lazily later
		bytes = null;
		return false;
	}
Database implementation for the Data interface.

NOTE!! DataComponents only have a unique key within its parent Struct/Array.  This places a constraint on
the use of the key field and getKey() method on the underlying classes CodeUnitDB and DataDB.
The CodeUnit key should only be used for managing an object cache.  The addr field should be used within
this class instead of the key field which represents an "index in parent" for data components which are
cached separately.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataDB.java