<?xml version="1.0" encoding="UTF-8"?><database name="postgres" schema="petclinic" type="PostgreSQL - 17.2 (Debian 17.2-1.pgdg120+1)">
   <sequences>
      <sequence increment="1" name="owners_id_seq" startValue="1"/>
      <sequence increment="1" name="pet_types_id_seq" startValue="1"/>
      <sequence increment="1" name="pets_id_seq" startValue="1"/>
      <sequence increment="1" name="specialties_id_seq" startValue="1"/>
      <sequence increment="1" name="vets_id_seq" startValue="1"/>
      <sequence increment="1" name="visits_id_seq" startValue="1"/>
   </sequences>
   <tables>
      <table name="names" remarks="Table to demonstrate anomalies, such as table with only one column, table without relations etc." schema="petclinic" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
      </table>
      <table name="namesuc" numRows="0" remarks="All the names in upper case" schema="petclinic" type="VIEW" viewSql=" SELECT upper(name) AS upper&#10;   FROM petclinic.names;">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="upper" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
      </table>
      <table name="owners" remarks="Stores details of pet owners, including their names, address, and contact information." schema="petclinic" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('petclinic.owners_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="serial" typeCode="4">
            <child column="owner_id" foreignKey="fk_owner" implied="false" onDeleteCascade="true" schema="petclinic" table="pets"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="first_name" nullable="false" remarks="" size="50" type="varchar" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="last_name" nullable="false" remarks="" size="50" type="varchar" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="address" nullable="true" remarks="" size="255" type="varchar" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="city" nullable="true" remarks="" size="100" type="varchar" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="telephone" nullable="true" remarks="" size="20" type="varchar" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="owners_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="pet_types" remarks="Stores the different types of pets (e.g., dog, cat, etc.)." schema="petclinic" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('petclinic.pet_types_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="serial" typeCode="4">
            <child column="pet_type_id" foreignKey="fk_pet_type" implied="false" onDeleteCascade="false" schema="petclinic" table="pets"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="50" type="varchar" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pet_types_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="pets" remarks="Stores pet information, linking each pet to its owner and pet type." schema="petclinic" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('petclinic.pets_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique identifier for each pet, auto-generated via a sequence." size="10" type="serial" typeCode="4">
            <child column="pet_id" foreignKey="fk_pet" implied="false" onDeleteCascade="true" schema="petclinic" table="visits"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="Name of the pet." size="50" type="varchar" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="birth_date" nullable="true" remarks="Birth date of the pet." size="13" type="date" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="owner_id" nullable="false" remarks="Foreign key referencing the owner in the owners table." size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_owner" implied="false" onDeleteCascade="true" schema="petclinic" table="owners"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="pet_type_id" nullable="false" remarks="Foreign key referencing the type of pet in the pet_types table." size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_pet_type" implied="false" onDeleteCascade="false" schema="petclinic" table="pet_types"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pets_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="specialties" remarks="Stores the various specialties that veterinarians can have." schema="petclinic" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('petclinic.specialties_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="serial" typeCode="4">
            <child column="specialty_id" foreignKey="fk_specialty" implied="false" onDeleteCascade="true" schema="petclinic" table="vet_specialties"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="50" type="varchar" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="specialties_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="vet_specialties" remarks="Link table representing the many-to-many relationship between veterinarians and their specialties." schema="petclinic" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="vet_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_vet" implied="false" onDeleteCascade="true" schema="petclinic" table="vets"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="specialty_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_specialty" implied="false" onDeleteCascade="true" schema="petclinic" table="specialties"/>
         </column>
         <primaryKey column="vet_id" sequenceNumberInPK="1"/>
         <primaryKey column="specialty_id" sequenceNumberInPK="2"/>
         <index name="vet_specialties_pkey" unique="true">
            <column ascending="true" name="vet_id"/>
            <column ascending="true" name="specialty_id"/>
         </index>
      </table>
      <table name="vets" remarks="Stores information about veterinarians." schema="petclinic" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('petclinic.vets_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="serial" typeCode="4">
            <child column="vet_id" foreignKey="fk_vet" implied="false" onDeleteCascade="true" schema="petclinic" table="vet_specialties"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="first_name" nullable="false" remarks="" size="50" type="varchar" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="last_name" nullable="false" remarks="" size="50" type="varchar" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="vets_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="visits" remarks="Records pet visits to the clinic, including the visit date and a description of the visit." schema="petclinic" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('petclinic.visits_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="serial" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="pet_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_pet" implied="false" onDeleteCascade="true" schema="petclinic" table="pets"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="visit_date" nullable="false" remarks="" size="13" type="date" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="visits_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
   </tables>
</database>
