Re: [sqlite] Re: Structured or Object-Oriented

2006-04-14 Thread John Stanton

[EMAIL PROTECTED] wrote:

- Original Message -
From: "John Stanton" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, April 15, 2006 12:09 AM
Subject: Re: [sqlite] Re: Structured or Object-Oriented




[EMAIL PROTECTED] wrote:


- Original Message -
From: "John Stanton" <[EMAIL PROTECTED]>
To: 
Sent: Friday, April 14, 2006 1:32 AM
Subject: Re: [sqlite] Re: Structured or Object-Oriented






I was always impressed with Dijkstra's contention that a programmer's
most important quality is a familiarity and skill with mathematics.  The
ability to think in abstract terms and understand the concept of proof
of correctness is certainly more important than learning a certain
methodology and blindly applying it.
JS



I agree with the basic idea except in that it does not really relate to
mathematics as such:
'The ability to think in abstract terms and understand the concept of


proof


of correctness' could be considered a basic principle of philosophy and


by


application of science;
In the 1970's I was studying biology and the most earth shattering
concept/rule that came my way was 'always relate structure to function',


a


principle which 'encapsulates' OOP in five words (or four if you remove


the


'always');
Biology in the evolutionary sense is not concerned with correctness but


with


the 'fittest', that is, that which functions best;
there is no proof, correctness or methodology, only that which works;




There is no correctness in Science, and that certainly applies to
Biology.  The scientific method has no "correct", only hypothesis and
observation.  On the other hand Mathematics, a non-scientific
discipline, has absolute correctness by proof.  "Computer Science" is a
bad term for a discipline which is based on the concepts of Mathematics,
not Science.



I would not myself have excluded Mathematics from the Sciences:
I have always regarded it as the most abstract of the sciences;
Whereas this abstraction is sometimes its strength in relation to computer
science,
it is sometimes its weakness: sometimes programmers are so cocooned in their
abstract internal world they seem often to have difficulty interfacing with
the 'real' world sufficiently to come up with efficient practical solutions
(unable to relate structure to function!);



As you would have discovered from biology, the principles of natural
selection etc do not guarantee good designs, only ones good enough to
survive until driven to extinction by a better combination.



That's my whole point: the 'good' designs are the ones which exist;
Mathematics is also undergoing its own evolution.



For example
the genetic code is not elegantly designed by a mathematician but is
just the first combination which worked adequately.  If the biological
method worked well there would be no disease or genetic defects, just
organisms which lived forever like Euclid's axioms.



The biological method works 'well': disease and genetic 'defects' are
simply aspects in the unfolding of the genetic code. Euclid's axioms
don't exist in the real world, they are human abstractions:
it may be possible to prove that there is a relation between the radius
of a perfect circle and its circumference, but unfortunately the perfect
circle
does not exist, therefore no radius and no circumference.

It's interesting that you use words like 'good', 'better', 'elegant',
'defect', 'correct'
in ways that imply value judgement, where as a biologist I would usually say
more or less functional: you notice that I used Darwin's term 'fit':
I think that programmers should strive for the 'fit' solution;



I would counsel programmers to look to correct designs rather than
pursue the biological approach and be like a monkey running up and down
a keyboard in an attempt to compose a new sonata.



The biological analogy that I proposed was based on the fact that
most biological study is based on the structure/function dichotomy,
and that anybody in computing could benefit from such a simple paradigm;
That you cited the sonata as an example of correct design is interesting,
in that the rules of correct design do serve as tools to composition, though
the
uniqueness of expression in the sonata will often derive from a knowledgable
breaking of those rules: trying to define poetry or music using Euclid would
probably hardly satisfy;
Neuroscientists might differ, though they will have a few books of theorems
to produce yet.

I am not trying to underplay the importance of mathematics, but I suggest
that other disciplines
(in my case biology and general sciences, precision craftsmanship and
design, and musical training)
can also contribute to working in computing.

