<?xml version="1.0" encoding="UTF-8"?>
<model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.cems.uwe.ac.uk/xmlwiki/ER/model.xsd" name="Bus Depots">
    <type name="location"/>
    <entity name="Bus">
        <attribute name="regno">
            <comment/>
        </attribute>
        <attribute name="model"/>
    </entity>
    <entity name="BusType">
        
        <attribute name="tno"/>
        <attribute name="description"/>
    </entity>
    <entity name="Route">
        <attribute name="rno"/>
        <attribute name="description"/>
        <attribute name="startPoint" type="location"/>
        <attribute name="endPoint" type="location"/>
    </entity>
    
    <entity name="Driver">
        <attribute name="bdno"/>
        <attribute name="name"/>
        <attribute name="salary"/>
        <attribute name="PCVDate"/>
    </entity>
    <entity name="Depot">
        <attribute name="dno"/>
        <attribute name="dname"/>
        
        <attribute name="daddress"/>
    </entity>
    <relationship>
        <role entity="Bus" min="0" max="N"/>
        <role entity="BusType"/>
    </relationship>
    <relationship name="basedAt">
        <role entity="Bus" min="0" max="N"/>
        <role entity="Depot"/>
        
    </relationship>
    <relationship name="permittedOn">
        <role entity="BusType" min="0" max="N"/>
        <role entity="Route" min="0" max="N"/>
    </relationship>
    <relationship name="supplies">
        <role entity="Depot" min="0" max="N"/>
        <role entity="Route" min="0" max="N"/>
    </relationship>
    
    <relationship name="canOperate">
        <role entity="Driver" min="0" max="N"/>
        <role entity="Route" min="0" max="N"/>
    </relationship>
    <relationship name="qualifiedOn" inverse="canDrive">
        <role entity="Driver" min="0" max="N"/>
        <role entity="BusType" min="0" max="N"/>
    </relationship>
    <comment/>
    
</model>