-
-
Save lubaochuan/2aba7490b50a1f0873c68ae4ad7a4d33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE BankData [ | |
<!ELEMENT BankData (Customer•, Account•)> | |
<!ELEMENT Customer (Name, SSN, Phone+)> | |
<!ATTLIST Customer | |
customerID ID #REQUIRED | |
owns IDREFS #IMPLIED | |
> | |
<!ELEMENT Name (#PCDATA)> | |
<!ELEMENT SSN (#PCDATA)> | |
<!ELEMENT Phone (#PCDATA)> | |
<!ELEMENT Account (Type, Balance)> | |
<!ATTLIST Account | |
accountID ID #REQUIRED | |
ownedBy IDREFS #IMPLIED | |
> | |
<!ELEMENT Type (#PCDATA)> | |
<!ELEMENT Balance (#PCDATA)> | |
]> | |
alternatively we can model Type as an attribute of Account, | |
then we can make it an enumerated type. | |
<!ATTLIST Account type (checking|saving) #REQUIRED> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment