Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 May 2007 22:13:58 -0700
From:      Garrett Cooper <youshi10@u.washington.edu>
To:        Ivan Voras <ivoras@fer.hr>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: SQL in the base system
Message-ID:  <4647F016.1070200@u.washington.edu>
In-Reply-To: <f227fu$m1l$1@sea.gmane.org>
References:  <200705102105.27271.blackdragon@highveldmail.co.za>	<f20c8u$htp$1@sea.gmane.org>	<4643C7DB.6000408@elischer.org>	<f219f6$3ls$1@sea.gmane.org>	<17988.35412.231093.411177@bhuda.mired.org>	<f223ji$7si$1@sea.gmane.org>	<17988.40311.210855.381093@bhuda.mired.org> <f227fu$m1l$1@sea.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Ivan Voras wrote:
> Mike Meyer wrote:
> 
>> Yes, they are present no matter what representation you use. The
>> question is - how do the answers change if you change the
>> format. These days, cross-platform means you deal with length as well
>> as endian issues. Or maybe you don't, depending on the db.  I know the
>> answers for text files (easy, easy, very, yes). Can you propose a db
>> scheme that gets has the same answers?
> 
> I think I don't understand the question. If the database contains number 
> "42" in a field typed "int32", in a row, and handles endianess well, why 
> would I get a different number on different platforms?
> 
> (A side note about sqlite: it's actually weakly typed - you store and 
> receive strings).
> 
>> I hate to tell you this, but your XML solution would still consist of
>> a bunch of one-of file formats for each and every purpose. Using XML
>> just fixes the syntax for the file, not the semantics. Settling on XML
>> (or JSON, or INI, or cap files, or ...) is sort of like settling on
>> UTF, only less obviously a win. Sure, you get to use canned code that
>> will turn you text file into a structure in memory. But you still have
>> to figure out what it all means.
>>
>> As you say, the XML toolset is the real win. Smart editors,
>> validators, schemas (which make the editors and validators even more
>> powerful) are all good things. Most people don't really seem
>> interested in this beyond editors. That's not really much of a win.
> 
> I agree that validation in XML is a strong point - but one of the reason 
> people like text files is that they DON'T usually have validation 
> features :)
> 
>      |        pro                     |           contra
> ----------------------------------------------------------------------
>  XML |   standard tools, validation,  | evil manual parsing, bad rep
>      |   can embed multiple data      |
>      |   structures in a standard way |
> ----------------------------------------------------------------------
> text |   standard tools, sometimes    | no validation, manual parsing,
>      |   human readable               | usually one data structure per
>      |                                | file
> 
> 

I assume that many Database formats have functionality to convert to 
'system independent' endianized fields when flushing the database to 
disk. That's what BDB does at least (I think that the endianness used is 
little endian).

-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4647F016.1070200>