Mattia,

I NEVER said I was a "master of relational databases", or anything like
that. The power of indexing is apparent, even to amateurs! Databases do
not reduce complexities. They actually increase it somewhat, BUT they
take advantage of organization, to reduce the time for queries. I said
"this was a database problem", because the OP said he wanted to query a
database, and for NO other reason.

I said I've setup and managed two databases, and coded my own programs
that worked with both of them, regularly.
Just read the manuals that came with the databases (they were
expensive!), and I learned quite a bit.

I've also worked in Real Estate, and used the listing service database,
many times.

When you say: "if you sum the time required to build indicies, and the
time required to solve the problem you will NEVER, repeat NEVER,
require less time that(n), using the old lovely algorithmic way, and
this is true for ANY problem".,

YOU ARE PERFECTLY CORRECT - BUT ONLY FOR THE  ** FIRST ** indexing of
the record. After the record has been properly indexed, the queries are
MUCH FASTER than ANY algorithmic solution - because in a sense, the
answer is already available - it's "precomputed", almost.

It's like you, trying to algorithmically solve for 100,000 places, all
the integers approximating Pi. You have a "lovely, fast" algorithm. But
the database has the numbers ALREADY IN A database, and just has to
look them up. It wins EASILY.

That's what a database is all about. Yes, it takes some time to index
the records, and fields, but once that's done, your queries are MUCH
FASTER than anything else.

This:
-----------------------------------------
Given a number of cities and the costs of traveling from any city to
any other
city, what is the cheapest round-trip route that visits each city once
and then
returns to the starting city?
-----------------------------------------

is not a query for a database.  To get this info, you'd have to make a
very sophisticated query, possibly using the databases own language,
which would then generate and execute the multiple queries needed to
get this answer for you.

Databases don't usually answer such sophisticated questions. They
answer simple queries like "What's the cheapest airline ticket to Tokyo
leaving on Wednesday evenings, between 6 and 9 p.m.?"

They aren't problem solvers, they just provide data, on demand, very
efficiently, usually to a great many user's.
Again, databases do NOT reduce complexity. They reduce the amount of
time needed to find data, AFTER that data has been indexed, etc.. NOT
BEFORE!

I would never call you a "mad" anything, except in rhetorical jest.

Sounds like a breakthrough here -
  "So that, if you say: "with a database and indices you can solve the
problem 
   in a faster way", ok, I can agree ... "

Adak


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to