I am trying to draw an generic entity-relationship diagram (ERD) to model a software object (Let's say a XML file). This XML file has references to other XML files. Also, if a XML file (say "file-A") is referred by another XML file (say "file-B"), then "file-B" cannot referred by other XML files.
If I need to model those relationships in an ERD, the source entity and the target entity becomes same. I want to know whether this is acceptable or not? Because, if it is acceptable, specifying cardinality becomes an issue as different readers interpret the cardinality in different ways:
- Eg - an XML file can have references to zero or more XML files
- Eg - an xml file can have only one reference to another XML file