P.S. If anything its the programmers who resemble a monkey running up and
down
a keyboard in an attempt to compose a new opus (I include myself in that
forlorn brood)

Happy Easter

Kevin

These days they teach the Philosophy of Science, and students get to 
understand why 

Re: [sqlite] How to create a database without sqlite?

2006-04-14 Thread John Stanton

Dan Baker wrote:

I been reading this list for several days, but just started using it today.

I'm using it as an embedded database (on Windows), and want to be able to 
create the initial database from within my app --  meaning, I don't want to 
ship a database file.

What is the recommended method for creating a new database file from within my app? (I 
looked for an SQL statement, but failed to find something like "CREATE DATABASE 
mydb")

I'm thinking of the following solutions:
1) Create a database with a small known table in it via sqlite.exe, and storing that file 
in my app (as a resource), and then copying that file to disk to "create a new 
database".  (Then, I could drop the known small table).

2) Ship the sqlite.exe app, and launch it with the appropriate cmd line 
parameters to create the database.

SQLite looks fantastic!

Comments?
DanB


It is far too easy, just open it and it will be created automatically.


Re: [sqlite] Re: Structured or Object-Oriented

2006-04-14 Thread koneill

- Original Message -
From: "John Stanton" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, April 15, 2006 12:09 AM
Subject: Re: [sqlite] Re: Structured or Object-Oriented


> [EMAIL PROTECTED] wrote:
> > - Original Message -
> > From: "John Stanton" <[EMAIL PROTECTED]>
> > To: 
> > Sent: Friday, April 14, 2006 1:32 AM
> > Subject: Re: [sqlite] Re: Structured or Object-Oriented
> >
> >
> >
> >
> >>I was always impressed with Dijkstra's contention that a programmer's
> >>most important quality is a familiarity and skill with mathematics.  The
> >>ability to think in abstract terms and understand the concept of proof
> >>of correctness is certainly more important than learning a certain
> >>methodology and blindly applying it.
> >>JS
> >
> >
> > I agree with the basic idea except in that it does not really relate to
> > mathematics as such:
> > 'The ability to think in abstract terms and understand the concept of
proof
> > of correctness' could be considered a basic principle of philosophy and
by
> > application of science;
> > In the 1970's I was studying biology and the most earth shattering
> > concept/rule that came my way was 'always relate structure to function',
a
> > principle which 'encapsulates' OOP in five words (or four if you remove
the
> > 'always');
> > Biology in the evolutionary sense is not concerned with correctness but
with
> > the 'fittest', that is, that which functions best;
> > there is no proof, correctness or methodology, only that which works;
> >
> >
> There is no correctness in Science, and that certainly applies to
> Biology.  The scientific method has no "correct", only hypothesis and
> observation.  On the other hand Mathematics, a non-scientific
> discipline, has absolute correctness by proof.  "Computer Science" is a
> bad term for a discipline which is based on the concepts of Mathematics,
> not Science.

I would not myself have excluded Mathematics from the Sciences:
I have always regarded it as the most abstract of the sciences;
Whereas this abstraction is sometimes its strength in relation to computer
science,
it is sometimes its weakness: sometimes programmers are so cocooned in their
abstract internal world they seem often to have difficulty interfacing with
the 'real' world sufficiently to come up with efficient practical solutions
(unable to relate structure to function!);

>
> As you would have discovered from biology, the principles of natural
> selection etc do not guarantee good designs, only ones good enough to
> survive until driven to extinction by a better combination.

That's my whole point: the 'good' designs are the ones which exist;
Mathematics is also undergoing its own evolution.

> For example
> the genetic code is not elegantly designed by a mathematician but is
> just the first combination which worked adequately.  If the biological
> method worked well there would be no disease or genetic defects, just
> organisms which lived forever like Euclid's axioms.

