<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd']>

<!-- may be omitted for very short documents --> 
<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>

<!-- these two save paper: start new sections from the same page etc. -->
<?rfc compact="yes"?> <?rfc subcompact="no"?>

<!-- other categories: bcp, exp, historic, std -->
<rfc ipr="trust200902" category="info" docName="draft-shafranovich-mime-sql-05.txt">

<front>
	<title abbrev="The application/sql Media Type">The application/sql Media Type</title>
	<author fullname="Yakov Shafranovich" initials="Y." surname="Shafranovich">
		<organization>BioFortis, Inc.</organization>
		<address>			
			<postal>
				<street>10320 Little Patuxent Parkway, Suite 410</street>
				<city>Columbia</city>
				<region>MD</region>
				<code>21044</code>
				<country>US</country>
			</postal>
			<phone>+1 443 276-2464</phone>
			<email>ietf@shaftek.org</email>
		</address>
	</author>
	<date month="February" year="2013"/>
	<keyword>SQL</keyword>
	<keyword>MIME</keyword>

	<abstract>
		<t>This document registers the application/sql media type to be used for the Structured Query Language (SQL).</t>
	</abstract>
</front>

<middle>
<section title="Introduction">
	<t>The Structured Query Language (SQL) has been in use for over 30 years with various types of database
        technologies. However, there is no current media type registered for SQL. Therefore, this document
	seeks to formally register the application/sql media type to be used for SQL with IANA.
	</t>
</section>

<section title="Conventions Used in This Document">
	<t>
	  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
	  "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
	  document are to be interpreted as described in <xref target="RFC2119"/> when they
	  appear in ALL CAPS.  These words may also appear in this document in
	  lower case as plain English words, absent their normative meanings.
	</t>
</section>

<section anchor="registration" title="Media Type Registration Application">
	<t>This section provides the media type registration application for this media type (see <xref target="RFC6838"/>, Section 5.6)</t>

	<t>Type name: application</t>
	<t>Subtype name: sql</t>
	<t>Required parameters: N/A</t>
	<t>Optional parameters: 
		<list style="empty">	
			<t>"charset" - indicates the character set to be used. When not specified, a default value MUST NOT be assumed.</t>
			<t>Implementators should be aware that SQL may carry character set information in-band. In such cases, the "charset" parameter
			MUST NOT be used in order to avoid conflict. In cases, where no character set information is supplied in-band,
			and the character set is known, implementors SHOULD use the "charset" parameter. If no in-band or out-of-band
			character set information is available, implementors MUST NOT use the "charset" parameter.</t>
		</list>
	</t>
	<t>Encoding considerations:
		<list style="empty">	
			<t>If the "charset" parameter is used, the corresponding 7-bit, 8-bit or binary encoding may be used.
			If the "charset" parameter is not used, binary encoding may be required.
			</t>
		</list>
	</t>
	<t>Security considerations:
		<list style="empty">
			<t>
				Being that SQL is a full fledged programming language and may include embedded source code for other programming languages,
				there is a risk of it being used to transfer malware, viruses and other malicious payloads. Implementors and users are encouraged only to exchange
				SQL files among trusted parties and utilize all available security measures such as restricted access,
				virus scanners, etc. to minimize risk.				
			</t>
			<t>Implementors should also be aware that guessing character sets, encodings, and possible conflicts between in-band and out-of-band character set
			information may lead to the similar security issues as described above.</t>
		</list>
	</t>
	<t>
	Interoperability considerations:
		<list style="empty">
			<t>
				While a single standard exists (<xref target="ISO.9075.2011"/>),
				vendor implementations of the standard
				vary significantly. Implementors and users should make sure
				that the exchanged SQL files match to the specific database/tool and version
				that they are using.
			</t>
		</list>
	</t>
	<t>Published specification:
		<list style="empty">
		<t>
			The most recent specification of SQL is available in <xref target="ISO.9075.2011"/>.
		</t>
		</list>
	</t>
	<t>Applications that use this media type:
		<list style="empty">
			<t>Databases and related tools</t>
		</list>
	</t>
	<t>Fragment identifier considerations: N/A</t>
	<t>Additional information:
		<list style="empty">
			<t>Deprecated alias names for this type: N/A</t>
			<t>Magic number(s): N/A</t>
			<t>File extension(s): sql</t>
			<t>Macintosh File Type Code(s): N/A</t>
		</list>
	</t>
	<t>Person &amp; email address to contact for further information:
		<list style="empty">
			<t>Yakov Shafranovich &lt;ietf@shaftek.org&gt;</t>
		</list>
	</t>
	<t>Intended usage: COMMON</t>
	<t>Restrictions on usage: N/A</t>
	<t>Author: IESG</t>
        <t>Change controller: IESG</t>
	<t>Provisional registration? (standards tree only): N/A</t>
