<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="LibraryModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
  <EntityType Name="BookClass">
    <Key>
      <PropertyRef Name="ClassID" />
    </Key>
    <Property Name="ClassID" Type="String" MaxLength="10" FixedLength="true" Unicode="false" Nullable="false" />
    <Property Name="Classname" Type="String" MaxLength="30" FixedLength="true" Unicode="false" />
  </EntityType>
  <EntityType Name="BookInfo">
    <Key>
      <PropertyRef Name="BookID" />
    </Key>
    <Property Name="BookID" Type="String" MaxLength="8" FixedLength="true" Unicode="false" Nullable="false" />
    <Property Name="ISBN" Type="String" MaxLength="30" FixedLength="true" Unicode="false" />
    <Property Name="Title" Type="String" MaxLength="40" FixedLength="true" Unicode="false" />
    <Property Name="Publish" Type="String" MaxLength="40" FixedLength="true" Unicode="false" />
    <Property Name="Author" Type="String" MaxLength="30" FixedLength="true" Unicode="false" />
    <Property Name="Words" Type="Int32" />
    <Property Name="PublisherID" Type="String" MaxLength="4" FixedLength="true" Unicode="false" />
    <Property Name="Number" Type="Int32" />
    <Property Name="Price" Type="Decimal" Precision="19" Scale="4" />
    <Property Name="Keyword" Type="String" MaxLength="30" FixedLength="true" Unicode="false" />
    <Property Name="Abstract" Type="String" MaxLength="1000" FixedLength="false" Unicode="false" />
    <NavigationProperty Name="Publisherlnfo" Relationship="Self.PublisherID" FromRole="BookInfo" ToRole="Publisherlnfo" />
    <Property Name="ClassID" Type="String" MaxLength="10" FixedLength="true" Unicode="false" />
  </EntityType>
  <EntityType Name="CertificateInfo">
    <Key>
      <PropertyRef Name="Cert_id" />
    </Key>
    <Property Name="Cert_id" Type="String" MaxLength="5" FixedLength="true" Unicode="false" Nullable="false" />
    <Property Name="Cert_name" Type="String" MaxLength="10" FixedLength="true" Unicode="false" />
    <Property Name="Cert_value" Type="String" MaxLength="18" FixedLength="true" Unicode="false" />
    <Property Name="Name" Type="String" MaxLength="8" FixedLength="true" Unicode="false" />
    <Property Name="Depart" Type="String" MaxLength="20" FixedLength="true" Unicode="false" />
    <Property Name="flag" Type="Byte" />
    <NavigationProperty Name="Loan" Relationship="Self.Cert_id" FromRole="CertificateInfo" ToRole="Loan" />
    <Property Name="Cert_type" Type="String" MaxLength="1" FixedLength="true" Unicode="false" />
  </EntityType>
  <EntityType Name="Loan">
    <Key>
      <PropertyRef Name="BookID" />
      <PropertyRef Name="Cert_id" />
      <PropertyRef Name="Loandates" />
    </Key>
    <Property Name="BookID" Type="String" MaxLength="8" FixedLength="true" Unicode="false" Nullable="false" />
    <Property Name="Cert_id" Type="String" MaxLength="5" FixedLength="true" Unicode="false" Nullable="false" />
    <Property Name="Loandates" Type="DateTime" Nullable="false" Precision="0" />
    <Property Name="Return" Type="DateTime" Precision="0" />
    <Property Name="flag" Type="Byte" />
    <NavigationProperty Name="CertificateInfo" Relationship="Self.Cert_id" FromRole="Loan" ToRole="CertificateInfo" />
  </EntityType>
  <EntityType Name="Publisherlnfo">
    <Key>
      <PropertyRef Name="PublisherId" />
    </Key>
    <Property Name="PublisherId" Type="String" MaxLength="4" FixedLength="true" Unicode="false" Nullable="false" />
    <Property Name="Publisher" Type="String" MaxLength="30" FixedLength="true" Unicode="false" />
    <Property Name="Address" Type="String" MaxLength="50" FixedLength="true" Unicode="false" />
    <Property Name="Tel" Type="String" MaxLength="16" FixedLength="true" Unicode="false" />
    <Property Name="Fax" Type="String" MaxLength="16" FixedLength="true" Unicode="false" />
    <Property Name="Postcode" Type="Decimal" Precision="6" Scale="0" />
    <Property Name="http" Type="String" MaxLength="16" FixedLength="true" Unicode="false" />
    <NavigationProperty Name="BookInfo" Relationship="Self.PublisherID" FromRole="Publisherlnfo" ToRole="BookInfo" />
  </EntityType>
  <EntityType Name="user">
    <Key>
      <PropertyRef Name="userId" />
    </Key>
    <Property Name="userId" Type="Int32" Nullable="false" />
    <Property Name="username" Type="String" MaxLength="40" FixedLength="true" Unicode="false" />
    <Property Name="password" Type="String" MaxLength="40" FixedLength="true" Unicode="false" />
    <Property Name="flag" Type="Int32" />
  </EntityType>
  <Association Name="PublisherID">
    <End Role="Publisherlnfo" Type="Self.Publisherlnfo" Multiplicity="0..1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="BookInfo" Type="Self.BookInfo" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Publisherlnfo">
        <PropertyRef Name="PublisherId" />
      </Principal>
      <Dependent Role="BookInfo">
        <PropertyRef Name="PublisherID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="Cert_id">
    <End Role="CertificateInfo" Type="Self.CertificateInfo" Multiplicity="1" />
    <End Role="Loan" Type="Self.Loan" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CertificateInfo">
        <PropertyRef Name="Cert_id" />
      </Principal>
      <Dependent Role="Loan">
        <PropertyRef Name="Cert_id" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <EntityContainer Name="LibraryEntities1" annotation:LazyLoadingEnabled="true">
    <EntitySet Name="BookClass" EntityType="Self.BookClass" />
    <EntitySet Name="BookInfo" EntityType="Self.BookInfo" />
    <EntitySet Name="CertificateInfo" EntityType="Self.CertificateInfo" />
    <EntitySet Name="Loan" EntityType="Self.Loan" />
    <EntitySet Name="Publisherlnfo" EntityType="Self.Publisherlnfo" />
    <EntitySet Name="user" EntityType="Self.user" />
    <AssociationSet Name="PublisherID" Association="Self.PublisherID">
      <End Role="Publisherlnfo" EntitySet="Publisherlnfo" />
      <End Role="BookInfo" EntitySet="BookInfo" />
    </AssociationSet>
    <AssociationSet Name="Cert_id" Association="Self.Cert_id">
      <End Role="CertificateInfo" EntitySet="CertificateInfo" />
      <End Role="Loan" EntitySet="Loan" />
    </AssociationSet>
    <EntitySet Name="BaseSet" EntityType="LibraryModel.BaseSet" />
    <EntitySet Name="Depart" EntityType="LibraryModel.Depart" />
  </EntityContainer>
  <EntityType Name="BaseSet">
    <Key>
      <PropertyRef Name="flag" />
    </Key>
    <Property Name="Stu_BorrowNums" Type="Int32" />
    <Property Name="Tch_BorrowNums" Type="Int32" />
    <Property Name="Borrow_days" Type="Int32" />
    <Property Name="Rates" Type="Int32" />
    <Property Name="flag" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
    <Property Name="Tch_BorrowDays" Type="Int32" />
  </EntityType>
  <EntityType Name="Depart">
    <Key>
      <PropertyRef Name="Dept_ID" />
    </Key>
    <Property Name="Dept_ID" Type="String" Nullable="false" MaxLength="10" FixedLength="true" Unicode="false" />
    <Property Name="Dept_Name" Type="String" MaxLength="30" FixedLength="true" Unicode="false" />
  </EntityType>
</Schema>