The biological method works 'well': disease and genetic 'defects' are
simply aspects in the unfolding of the genetic code. Euclid's axioms
don't exist in the real world, they are human abstractions:
it may be possible to prove that there is a relation between the radius
of a perfect circle and its circumference, but unfortunately the perfect
circle
does not exist, therefore no radius and no circumference.

It's interesting that you use words like 'good', 'better', 'elegant',
'defect', 'correct'
in ways that imply value judgement, where as a biologist I would usually say
more or less functional: you notice that I used Darwin's term 'fit':
I think that programmers should strive for the 'fit' solution;

>
> I would counsel programmers to look to correct designs rather than
> pursue the biological approach and be like a monkey running up and down
> a keyboard in an attempt to compose a new sonata.

The biological analogy that I proposed was based on the fact that
most biological study is based on the structure/function dichotomy,
and that anybody in computing could benefit from such a simple paradigm;
That you cited the sonata as an example of correct design is interesting,
in that the rules of correct design do serve as tools to composition, though
the
uniqueness of expression in the sonata will often derive from a knowledgable
breaking of those rules: trying to define poetry or music using Euclid would
probably hardly satisfy;
Neuroscientists might differ, though they will have a few books of theorems
to produce yet.

I am not trying to underplay the importance of mathematics, but I suggest
that other disciplines
(in my case biology and general sciences, precision craftsmanship and
design, and musical training)
can also contribute to working in computing.

P.S. If anything its the programmers who resemble a monkey running up and
down
a keyboard in an attempt to compose a new opus (I include myself in that
forlorn brood)

Happy Easter

Kevin


[sqlite] Converting ver 2 to ver 3

2006-04-14 Thread Paul Nash
I have taken the plunge and am converting from ver 2.8.16 to ver 3.

I used the .DUMP method but found a problem. My char/text fields containg 
numbers were output as pure numbers without the quotes, so that on input to ver 
3 they were stored as integer rather than string. This is a kind of bug in 
.DUMP. Maintaining the textedness of values in columns with text affinity in 
ver 2 would ease the move to ver 3.

Regards, Paul Nash


Re: [sqlite] How to create a database without sqlite?

2006-04-14 Thread Nemanja Corlija
On 4/15/06, Dan Baker <[EMAIL PROTECTED]> wrote:
I've just now noticed the "without sqlite" part of subject. Though I'm
a bit confused if you really meant that since you later said that you
want to use it as embedded db.
If that means you really can't/won't link your app against sqlite3.dll
then my previous post is obviously useless. Here goes something more
appropriate for that case.


> I'm thinking of the following solutions:
> 1) Create a database with a small known table in it via sqlite.exe, and 
> storing that file in
> my app (as a resource), and then copying that file to disk to "create a new 
> database".
> (Then, I could drop the known small table).
>
> 2) Ship the sqlite.exe app, and launch it with the appropriate cmd line 
> parameters to
> create the database.
I'd suggest you ship sqlite3.exe and SQL script that will contain all
SQL that is needed to initialize your db. Besides, sqlite3.exe will be
your only option to "interface" with db if sqlite3.dll is not an
option so you need to ship that anyways.

Though I'd strongly recommend reconsidering your approach here. If at
all possible, go with sqlite3.dll and use the API as I've suggested in
my previous post.

--
Nemanja Corlija <[EMAIL PROTECTED]>


Re: [sqlite] How to create a database without sqlite?

2006-04-14 Thread Clay Dowling
Dan Baker wrote:
> I been reading this list for several days, but just started using it today.
> 
> I'm using it as an embedded database (on Windows), and want to be able to 
> create the initial database from within my app --  meaning, I don't want to 
> ship a database file.
> 
> What is the recommended method for creating a new database file from within 
> my app? (I looked for an SQL statement, but failed to find something like 
> "CREATE DATABASE mydb")
> 
> I'm thinking of the following solutions:
> 1) Create a database with a small known table in it via sqlite.exe, and 
> storing that file in my app (as a resource), and then copying that file to 
> disk to "create a new database".  (Then, I could drop the known small table).
> 
> 2) Ship the sqlite.exe app, and launch it with the appropriate cmd line 
> parameters to create the database.
> 
> SQLite looks fantastic!