</section>

<section title="IANA Considerations">
	<t>IANA is asked to register the media type application/sql in the Standards tree using the application provided
	in <xref target="registration"/> of this document.</t>
</section>

<section title="Security Considerations">
	<t>See the Security Considerations item in the registration template in <xref target="registration"/>, above.</t>
</section>

<section title="Acknowledgments">
	<t>To LTS, thanks for everything.</t>
	<t>The author would also like to thank all of the folks at xml.resource.org for providing many of the tools used for preparing RFCs and Internet drafts.</t>
	<t>A word of thanks to all IETF members that provided feedback on this document.</t>
</section>

</middle>
<back>

<!-- references split to informative and normative -->
<references title="Normative References">

<reference anchor='RFC2119'>

<front>
<title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='Scott Bradner'>
<organization>Harvard University</organization>
<address>
<postal>
<street>1350 Mass. Ave.</street>
<street>Cambridge</street>
<street>MA 02138</street></postal>
<phone>- +1 617 495 3864</phone>
<email>sob@harvard.edu</email></address></author>
<date year='1997' month='March' />
<area>General</area>
<keyword>keyword</keyword>
<abstract>
<t>
   In many standards track documents several words are used to signify
   the requirements in the specification.  These words are often
   capitalized.  This document defines these words as they should be
   interpreted in IETF documents.  Authors who follow these guidelines
   should incorporate this phrase near the beginning of their document:

<list>
<t>
      The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
      NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in
      RFC 2119.
</t></list></t>
<t>
   Note that the force of these words is modified by the requirement
   level of the document in which they are used.
</t></abstract></front>

<seriesInfo name='BCP' value='14' />
<seriesInfo name='RFC' value='2119' />
<format type='TXT' octets='4723' target='http://www.rfc-editor.org/rfc/rfc2119.txt' />
<format type='HTML' octets='17970' target='http://xml.resource.org/public/rfc/html/rfc2119.html' />
<format type='XML' octets='5777' target='http://xml.resource.org/public/rfc/xml/rfc2119.xml' />
</reference>

<reference anchor='RFC6838'>

<front>
<title>Media Type Specifications and Registration Procedures</title>
<author initials='N.' surname='Freed' fullname='N. Freed'>
<organization /></author>
<author initials='J.' surname='Klensin' fullname='J. Klensin'>
<organization /></author>
<author initials='T.' surname='Hansen' fullname='T. Hansen'>
<organization /></author>
<date year='2013' month='January' />
<abstract>
<t>This document defines procedures for the specification and registration of media types for use in HTTP, MIME, and other Internet protocols.  This memo documents an Internet Best Current Practice.</t></abstract></front>

<seriesInfo name='BCP' value='13' />
<seriesInfo name='RFC' value='6838' />
<format type='TXT' octets='72942' target='http://www.rfc-editor.org/rfc/rfc6838.txt' />
</reference>

<reference anchor='ISO.9075.2011'>
	<front>
		<title>ISO/IEC 9075:2011, Information Technology - Database Languages -  Structured Query Language (SQL)</title>
		<author>
			<organization>International Organization for Standardization</organization>			
		</author>
		<date year='2011'/>		
	</front>	
</reference>

</references>

<section anchor="status" title="Status of This Document [To Be Removed Upon Publication]">
	<section title="Discussion Venue">
	<t>Discussion about this document should be directed to IANA's media-types mailing list <eref target="https://www.ietf.org/mailman/listinfo/media-types"/>
	which is also reachable via <eref target="media-types@iana.org"/>. Of course, comments directly to the author are
	always welcome.
	</t>
	</section>
</section>
</back>

</rfc>



