123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- <?xml version="1.0" encoding="utf-8"?>
- <Schema Namespace="Session3_4Model" 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="Aircrafts">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="Int32" Nullable="false" />
- <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="MakeModel" Type="String" MaxLength="10" FixedLength="false" Unicode="true" />
- <Property Name="TotalSeats" Type="Int32" Nullable="false" />
- <Property Name="EconomySeats" Type="Int32" Nullable="false" />
- <Property Name="BusinessSeats" Type="Int32" Nullable="false" />
- <NavigationProperty Name="Schedules" Relationship="Self.FK_Schedule_AirCraft" FromRole="Aircrafts" ToRole="Schedules" />
- </EntityType>
- <EntityType Name="Airports">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="CountryID" Type="Int32" Nullable="false" />
- <Property Name="IATACode" Type="String" MaxLength="3" FixedLength="false" Unicode="false" Nullable="false" />
- <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
- <NavigationProperty Name="Countries" Relationship="Self.FK_AirPort_Country" FromRole="Airports" ToRole="Countries" />
- <NavigationProperty Name="Routes" Relationship="Self.FK_Routes_Airports2" FromRole="Airports" ToRole="Routes" />
- <NavigationProperty Name="Routes1" Relationship="Self.FK_Routes_Airports3" FromRole="Airports" ToRole="Routes" />
- </EntityType>
- <EntityType Name="CabinTypes">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <NavigationProperty Name="Tickets" Relationship="Self.FK_Ticket_TravelClass" FromRole="CabinTypes" ToRole="Tickets" />
- </EntityType>
- <EntityType Name="Countries">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <NavigationProperty Name="Airports" Relationship="Self.FK_AirPort_Country" FromRole="Countries" ToRole="Airports" />
- <NavigationProperty Name="Offices" Relationship="Self.FK_Office_Country" FromRole="Countries" ToRole="Offices" />
- </EntityType>
- <EntityType Name="Offices">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="CountryID" Type="Int32" Nullable="false" />
- <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="Phone" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="Contact" Type="String" MaxLength="250" FixedLength="false" Unicode="true" Nullable="false" />
- <NavigationProperty Name="Countries" Relationship="Self.FK_Office_Country" FromRole="Offices" ToRole="Countries" />
- <NavigationProperty Name="Users" Relationship="Self.FK_Users_Offices" FromRole="Offices" ToRole="Users" />
- </EntityType>
- <EntityType Name="Roles">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="Int32" Nullable="false" />
- <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <NavigationProperty Name="Users" Relationship="Self.FK_Users_Roles" FromRole="Roles" ToRole="Users" />
- </EntityType>
- <EntityType Name="Routes">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="DepartureAirportID" Type="Int32" Nullable="false" />
- <Property Name="ArrivalAirportID" Type="Int32" Nullable="false" />
- <Property Name="Distance" Type="Int32" Nullable="false" />
- <Property Name="FlightTime" Type="Int32" Nullable="false" />
- <NavigationProperty Name="Airports" Relationship="Self.FK_Routes_Airports2" FromRole="Routes" ToRole="Airports" />
- <NavigationProperty Name="Airports1" Relationship="Self.FK_Routes_Airports3" FromRole="Routes" ToRole="Airports" />
- <NavigationProperty Name="Schedules" Relationship="Self.FK_Schedule_Routes" FromRole="Routes" ToRole="Schedules" />
- </EntityType>
- <EntityType Name="Schedules">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="Date" Type="DateTime" Nullable="false" Precision="0" />
- <Property Name="Time" Type="Time" Nullable="false" Precision="5" />
- <Property Name="AircraftID" Type="Int32" Nullable="false" />
- <Property Name="RouteID" Type="Int32" Nullable="false" />
- <Property Name="EconomyPrice" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
- <Property Name="Confirmed" Type="Boolean" Nullable="false" />
- <Property Name="FlightNumber" Type="String" MaxLength="10" FixedLength="false" Unicode="true" />
- <NavigationProperty Name="Aircrafts" Relationship="Self.FK_Schedule_AirCraft" FromRole="Schedules" ToRole="Aircrafts" />
- <NavigationProperty Name="Routes" Relationship="Self.FK_Schedule_Routes" FromRole="Schedules" ToRole="Routes" />
- <NavigationProperty Name="Tickets" Relationship="Self.FK_Ticket_Schedule" FromRole="Schedules" ToRole="Tickets" />
- </EntityType>
- <EntityType Name="Tickets">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="UserID" Type="Int32" Nullable="false" />
- <Property Name="ScheduleID" Type="Int32" Nullable="false" />
- <Property Name="CabinTypeID" Type="Int32" Nullable="false" />
- <Property Name="Firstname" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="Lastname" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="Email" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
- <Property Name="Phone" Type="String" MaxLength="14" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="PassportNumber" Type="String" MaxLength="9" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="PassportCountryID" Type="Int32" Nullable="false" />
- <Property Name="BookingReference" Type="String" MaxLength="6" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="Confirmed" Type="Boolean" Nullable="false" />
- <NavigationProperty Name="CabinTypes" Relationship="Self.FK_Ticket_TravelClass" FromRole="Tickets" ToRole="CabinTypes" />
- <NavigationProperty Name="Schedules" Relationship="Self.FK_Ticket_Schedule" FromRole="Tickets" ToRole="Schedules" />
- <NavigationProperty Name="Users" Relationship="Self.FK_Ticket_User" FromRole="Tickets" ToRole="Users" />
- </EntityType>
- <EntityType Name="Users">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="Int32" Nullable="false" />
- <Property Name="RoleID" Type="Int32" Nullable="false" />
- <Property Name="Email" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="Password" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="FirstName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
- <Property Name="LastName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
- <Property Name="OfficeID" Type="Int32" />
- <Property Name="Birthdate" Type="DateTime" Precision="0" />
- <Property Name="Active" Type="Boolean" />
- <NavigationProperty Name="Offices" Relationship="Self.FK_Users_Offices" FromRole="Users" ToRole="Offices" />
- <NavigationProperty Name="Roles" Relationship="Self.FK_Users_Roles" FromRole="Users" ToRole="Roles" />
- <NavigationProperty Name="Tickets" Relationship="Self.FK_Ticket_User" FromRole="Users" ToRole="Tickets" />
- </EntityType>
- <Association Name="FK_Schedule_AirCraft">
- <End Role="Aircrafts" Type="Self.Aircrafts" Multiplicity="1" />
- <End Role="Schedules" Type="Self.Schedules" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Aircrafts">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Schedules">
- <PropertyRef Name="AircraftID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_AirPort_Country">
- <End Role="Countries" Type="Self.Countries" Multiplicity="1" />
- <End Role="Airports" Type="Self.Airports" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Countries">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Airports">
- <PropertyRef Name="CountryID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Routes_Airports2">
- <End Role="Airports" Type="Self.Airports" Multiplicity="1" />
- <End Role="Routes" Type="Self.Routes" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Airports">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Routes">
- <PropertyRef Name="DepartureAirportID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Routes_Airports3">
- <End Role="Airports" Type="Self.Airports" Multiplicity="1" />
- <End Role="Routes" Type="Self.Routes" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Airports">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Routes">
- <PropertyRef Name="ArrivalAirportID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Ticket_TravelClass">
- <End Role="CabinTypes" Type="Self.CabinTypes" Multiplicity="1" />
- <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="CabinTypes">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Tickets">
- <PropertyRef Name="CabinTypeID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Office_Country">
- <End Role="Countries" Type="Self.Countries" Multiplicity="1" />
- <End Role="Offices" Type="Self.Offices" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Countries">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Offices">
- <PropertyRef Name="CountryID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Users_Offices">
- <End Role="Offices" Type="Self.Offices" Multiplicity="0..1" />
- <End Role="Users" Type="Self.Users" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Offices">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Users">
- <PropertyRef Name="OfficeID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Users_Roles">
- <End Role="Roles" Type="Self.Roles" Multiplicity="1" />
- <End Role="Users" Type="Self.Users" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Roles">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Users">
- <PropertyRef Name="RoleID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Schedule_Routes">
- <End Role="Routes" Type="Self.Routes" Multiplicity="1" />
- <End Role="Schedules" Type="Self.Schedules" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Routes">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Schedules">
- <PropertyRef Name="RouteID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Ticket_Schedule">
- <End Role="Schedules" Type="Self.Schedules" Multiplicity="1" />
- <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Schedules">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Tickets">
- <PropertyRef Name="ScheduleID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Ticket_User">
- <End Role="Users" Type="Self.Users" Multiplicity="1" />
- <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Users">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Tickets">
- <PropertyRef Name="UserID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <EntityContainer Name="Session3_4Entities" annotation:LazyLoadingEnabled="true">
- <EntitySet Name="Aircrafts" EntityType="Self.Aircrafts" />
- <EntitySet Name="Airports" EntityType="Self.Airports" />
- <EntitySet Name="CabinTypes" EntityType="Self.CabinTypes" />
- <EntitySet Name="Countries" EntityType="Self.Countries" />
- <EntitySet Name="Offices" EntityType="Self.Offices" />
- <EntitySet Name="Roles" EntityType="Self.Roles" />
- <EntitySet Name="Routes" EntityType="Self.Routes" />
- <EntitySet Name="Schedules" EntityType="Self.Schedules" />
- <EntitySet Name="Tickets" EntityType="Self.Tickets" />
- <EntitySet Name="Users" EntityType="Self.Users" />
- <AssociationSet Name="FK_Schedule_AirCraft" Association="Self.FK_Schedule_AirCraft">
- <End Role="Aircrafts" EntitySet="Aircrafts" />
- <End Role="Schedules" EntitySet="Schedules" />
- </AssociationSet>
- <AssociationSet Name="FK_AirPort_Country" Association="Self.FK_AirPort_Country">
- <End Role="Countries" EntitySet="Countries" />
- <End Role="Airports" EntitySet="Airports" />
- </AssociationSet>
- <AssociationSet Name="FK_Routes_Airports2" Association="Self.FK_Routes_Airports2">
- <End Role="Airports" EntitySet="Airports" />
- <End Role="Routes" EntitySet="Routes" />
- </AssociationSet>
- <AssociationSet Name="FK_Routes_Airports3" Association="Self.FK_Routes_Airports3">
- <End Role="Airports" EntitySet="Airports" />
- <End Role="Routes" EntitySet="Routes" />
- </AssociationSet>
- <AssociationSet Name="FK_Ticket_TravelClass" Association="Self.FK_Ticket_TravelClass">
- <End Role="CabinTypes" EntitySet="CabinTypes" />
- <End Role="Tickets" EntitySet="Tickets" />
- </AssociationSet>
- <AssociationSet Name="FK_Office_Country" Association="Self.FK_Office_Country">
- <End Role="Countries" EntitySet="Countries" />
- <End Role="Offices" EntitySet="Offices" />
- </AssociationSet>
- <AssociationSet Name="FK_Users_Offices" Association="Self.FK_Users_Offices">
- <End Role="Offices" EntitySet="Offices" />
- <End Role="Users" EntitySet="Users" />
- </AssociationSet>
- <AssociationSet Name="FK_Users_Roles" Association="Self.FK_Users_Roles">
- <End Role="Roles" EntitySet="Roles" />
- <End Role="Users" EntitySet="Users" />
- </AssociationSet>
- <AssociationSet Name="FK_Schedule_Routes" Association="Self.FK_Schedule_Routes">
- <End Role="Routes" EntitySet="Routes" />
- <End Role="Schedules" EntitySet="Schedules" />
- </AssociationSet>
- <AssociationSet Name="FK_Ticket_Schedule" Association="Self.FK_Ticket_Schedule">
- <End Role="Schedules" EntitySet="Schedules" />
- <End Role="Tickets" EntitySet="Tickets" />
- </AssociationSet>
- <AssociationSet Name="FK_Ticket_User" Association="Self.FK_Ticket_User">
- <End Role="Users" EntitySet="Users" />
- <End Role="Tickets" EntitySet="Tickets" />
- </AssociationSet>
- </EntityContainer>
- </Schema>
|