Nemanja's recommendation is definitely the best.  Microsoft also has
some good resources on doing an initial database installation and
creation if you search on msdn.microsoft.com (install and SQL Server).
While they were speaking in the context of SQL Server, I found that what
they said applied very well to SQLite.

Clay Dowling
-- 
CeaMuS
http://www.ceamus.com
Simple Content Management


Re: [sqlite] How to create a database without sqlite?

2006-04-14 Thread Nemanja Corlija
On 4/15/06, Dan Baker <[EMAIL PROTECTED]> wrote:
> What is the recommended method for creating a new database file from within 
> my app? (I
> looked for an SQL statement, but failed to find something like "CREATE 
> DATABASE mydb")
Look up the sqlite3_open() in API docs. All you need to do to create
the db file is to call sqlite3_open() passing it desired filename of
your db. SQLite will create the file for you as soon as you create
some tables via CREATE TABLE statement.
There's also sqlite3_open16() that takes UTF16 encoded filename.

See http://www.sqlite.org/capi3ref.html#sqlite3_open

--
Nemanja Corlija <[EMAIL PROTECTED]>


[sqlite] How to create a database without sqlite?

2006-04-14 Thread Dan Baker
I been reading this list for several days, but just started using it today.

I'm using it as an embedded database (on Windows), and want to be able to 
create the initial database from within my app --  meaning, I don't want to 
ship a database file.

What is the recommended method for creating a new database file from within my 
app? (I looked for an SQL statement, but failed to find something like "CREATE 
DATABASE mydb")

I'm thinking of the following solutions:
1) Create a database with a small known table in it via sqlite.exe, and storing 
that file in my app (as a resource), and then copying that file to disk to 
"create a new database".  (Then, I could drop the known small table).

2) Ship the sqlite.exe app, and launch it with the appropriate cmd line 
parameters to create the database.

SQLite looks fantastic!

Comments?
DanB


Re: [sqlite] SQLite3 command line utility crashes on MacOS X

2006-04-14 Thread Thomas Chust

On Fri, 14 Apr 2006, Will Leshner wrote:


On 4/14/06, Thomas Chust <[EMAIL PROTECTED]> wrote:


I just downloaded the 3.3.5 distribution tarball and confirmed that the
problem occurs with a binary built from that codebase as well.


I assume you guys are refering to the tip, right. If I download the
"stable" 3.3.5 distribution and build that on 10.4.6, it runs and
exits just fine.


Hello,

I referred to the usual stable release tarball found on the SQLite3 
webpage.


But I just figured out that the problem apparently had not much to do with 
SQLite3 itself. A debugger session showed that the segfault occurred in 
the command history library at the point where the history was saved. I 
found nothing unusual about my history file, but after deleting it 
everything was back to normal.


So never mind all the noise and thank you for occupying yourself with the 
problem and trying to help.


cu,
Thomas


Re: [sqlite] Re: Structured or Object-Oriented

2006-04-14 Thread John Stanton

Aaron Jones wrote:

Well John, I'm crap at both Maths and Programming so you're probably
right!!! lol

Aaron.

On 14/04/06, John Stanton <[EMAIL PROTECTED]> wrote:


Robert Simpson wrote:


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]




You should design your interface using whatever design method
you are most comfortable with.  Or (better) just design your
interface using creativity and good sense and don't worry so
much about rigidly defined design methods.



I had a little chuckle at this.  I was reminded of the old PBS painting
shows on TV that I used to watch.  The artist would make "happy little
trees" and flit about the canvas.  His little dabs and whips of the
paintbrush would transform into a wooded glade, a rushing river,


mountains


with the sun dancing off the edges ...

