2 ms·
Have you heard about filters? That's what they exactly do, narrow your choices according to specific circumstances. You get the list of object that fits the
by ardit33 19y ago
Have you heard about filters? That's what they exactly do, narrow your choices according to specific circumstances. You get the list of object that fits the exact pattern of a filter (or multiple filters), and you are done (ok. maybe in java you have to cast the object).
But that's it.
Tables and SQL are old concepts which haven't evolved thru time.
If SQL was so great, why in the heck there is so many ORM frameworks out there? Is it b/c people are stupid, or maybe b/c there is actually a need to just have a Object Oriented Database.
- nostrademons 19y agoYeah, list comprehensions are isomorphic to query languages. There's at least one database (Mnesia) and three database abstraction libraries (HaskellDB, SchemeQL, SQLAlchemy) that exploit this. That does not mean that databases are useless. Your [(customer.name, customer.phone) for customer in customers for sale in sales if sale.customer_id = customer.customer_id and sale.product_id in defective_product_list and sale.date.month in (10, 11, 12) and customer.lifetime_sales > 10000 and customer.state in ('CA', 'WA', 'OR')] isn't going to help much if you have thousands of customers and millions of sales.
- edw519 19y agoThe examples I cited are real. (When you're in the trenches, you don't need to make them up.) The database has 1,692,438 Customers and 7,823,356 Sales Orders. All 4 questions had subsecond response. But not using a single SQL statement as you suggest. Using a combination of resources: indexes, stored procedures, common functions, and other code, applied exactly as needed. And a RDBMS. Remember, this is a discussion of relational databases, not SQL. 2 different issues.
- dfranke 19y agoHaskellDB would be so awesome if it actually worked. Every time I've tried to use it, though, the backend has choked on some piece of the generated SQL.
- nostrademons 19y agoWhen I tried it, I didn't even get to that point. It choked on installation; I couldn't get it working with MySQL, then I tried with PostGres and it couldn't find pg_config or something silly like that, then I gave up. (In hindsight, I was probably just missing the dev headers or something.) That was early 2005, though. It may be better now.
- dfranke 19y agoMy experience is from last April.
- jimbokun 19y ago"If SQL was so great, why in the heck there is so many ORM frameworks out there?" Uh, isn't that an argument FOR the popularity of relational DBs? There would be no need for ORM tools if there weren't lots of R databases that programmers need to interface with. To turn your rhetorical question around "Why haven't OO databases become popular if that's what so many people really need?"
- ardit33 19y agoMaybe b/c there haven't been any good attempts at it, and the major players (oracle) don't have incentives to build such systems. Getting OOD Right, would be a huge task. Why do invest on it, when you are already making lots of money on the current offering?
- Goladus 19y agoWhy haven't OO databases become popular if that's what so many people really need? XML, while not necessarily 'object-oriented' is hierarchical, not relational. It's becoming very popular.
- Tichy 19y agoHow do these filters work efficiently on a HashTable? And most ORM frameworks I know come with a SQL-like query language. How else would you formulate complicated queries?