<?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-02.txt">

<front>
	<title abbrev="The application/sql Media Type">The application/sql Media Type</title>
	<author fullname="Yakov Shafranovich" initials="Y." surname="Shafranovich">
		<organization>Shaftek Enteprises LLC</organization>
		<address>			
			<email>ietf@shaftek.org</email>
			<uri>http://www.shaftek.org</uri>
		</address>
	</author>
	<date month="December" year="2012"/>
	<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 anchor="registration" title="Media Type Registration Application">
	<t>This section provides the media type registration application which will be submitted to IANA after IESG 
	approval of this document.</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, US-ASCII should be assumed.</t>
			<t>Implementators should note that as per section 4.2.4, part 2 of <xref target="ISO.9075.2011"/>,
			all SQL implementations are required to support US-ASCII, ISO-8859-1, UTF-8, UTF-16 and UTF-32 encodings. Those should be the only
			valid values for the charset parameter unless some other agreement exists between the parties.</t>
			<t>When using <xref target="Unicode"/>, the <xref target="ISO.9075.2011"/> standard dictates a preference of UTF-8
			over UTF-16, and UTF-16 over UTF-32.</t>
		</list>
	</t>
	<t>Encoding considerations:charset
		<list style="empty">	
			<t>When no character set is specified via the "charset" parameter or US-ASCII is specified, 7bit encoding is used.
			When other character sets are used, 8bit or 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,
				it may be 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>
		</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>Additional information:
		<list style="empty">
			<t>Magic number(s): N/A</t>
			<t>File extension(s): sql</t>
			<t>Macintosh File Type Code(s): TEXT</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/Change controller: IESG</t>
</section>

<section title="IANA Considerations">
	<t>After IESG approval, IANA is expected to register the MIME type application/sql using the application provided
	in <xref target="registration"/> of this document.</t>
</section>

<section title="Security Considerations">
	<t>See discussion 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 members of the IANA's media-types list that provided feedback on this document.</t>
</section>

</middle>
<back>

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

<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>

<reference anchor='Unicode'>
	<front>
		<title>The Unicode Standard, Version 6.2.0</title>
		<author>
			<organization>The Unicode Consortium</organization>			
		</author>
		<date year='2012'/>
	</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>