Of course, when I tried to do the same thing, it turned out like brown
blobs.  When your hand automatically knows how to turn, and the brushes


are


so familiar you know which one you have just by the feel of it, then you


can


paint with the freedom seen on the TV shows.  Until then, you'll just


make


brown blobs.

It's the same with programming and programming languages, really.  All


the


books you read and courses you take in college are just there to help


you


get familiar with the brushes and the canvas.  They'll help keep you


from


making brown blobs, but you'll never make a masterpiece by the book.

Robert




I was always impressed with Dijkstra's contention that a programmer's
most important quality is a familiarity and skill with mathematics.  The
ability to think in abstract terms and understand the concept of proof
of correctness is certainly more important than learning a certain
methodology and blindly applying it.
JS




Persevere with your Math.  My daughter had her Masters in Math by the 
age of 18 and when given some programming to do was intuituve and 
immediately productive, not needing to learn languages and methods.  I 
attribute that to having been imprinted with the necessary intellectual 
discipline at an early age.


Re: [sqlite] Re: Structured or Object-Oriented

2006-04-14 Thread John Stanton

[EMAIL PROTECTED] wrote:

- Original Message -
From: "John Stanton" <[EMAIL PROTECTED]>
To: 
Sent: Friday, April 14, 2006 1:32 AM
Subject: Re: [sqlite] Re: Structured or Object-Oriented





I was always impressed with Dijkstra's contention that a programmer's
most important quality is a familiarity and skill with mathematics.  The
ability to think in abstract terms and understand the concept of proof
of correctness is certainly more important than learning a certain
methodology and blindly applying it.
JS



I agree with the basic idea except in that it does not really relate to
mathematics as such:
'The ability to think in abstract terms and understand the concept of proof
of correctness' could be considered a basic principle of philosophy and by
application of science;
In the 1970's I was studying biology and the most earth shattering
concept/rule that came my way was 'always relate structure to function', a
principle which 'encapsulates' OOP in five words (or four if you remove the
'always');
Biology in the evolutionary sense is not concerned with correctness but with
the 'fittest', that is, that which functions best;
there is no proof, correctness or methodology, only that which works;


There is no correctness in Science, and that certainly applies to 
Biology.  The scientific method has no "correct", only hypothesis and 
observation.  On the other hand Mathematics, a non-scientific 
discipline, has absolute correctness by proof.  "Computer Science" is a 
bad term for a discipline which is based on the concepts of Mathematics, 
not Science.


As you would have discovered from biology, the principles of natural 
selection etc do not guarantee good designs, only ones good enough to 
survive until driven to extinction by a better combination.  For example 
the genetic code is not elegantly designed by a mathematician but is 
just the first combination which worked adequately.  If the biological 
method worked well there would be no disease or genetic defects, just 
organisms which lived forever like Euclid's axioms.


I would counsel programmers to look to correct designs rather than 
pursue the biological approach and be like a monkey running up and down 
a keyboard in an attempt to compose a new sonata.


Re: [sqlite] SQLite3 command line utility crashes on MacOS X

2006-04-14 Thread Will Leshner
On 4/14/06, Thomas Chust <[EMAIL PROTECTED]> wrote:

> I just downloaded the 3.3.5 distribution tarball and confirmed that the
> problem occurs with a binary built from that codebase as well.

I assume you guys are refering to the tip, right. If I download the
"stable" 3.3.5 distribution and build that on 10.4.6, it runs and
exits just fine.


Re: [sqlite] SQLite3 command line utility crashes on MacOS X

2006-04-14 Thread Thomas Chust

On Fri, 14 Apr 2006, ThomasChust wrote:

[...] I'm using the current CVS version of SQLite 3.3.5 on MacOS X and 
since a few days (unfortunately I don't remember the exact time of the 
change in the CVS tree that caused it) the sqlite3 command line program 
always segfaults upon exit [...]


Hello,

I just downloaded the 3.3.5 distribution tarball and confirmed that the 
problem occurs with a binary built from that codebase as well.


