1. RE: db vs. db

I'll respond to this thread with a shameless plug for EuSQL :)

> From: Pete Lomax [mailto:petelomax at blueyonder.co.uk]
> >"C. K. Lester" <cklester at yahoo.com> wrote: 

> >What makes Tsunami better than EDS?
> 
> Adding thousands of records and/or having it permanently running on
> the server (eg linked into Apache/whatever). IIRC, It is also a proper
> database system (see below re eds)

I don't know Tsunami, but EuSQL gives you a lot of what you probably need
with a proper DBMS, depending on what you need to do (more below).

> >What makes MySQL or PostgreSQL better than Tsunami or EDS?
> 
> Openness. Any platform, and very nearly all programming languages can
> submit an SQL query string. Theoretically the slowest of all interface
> mechanisms for dumb queries and actually/obviously the fastest of the
> lot for detailed/intelligent queries.

SQL can be a very powerful query language.  You probably want to have a DB
system that supports *some* query language, which raw EDS does not (it
wasn't clear to me the extent of querying options in Tsunami from a quick
look at their web page, and at Euman's wrappers).  Plus the code to EuSQL is
100% Euphoria.

> >What's the best for web serving? I'm hoping to have a 
> >EUPHORIA-driven website soon, and it's also going to be database
> >driven. Will EDS suffice for one hit per second? a billion hits?
> 
> eds will almost certainly be the fastest for small data sets,
> especially if the database engine itself is reloaded for each web hit.
> SQL would probably take 20 seconds to load on my (slow, ancient)
> machine, but is definitely bog-standard [available if not always
> enabled] on almost all web servers. You'd have to check Tsunami
> support yourself.

The answer depends on the data and the type of queries you expect to be
doing.  A cgi program using EuSQL should load pretty quickly, and EuSQL's
speed on SELECT queries has greatly improved with the latest release
(v0.74).  Compiling might improve things even more.  An advantage of EuSQL
over Tsunami is that it isn't tied to Windows (IIRC, you're trying to use
FreeBSD).  

With any database system (at least when using some form of SQL) it's
important to have good database design.  For example, strict normalization
may help prevent some types of errors (duplicating data, not properly
updating all instances, etc), but will also lead to slower access times.
Also, indexing the proper fields (based on what you expect to query) and
optimizing the queries themselves can lead to dramatic performance
improvements.

Alternatively, if you're using windows, you could probably use MS Access
through ADO (using my EuCOM library :), or any number of databases through
ODBC.

All that said, I think you'll have to test things with your data and your
system to find out what's acceptable to you.

> >What's the best (if anything) for small-app, not-web-related, data
> >management?
> 
> there is a much shallower learning curve on eds for simple databases;
> however bear in mind that you cannot specify multiple indexes or any
> dbms-understood relationships within your data; they all have to be
> coded by hand. EDS keys and data also are totally unnamed which is
> initially easier but later on will dump that responsibility right back
> on the programmer.

EuSQL helps out here, too.  The learning curve is a little tougher (unless
you're already familiar with SQL), but you really can gain a lot of power.
It uses defined fields (both names and datatypes), supports compound fields
and creates and maintains indices on fields (assuming you use its api,
rather than raw EDS).  Compound fields take advantage of the nature of
sequences to nest fields within fields, using dot notation, and giving it a
sort of OO look and feel.  This also means that you can have compound
primary keys.

You may not need to use all the functionality of EuSQL for a small app, but
I find that I rarely use EDS without EuSQL, since named fields are a great
convenience to me, and data retrieval is often much simpler (since I don't
have to reinvent the wheel each time).  It really depends on the structure
of your data.  For some purposes, you might find that using a simple text
file does what you need, a la an INI file.  My favorite is Mike's
(vulcan at win.co.nz) ini.e, as someone else recently mentioned.

You might also want to check out my Euphoria Database Browser (which also
requires the wxEuphoria DLL: http://wxeuphoria.sourceforge.net).  Currently,
this is a windows only app (until I get the Linux version of wxEuphoria
caught up).  It's great for building, looking at, testing, querying and
modifying both regular EDS databases and EuSQL databases.  It's not yet
quite as robust I'd like it to be, so I'd recommend backing up your data.

EuSQL is far from complete, however, and might not have a feature that you
really really need (like doing math inside a query--plus there are probably
some undiscovered bugs lurking).  If that's the case, I'd like to hear about
it.  I tend to work on one project at a time (I've got several 'major'
projects currently), and user requests tend to make me a lot more interested
and likely to work on a particular project.  Also, I'm happy to help out
with designing an using a db using EuSQL (or with using any of my other
libraries :).

You can get the latest release of EuSQL at:
http://www14.brinkster.com/matthewlewis/projects.html

Matt Lewis

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu