<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="TestingModel.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2008" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
  <EntityContainer Name="TestingModelStoreContainer">
    <EntitySet Name="Predmet" EntityType="TestingModel.Store.Predmet" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Ucitel" EntityType="TestingModel.Store.Ucitel" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="UctitelPredmet" EntityType="TestingModel.Store.UctitelPredmet" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Ustav" EntityType="TestingModel.Store.Ustav" store:Type="Tables" Schema="dbo" />
    <AssociationSet Name="FK_Predmet_Katedra" Association="TestingModel.Store.FK_Predmet_Katedra">
      <End Role="Ustav" EntitySet="Ustav" />
      <End Role="Predmet" EntitySet="Predmet" />
    </AssociationSet>
    <AssociationSet Name="FK_Ucitel_Ucitel" Association="TestingModel.Store.FK_Ucitel_Ucitel">
      <End Role="Ucitel" EntitySet="Ucitel" />
      <End Role="Ucitel1" EntitySet="Ucitel" />
    </AssociationSet>
    <AssociationSet Name="FK_Ucitel_Ustav" Association="TestingModel.Store.FK_Ucitel_Ustav">
      <End Role="Ustav" EntitySet="Ustav" />
      <End Role="Ucitel" EntitySet="Ucitel" />
    </AssociationSet>
    <AssociationSet Name="FK_UctitelPredmet_Predmet" Association="TestingModel.Store.FK_UctitelPredmet_Predmet">
      <End Role="Predmet" EntitySet="Predmet" />
      <End Role="UctitelPredmet" EntitySet="UctitelPredmet" />
    </AssociationSet>
    <AssociationSet Name="FK_UctitelPredmet_Ucitel" Association="TestingModel.Store.FK_UctitelPredmet_Ucitel">
      <End Role="Ucitel" EntitySet="Ucitel" />
      <End Role="UctitelPredmet" EntitySet="UctitelPredmet" />
    </AssociationSet>
  </EntityContainer>
  <EntityType Name="Predmet">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Nazev" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Zkratka" Type="char" Nullable="false" MaxLength="4" />
    <Property Name="PocetKreditu" Type="tinyint" Nullable="false" />
    <Property Name="Popis" Type="nvarchar(max)" Nullable="false" />
    <Property Name="UstavId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="Ucitel">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Type="int" Nullable="false" />
    <Property Name="Krestni" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Prijmeni" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="DatumNarozeni" Type="datetime" Nullable="false" />
    <Property Name="Plat" Type="decimal" Nullable="false" />
    <Property Name="ProstredniJmeno" Type="nvarchar" MaxLength="50" />
    <Property Name="UstavId" Type="int" Nullable="false" />
    <Property Name="NadrizenyId" Type="int" />
  </EntityType>
  <EntityType Name="UctitelPredmet">
    <Key>
      <PropertyRef Name="UcitelId" />
      <PropertyRef Name="PredmetId" />
    </Key>
    <Property Name="UcitelId" Type="int" Nullable="false" />
    <Property Name="PredmetId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="Ustav">
    <Key>
      <PropertyRef Name="Id" />
    </Key>
    <Property Name="Id" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Nazev" Type="nvarchar" Nullable="false" MaxLength="150" />
    <Property Name="Zkratka" Type="nchar" Nullable="false" MaxLength="4" />
  </EntityType>
  <Association Name="FK_Predmet_Katedra">
    <End Role="Ustav" Type="TestingModel.Store.Ustav" Multiplicity="1" />
    <End Role="Predmet" Type="TestingModel.Store.Predmet" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Ustav">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="Predmet">
        <PropertyRef Name="UstavId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Ucitel_Ucitel">
    <End Role="Ucitel" Type="TestingModel.Store.Ucitel" Multiplicity="0..1" />
    <End Role="Ucitel1" Type="TestingModel.Store.Ucitel" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Ucitel">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="Ucitel1">
        <PropertyRef Name="NadrizenyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Ucitel_Ustav">
    <End Role="Ustav" Type="TestingModel.Store.Ustav" Multiplicity="1" />
    <End Role="Ucitel" Type="TestingModel.Store.Ucitel" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Ustav">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="Ucitel">
        <PropertyRef Name="UstavId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_UctitelPredmet_Predmet">
    <End Role="Predmet" Type="TestingModel.Store.Predmet" Multiplicity="1" />
    <End Role="UctitelPredmet" Type="TestingModel.Store.UctitelPredmet" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Predmet">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="UctitelPredmet">
        <PropertyRef Name="PredmetId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_UctitelPredmet_Ucitel">
    <End Role="Ucitel" Type="TestingModel.Store.Ucitel" Multiplicity="1" />
    <End Role="UctitelPredmet" Type="TestingModel.Store.UctitelPredmet" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Ucitel">
        <PropertyRef Name="Id" />
      </Principal>
      <Dependent Role="UctitelPredmet">
        <PropertyRef Name="UcitelId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
</Schema>