By the way, I'm building using powerpc-apple-darwin8-gcc-4.0.1, the 
operating system's version is MacOS X 10.4.6, Darwin Kernel Version 8.6.0 
and the libSystem.B.dylib, which contains the malloc family of functions, 
has version 88.1.5.


cu,
Thomas


[sqlite] SQLite3 command line utility crashes on MacOS X

2006-04-14 Thread Thomas Chust

Hello,

I'm using the current CVS version of SQLite 3.3.5 on MacOS X and since a 
few days (unfortunately I don't remember the exact time of the change in 
the CVS tree that caused it) the sqlite3 command line program always 
segfaults upon exit with a message from the memory allocation libraries 
that something fishy is going on:


$ sqlite3
SQLite version 3.3.5
Enter ".help" for instructions
sqlite> .quit
sqlite3(10229) malloc: *** error for object 0x1806000: incorrect checksum 
for freed object - object was probably modified after being freed, break 
at szone_error to debug

sqlite3(10229) malloc: *** set a breakpoint in szone_error to debug
Segmentation fault

This is probably not a critical bug because it does not affect other 
applications linked to the sqlite3 libraries and only occurs upon exit 
from the sqlite3 command line tool, but I still wanted to ask if somebody 
else has experienced this behaviour as well and maybe knows a fix it.


Any suggestions are appreciated.

cu,
Thomas


Re: [sqlite] Structured or Object-Oriented?

2006-04-14 Thread koneill

>- Original Message -
>From: "Aaron Jones" <[EMAIL PROTECTED]>
>To: 
>Sent: Friday, April 14, 2006 12:05 PM
>Subject: Re: [sqlite] Structured or Object-Oriented?
>

>Hi John, I fully understand, and if It wasn't for my final degree I would
>simply just go with the flow, but I have to choose a method and justify why
>I chose it, which is doing my headin at the moment. lol
>
>Thanks for your comments.
>
>Aaron.

The arguments for using OOP could be high modularity, encapsulation of
SQLite database functionality, multiple instances and heredity, association
of data with its related methods, the fact that the language and platform
you are using (C# and DotNet no?) is already strongly OO.
As I understand it, structured programming does not actually exclude OO:
maybe your tutor is putting you under test to make sure you have a good
grasp of the fundamentals;
The nice thing about OOP is that you can make it self commenting:

If DatabaseIsConnected
  then
OpenMainModule
  else
 TellUserDatabaseIsDown;
CloseProgram;
(Pseudocode)

The four methods (DatabaseIsConnected, OpenMainModule,
TellUserDatabaseIsDown, CloseProgram)
can then be reduced in their internals to the same type of structure (in its
way a form of structural or at least procedural programming);
In your situation I would have a real blitz on OOP: it's not just theory, it
will be extremely useful in the real world (many of the worst problems I
have seen in my recent collaborations would have been avoided with prior
rigorous application of OO from their beginnings: someone with a good grasp
of OO would simply not create certain structures);





Re: [sqlite] How to verify sqlite file?

2006-04-14 Thread Jens Miltner


Am 14.4.06 um 04:30 schrieb Charlie Li:

Is there any way to verify a file is sqlite3 file? When I tried to  
open  a non-sqlite file by  sqlite_open(), the system crash. I  
checked  the source codes and found no file type checking.  The  
final trace  is toward to page.c file.  How to  revise code to  
make   sqlite more reliable.


But sqlite does some checking, IIRC - there's a header in each sqlite  
database file which is even human readable. Take a look at your  
sqlite files with a hexeditor and you'll see that the first bytes are  
"SQLite format 3"...
IIRC, there's even code in sqlite3 that checks for this sequence. (I  
assume that sqlite2 did have a similar yet distinctive header)...





Re: [sqlite] Re: Structured or Object-Oriented

2006-04-14 Thread Aaron Jones
Well John, I'm crap at both Maths and Programming so you're probably
right!!! lol

