h a l f b a k e r yPoint of hors d'oevre
add, search, annotate, link, view, overview, recent, by name, random
news, help, about, links, report a problem
browse anonymously,
or get an account
and write.
register,
|
|
|
A normal SQL query says, politely, "show me these columns from these tables meeting these criteria."
I propose an extension to SQL, by which you can say, less politely, "I know there's something in this database somewhere about, say 'Tono-Bungay'. No, I don't know which table; the contractor who
created the schema (using vowel-free abbreviations of the original Serbo-Croat) left three years ago without doco. Yes, I've got all night if necessary. You tell me which table(s) and columns(s)."
This can already be done in a roundabout way if you write a script which queries the tables where the schema is defined, creates a list of all the text columns and then runs SELECT statements against them ad nauseam. I'm just proposing that SQL itself should support it directly. I'm imagining something along the lines of
EXTRACTBRUTE <search-string> {output-spec}
{output-spec} ::= TABLENAME | COLUMNNAME | PKVALUES
This would be helpful for stalkers, hackers, reverse-engineers and Business Intelligence consultants.
Please log in.
If you're not logged in,
you can see what this page
looks like, but you will
not be able to add anything.
Annotation:
|
|
"get 99% of programmers to reinvent exactly the same things" 2.0 |
|
|
Errm... you've got me there, [Toaster]; ALL WHAT? |
|
|
umm... thought there might be an "ALL" parameter for table-name. (don't recall) or * wildcard. |
|
|
You can use '*' in the SELECT clause, but not, I think, in the WHERE clause. As for ALL, perhaps you're thinking of the family of Oracle views such as ALL_TABLES, ALL_TAB_COLUMNS, etc.; these are, of course, very useful, but querying them tells you nothing about what's *in* the tables and columns. |
|
|
Most systems have a dump facility what prepares a plaintext export of the whole database. Dump -> Search -> Backward-search to table definition line -> Backward-search to database definition line |
|
|
Visual Studio auto-completes names which does improve the situation somewhat. |
|
|
//Most systems have a dump facility// |
|
|
Well, yes, and you could also use such a dump for implementing ordinary SELECT statements, but I'd rather not. |
|
| |