<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="LibraryModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
  <EntityType Name="BaseSet">
    <Key>
      <PropertyRef Name="flag" />
    </Key>
    <Property Name="Stu_BorrowNums" Type="int" />
    <Property Name="Tch_BorrowNums" Type="int" />
    <Property Name="Borrow_days" Type="int" />
    <Property Name="Rates" Type="int" />
    <Property Name="flag" Type="varchar" MaxLength="255" Nullable="false" />
    <Property Name="Tch_BorrowDays" Type="int" />
  </EntityType>
  <EntityType Name="BookClass">
    <Key>
      <PropertyRef Name="ClassID" />
    </Key>
    <Property Name="ClassID" Type="char" MaxLength="10" Nullable="false" />
    <Property Name="Classname" Type="char" MaxLength="30" />
  </EntityType>
  <EntityType Name="BookInfo">
    <Key>
      <PropertyRef Name="BookID" />
    </Key>
    <Property Name="BookID" Type="char" MaxLength="8" Nullable="false" />
    <Property Name="ISBN" Type="char" MaxLength="30" />
    <Property Name="Title" Type="char" MaxLength="40" />
    <Property Name="Publish" Type="char" MaxLength="40" />
    <Property Name="Author" Type="char" MaxLength="30" />
    <Property Name="Words" Type="int" />
    <Property Name="PublisherID" Type="char" MaxLength="4" />
    <Property Name="Number" Type="int" />
    <Property Name="Price" Type="money" />
    <Property Name="Keyword" Type="char" MaxLength="30" />
    <Property Name="Abstract" Type="varchar" MaxLength="1000" />
    <Property Name="ClassID" Type="char" MaxLength="10" />
  </EntityType>
  <EntityType Name="CertificateInfo">
    <Key>
      <PropertyRef Name="Cert_id" />
    </Key>
    <Property Name="Cert_id" Type="char" MaxLength="5" Nullable="false" />
    <Property Name="Cert_name" Type="char" MaxLength="10" />
    <Property Name="Cert_value" Type="char" MaxLength="18" />
    <Property Name="Name" Type="char" MaxLength="8" />
    <Property Name="Depart" Type="char" MaxLength="20" />
    <Property Name="flag" Type="tinyint" />
    <Property Name="Cert_type" Type="char" MaxLength="1" />
  </EntityType>
  <EntityType Name="Depart">
    <Key>
      <PropertyRef Name="Dept_ID" />
    </Key>
    <Property Name="Dept_ID" Type="char" MaxLength="10" Nullable="false" />
    <Property Name="Dept_Name" Type="char" MaxLength="30" />
  </EntityType>
  <EntityType Name="Loan">
    <Key>
      <PropertyRef Name="BookID" />
      <PropertyRef Name="Cert_id" />
      <PropertyRef Name="Loandates" />
    </Key>
    <Property Name="BookID" Type="char" MaxLength="8" Nullable="false" />
    <Property Name="Cert_id" Type="char" MaxLength="5" Nullable="false" />
    <Property Name="Loandates" Type="date" Nullable="false" />
    <Property Name="Return" Type="date" />
    <Property Name="flag" Type="tinyint" />
  </EntityType>
  <EntityType Name="Publisherlnfo">
    <Key>
      <PropertyRef Name="PublisherId" />
    </Key>
    <Property Name="PublisherId" Type="char" MaxLength="4" Nullable="false" />
    <Property Name="Publisher" Type="char" MaxLength="30" />
    <Property Name="Address" Type="char" MaxLength="50" />
    <Property Name="Tel" Type="char" MaxLength="16" />
    <Property Name="Fax" Type="char" MaxLength="16" />
    <Property Name="Postcode" Type="numeric" Precision="6" Scale="0" />
    <Property Name="http" Type="char" MaxLength="16" />
  </EntityType>
  <EntityType Name="user">
    <Key>
      <PropertyRef Name="userId" />
    </Key>
    <Property Name="userId" Type="int" Nullable="false" />
    <Property Name="username" Type="char" MaxLength="40" />
    <Property Name="password" Type="char" MaxLength="40" />
    <Property Name="flag" Type="int" />
  </EntityType>
  <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>
  <Association Name="PublisherID">
    <End Role="Publisherlnfo" Type="Self.Publisherlnfo" Multiplicity="0..1" />
    <End Role="BookInfo" Type="Self.BookInfo" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Publisherlnfo">
        <PropertyRef Name="PublisherId" />
      </Principal>
      <Dependent Role="BookInfo">
        <PropertyRef Name="PublisherID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <EntityContainer Name="LibraryModelStoreContainer">
    <EntitySet Name="BaseSet" EntityType="Self.BaseSet" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BookClass" EntityType="Self.BookClass" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BookInfo" EntityType="Self.BookInfo" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CertificateInfo" EntityType="Self.CertificateInfo" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Depart" EntityType="Self.Depart" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Loan" EntityType="Self.Loan" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Publisherlnfo" EntityType="Self.Publisherlnfo" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="user" EntityType="Self.user" Schema="dbo" store:Type="Tables" />
    <AssociationSet Name="Cert_id" Association="Self.Cert_id">
      <End Role="CertificateInfo" EntitySet="CertificateInfo" />
      <End Role="Loan" EntitySet="Loan" />
    </AssociationSet>
    <AssociationSet Name="PublisherID" Association="Self.PublisherID">
      <End Role="Publisherlnfo" EntitySet="Publisherlnfo" />
      <End Role="BookInfo" EntitySet="BookInfo" />
    </AssociationSet>
  </EntityContainer>
</Schema>