Aaron.

On 14/04/06, John Stanton <[EMAIL PROTECTED]> wrote:
>
> Robert Simpson wrote:
> >>-Original Message-
> >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >
> >
> >>You should design your interface using whatever design method
> >>you are most comfortable with.  Or (better) just design your
> >>interface using creativity and good sense and don't worry so
> >>much about rigidly defined design methods.
> >
> >
> > I had a little chuckle at this.  I was reminded of the old PBS painting
> > shows on TV that I used to watch.  The artist would make "happy little
> > trees" and flit about the canvas.  His little dabs and whips of the
> > paintbrush would transform into a wooded glade, a rushing river,
> mountains
> > with the sun dancing off the edges ...
> >
> > Of course, when I tried to do the same thing, it turned out like brown
> > blobs.  When your hand automatically knows how to turn, and the brushes
> are
> > so familiar you know which one you have just by the feel of it, then you
> can
> > paint with the freedom seen on the TV shows.  Until then, you'll just
> make
> > brown blobs.
> >
> > It's the same with programming and programming languages, really.  All
> the
> > books you read and courses you take in college are just there to help
> you
> > get familiar with the brushes and the canvas.  They'll help keep you
> from
> > making brown blobs, but you'll never make a masterpiece by the book.
> >
> > Robert
> >
> >
> I was always impressed with Dijkstra's contention that a programmer's
> most important quality is a familiarity and skill with mathematics.  The
> ability to think in abstract terms and understand the concept of proof
> of correctness is certainly more important than learning a certain
> methodology and blindly applying it.
> JS
>


Re: [sqlite] Structured or Object-Oriented?

2006-04-14 Thread Aaron Jones
Hi John, I fully understand, and if It wasn't for my final degree I would
simply just go with the flow, but I have to choose a method and justify why
I chose it, which is doing my headin at the moment. lol

Thanks for your comments.

Aaron.

