<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="SimpleDB"
    nsURI="http://uk.ac.le.cs.moment2/SimpleDB" nsPrefix="SimpleDB">
  <eClassifiers xsi:type="ecore:EClass" name="Schema">
    <eStructuralFeatures xsi:type="ecore:EReference" name="tables" ordered="false"
        upperBound="-1" eType="ecore:EClass #//Table"
        containment="true" eOpposite="#//Table/schema"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Table">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="schema" lowerBound="1"
        eType="ecore:EClass #//Schema"
        eOpposite="#//Schema/tables"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="columns" ordered="false"
        upperBound="-1" eType="ecore:EClass #//Column"
        containment="true" eOpposite="#//Column/owningTable"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="key" lowerBound="1" eType="ecore:EClass #//Key"
        containment="true" eOpposite="#//Key/owningTable"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="fks" ordered="false" upperBound="-1"
        eType="ecore:EClass #//ForeignKey"
        containment="true" eOpposite="#//ForeignKey/owningTable"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Column">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="nnv" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="unique" lowerBound="1"
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="owningTable" lowerBound="1"
        eType="ecore:EClass #//Table"
        eOpposite="#//Table/columns"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Key">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="owningTable" lowerBound="1"
        eType="ecore:EClass #//Table"
        eOpposite="#//Table/key"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="columns" ordered="false"
        upperBound="-1" eType="ecore:EClass #//Column"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ForeignKey">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="owningTable" lowerBound="1"
        eType="ecore:EClass #//Table"
        eOpposite="#//Table/fks"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="columns" ordered="false"
        upperBound="-1" eType="ecore:EClass #//Column"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="refersTo" lowerBound="1"
        eType="ecore:EClass #//Key"/>
  </eClassifiers>
</ecore:EPackage>
