[PD-dev] Fwd: Fwd: Fwd: Connecting up an SQL Database to PD

Mike McGonagle mjmogo at gmail.com
Tue Nov 13 19:06:25 CET 2007


On 11/13/07, Frank Barknecht <fbar at footils.org> wrote:
> Hallo,
> Jamie Bullock hat gesagt: // Jamie Bullock wrote:
>
> > > I would think that making it such that it acted like 'textfile', that
> > > with each bang sent to the sql object, that it would return each
> > > subsequent row, and once the end of that set is reached, it would
> > > output a bang on a second outlet, similar to what 'textfile' does.
> > >
> >
> > Good idea! I'll add that too.
>
> Actually I thought about this, too, but I'm not sure if it's really
> useful. One of the strengths of SQL is, that you can limit the result
> set manually. So if I'd want one row at a time, I'd design my SQL
> query as such using LIMIT, and if I want more rows, I'd just use a
> different LIMIT clause. Hardcoding this into the SQL class in my view
> doesn't make much sense. (Using the last outlet to signal the end of
> results like in [textfile] does make sense, though.)

Frank, this isn't hardcoding anything into the external. Any select
query on a database has the potential of returning a single row, or a
billion. The point of this is that each row contains a different set
of data, and the PD program would process them sequentially. Getting
all the rows at once would be very cumbersome programming in sorting
out the data. Being able to process each row by itself is a little bit
less daunting. Also, if you only get one row at a time from the
database, that would be a LOT of querying, and the amount of time for
each query might slow the system quite a bit.

Mike


>
> Ciao
> --
>  Frank Barknecht                                     _ ______footils.org__
>
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
>


-- 
Help the Environment, Plant a Bush back in Texas!

"I place economy among the first and most important republican
virtues, and public debt as the greatest of the dangers to be feared.
To preserve our independence, we must not let our rulers load us with
perpetual debt."
-- Thomas Jefferson, third US president, architect and author (1743-1826)

"Give Peace a Chance" -- John Lennon (9 October 1940 – 8 December 1980)

Peace may sound simple—one beautiful word— but it requires everything
we have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician

If you think you can, or you think you can't, you are probably right.
—Mark Twain

"Art may imitate life, but life imitates TV."
Ani DiFranco




More information about the Pd-dev mailing list