On 14/04/06, John Stanton <[EMAIL PROTECTED]> wrote:
>
> Aaron, your question indicates that you need to read a bit more deeply
> in general CS theory as a prelude to your project.  Sqlite is basically
> a simplified implementation of basic SQL, and is a just library of
> functions, not an entity.  With it you can build to your chosen model.
>
> Think of looking at a pile of bricks and asking whether they are modern,
> post-modern or baroque architecture.  They are any or none of them,
> strictly depending upon the ideas of the architect.
> JS
>
> Aaron Jones wrote:
> > Hi Fred, when John replied and stated that he was not sure is SQLite was
> > Structure or OO, I was just waiting for other people to reply also to
> > confirm this, I do not have any beef with anyone.  Sorry if it came
> accross
> > this way.
> >
> > Aaron
> >
> > On 13/04/06, Fred Williams <[EMAIL PROTECTED]> wrote:
> >
> >>It would appear the first responder gave you your answer.  So where's
> >>the beef?
> >>
> >>If you don't like the answer, don't complain to us about service :-)
> >>
> >>Fred
> >>
> >>
> >>>-Original Message-
> >>>From: Jay Sprenkle [mailto:[EMAIL PROTECTED]
> >>>Sent: Thursday, April 13, 2006 8:20 AM
> >>>To: sqlite-users@sqlite.org
> >>>Subject: Re: [sqlite] Structured or Object-Oriented?
> >>>
> >>>
> >>>On 4/13/06, Aaron Jones <[EMAIL PROTECTED]> wrote:
> >>>
> How come you all reply to other peoples emails but only 1
> >>>
> >>>person relied to
> >>>
> mine?
> >>>
> >>>I didn't reply because I don't know anything about mono.
> >>>I wouldn't take it personally.
> >>
> >>
> >
>
>


Re: [sqlite] Structured or Object-Oriented?

2006-04-14 Thread Aaron Jones
Hi Kevin,

My Supervisor just wanted to know so that I could use it as a reason in my
justification in choosing a method, it wasn't going to be used as the main
reason, just 1 in a list of reasons as I couldn't base my decision solely on
"I know OO, so I'll choose that".

Your suggestions are really good and sound a lot more interesting that my
project, which is to build a GUI to SQLite for ease of use for new or novice
users, but sadly the project proposal has already been submitted before
Christmas and it is too late to change as the project is due to be finished
on the 2nd May, which I doubt I will finish it by as I am still on the
analysis phase of my project, I can get a 2-3 weeks max extension due to ill
health but still don't think this will be enough time.

Many thanks for your comments.

Aaron.

On 13/04/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I have been doing various experiments in applying OO to databases and
> might
> have a few suggestions to make.
> I would be interested to provoke debate as to how to apply OOP to a
> database
> like SQLite;
>
> I haven't quite understood why your tutor wants to know if the database is
> structured using OO: this would affect how you program the server side of
> the database (not very relevant to SQLite), but the Client side (or user
> interface) can be created using whatever principles you wish;
>
> Oracle has provision for OO, as I understand with a preference for Java
> oriented programming, though the object oriented structure works also in
> PL/SQL (PL/SQL and Java are contentious concerning the direction that
> Oracle
> will be taking for its programming language: some think that ultimately
> Java
> will take over: there is a certain logic in pushing towards using the same
> language for the frontend as you use for the backend);
> I have followed SQLite's evolution with interest (as a Delphi programmer
> now
> moving towards C# and possibly Java), though as I understand it, SQLite
> isn't (yet?) structured towards using objects as part of its internal
> programming language;
> Oracle has the 'package' which internally groups functions and procedures
> together with variable declarations: a good way of applying OOP since it
> favours modularity; Oracle has also the Object Type, the object Table and
> the Object View (the Object Type is analogous to the Class in C++ or Java)
> and all the usual elements of OOP (Inheritance, Encapsulation,
> Polymorphism
> etc.);
> I presume that to apply a similar structure to SQLite, it would require
> the
> development of an outer object-oriented 'shell' which would have the non
> object-oriented SQlite 'motor' at its core: the database 'objects' would
> have to persist in the database in some way (presumably implying that the
> database contains a structure which would create and maintain them);
> Normally Objects on the database side would be part of a database server
> and
> would imply the use of a complex language interpreter on the server side
> (SQLite is not really a server in this sense and has only a simple
> internal
> language: Lite after all!!);
>
> In Delphi, I made a multi tier program, which was object-oriented, using
> COM
> and dbexpress to connect to SQLite :
> when a module was called on the client, instructions were sent to the
> client
> server which then created its data objects dynamically by means of COM
> function calls, opened a session with the database etc
> Another set of instructions from the client executed functions on the
> client
> server which sent the corresponding SQL instructions to the database;
> On the client I created instanced 'Table_Objects', one for each table I
> wanted to use: these had various methods that I inherited from an ancestor
> TableObjectType (insert, update, delete etc): just calling these functions
> with the field values caused the SQL script to be parsed and executed on
> the
> server; any 'stored procedure' type functionality would be done by
> creating
> specific OO structures (in this case using Delphi) on the server side;
> (Obviously the client, server and SQLite modules can be on separate
> computers, though the concept is really for multiple clients)
>
> As far as your project is concerned, you could propose writing an object
> oriented module that could work as the 'client server' part: this would
> dialog with the SQLite database and with all instances of the clients by
> opening an 'SQLite session' for each; a second 'client module' could
> manage
> 'table objects' which encapsulate the stuctures on the database and which
> retrieve user data as required and which update the database by dialoguing
> with the client server; (the end result would be a bit like one of the
> heavyweight RDBMS's like Oracle, except that it would be lightweight and
> it
> would be exclusively object oriented in that there is no need for a second
> 'server side language' like PL/SQL or whatever, since this functionality
> is
> 'compiled in' on the server