Bug 3178 - SQLite mime type
Summary: SQLite mime type
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: All All
: high normal
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-02 09:59 UTC by jstaniek
Modified: 2005-10-29 11:08 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description jstaniek 2005-05-02 09:59:09 UTC
Index: freedesktop.org.xml.in
===================================================================
RCS file: /cvs/mime/shared-mime-info/freedesktop.org.xml.in,v
retrieving revision 1.63
diff -u -p -r1.63 freedesktop.org.xml.in
--- freedesktop.org.xml.in	16 Apr 2005 23:55:24 -0000	1.63
+++ freedesktop.org.xml.in	2 May 2005 16:56:01 -0000
@@ -1407,6 +1413,13 @@ command to generate the output files.
     <glob pattern="*.sms"/>
     <glob pattern="*.gg"/>
   </mime-type>
+  <mime-type type="application/x-sqlite">
+    <_comment>SQLite Database</_comment>
+    <magic>
+      <match type="string" value="** This file contains an SQLite" offset="0"/>
+      <match type="string" value="SQLite format 3" offset="0"/>
+    </magic>
+  </mime-type>
   <mime-type type="application/x-stuffit">
     <_comment>Macintosh StuffIt archive</_comment>
     <magic priority="50">
Comment 1 jstaniek 2005-05-02 10:01:16 UTC
Except general application/x-sqlite, KDE is going to have application/x-sqlite2
and application/x-sqlite3 to distinguish versions. Is this acceptable to add
these fd.org as well?
Comment 2 Christophe Fergeau 2005-05-02 11:51:46 UTC
It's probably acceptable, but I'm wondering if it's that useful to make the
difference between v2 and v3 sqlite files. Aren't there incompatibility in the
file format between minor releases too ?
Comment 3 jstaniek 2005-05-02 14:43:32 UTC
There are have plans to use SQLite 3.1 too (thus application/x-sqlite3-1 or so)
on KDE. AFAIK, SQLite creators try their best to avoid introducing
incompatibilities. Recent change (3.1) is because of important ALTER TABLE
stuff, incompatibilities were inavoidable. 
After SQLite3.1 I wouldn't expect there will be incompatibilities appearing
every month.

If two (or even three) mime types can be added, I am predicting this can improve
interoperability on free desktops, as more and more apps and libs are being
developed on top of SQLite.

Comment 4 Christophe Fergeau 2005-05-03 00:21:03 UTC
Sorry, I had in mind db2/db3 in mind when I talked about incompatible changes
being done every releases, I guess having separate mime types for the various
sqllite versions is ok.
Comment 5 Christian - Manny Calavera - Neumair 2005-10-29 11:52:42 UTC
Thanks for your bug report and sorry for the late response!
What is the typical file extension of SQLite files?
Comment 6 jstaniek 2005-10-29 12:10:28 UTC
There's no such defined for SQLite. Developers often treat SQLite as an
intermediate tool for implementing relational database, and thus we could look
at SQLite files in the same way as we're looking at files without any concrete
filename extensions. Quite similar as with ascii text files on unix (e.g.
INSTALL, README files).

So, I think Choosing any extenstion here could only add some confusion. 

SQLite file format can be considered as an subformat. Applications utilizing
sqlite format are defining their own stuctures within it, so look at all this as
text file versus xml file : the latter is still valid text file.

Hope this helped
Comment 7 Christian - Manny Calavera - Neumair 2005-10-29 12:56:48 UTC
Thanks, fixed in HEAD. With your patch, Nautilus is able to recognize my SQLite
files.
Comment 8 jstaniek 2005-10-29 14:07:48 UTC
As wrote above, there two different SQLite formats. Some apps can support both,
some apps can support only newer or only older. There's no SQLite library that
fully supports both formats. To avoid problems with confusing "not recognized
format" errors, my proposal is to split the type now. Thanks. 

PS1: This is the way how the types are already defined and used in KDE.

PS2: I've mentioned about a mimetype for SQLite 3.1 or newer. I've dropped this
idea: it's impossible to distinguish between any of 3.x versions right now. 

--- freedesktop.org.xml.in.orig	2005-10-29 22:19:40.000000000 +0200
+++ freedesktop.org.xml.in	2005-10-29 23:04:38.000000000 +0200
@@ -173,10 +173,15 @@
     <glob pattern="*.smi"/>
     <glob pattern="*.sml"/>
   </mime-type>
-  <mime-type type="application/x-sqlite">
-    <_comment>SQLite database</_comment>
+  <mime-type type="application/x-sqlite2">
+    <_comment>SQLite2 database</_comment>
     <magic>
       <match type="string" value="** This file contains an SQLite" offset="0"/>
+    </magic>
+  </mime-type>
+  <mime-type type="application/x-sqlite3">
+    <_comment>SQLite3 database</_comment>
+    <magic>
       <match type="string" value="SQLite format 3" offset="0"/>
     </magic>
   </mime-type>
Comment 9 Christian - Manny Calavera - Neumair 2005-10-30 05:08:33 UTC
Thanks, committed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.