<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE table PUBLIC "-//iptel.org//DTD DBSchema V1.0//EN"
  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd" [

<!ENTITY % entities SYSTEM "entities.xml">
%entities;

]>

<table role="serweb">
  <name>phonebook</name>
  <version>1</version>

  <description>
	Phonebook entries of users.
  </description>
  <column id="pb.id">
	<name>id</name>
	<type>unsigned int</type>
	<type db="mysql">INT AUTO_INCREMENT</type>
	<type db="postgres">SERIAL</type>
	<type db="dbtext">int,auto</type>
	<description>
	  Unique id of the row. The value is auto generated by the databsae
	  server.
	</description>
  </column>

  <column id="pb.uid">
	<name>uid</name>
	<name db="oracle">uuid</name>
	<type>string</type>
	<size>&id_len;</size>
	<description>
	  UID (Unique ID) of the user who owns the entry.
	</description>
  </column>

  <column>
	<name>fname</name>
	<type>string</type>
	<size>32</size>
	<null/>
	<description>
	  First name of the phonebook contact.
	</description>
  </column>

  <column>
	<name>lname</name>
	<type>string</type>
	<size>32</size>
	<null/>
	<description>
	  Last name of the phonebook contact.
	</description>
  </column>

  <column>
	<name>sip_uri</name>
	<type>string</type>
	<size>&uri_len;</size>
	<description>
	  SIP URI of the phonebook contact.
	</description>
  </column>

  <index>
	<name>pb_idx</name>
	<unique/>
	<colref linkend="pb.id"/>
  </index>
  <index>
	<name>pb_uid</name>
	<colref linkend="pb.uid"/>
  </index>
</table>
