The Practical SQL Handbook: Using SQL Variants (4th ed.) 227
The Practical SQL Handbook, 4th Edition, SQL Variant | |
author | Judith S. Bowman, Sandra L. Emerson, Marcy Darnovsky |
pages | 512 |
publisher | Addison Wesley |
rating | 9 |
reviewer | chrisd |
ISBN | 0201703092 |
summary | An indispensable introduction to SQL. |
The books introductory text on SQL is clear and concise. I also found its treatment of normalization to be as close to perfect as can be with one exception: It doesn't tell when you can go too far with normalization. In an introductory text this is acceptable, and perhaps wise considering what many new to relational databases consider acceptable database design.
And while the introductory chapter is great, the chapters on selects and joins is so clear and useful that I would even call it exciting. The terrific thing about this book is when you have finished reading it you should come away with a feel for how the underlying DB actually works and what it is doing to produce the data for you.
I personally found this book very useful, even though I am using MySQL for the application I'm writing. But the feature set that MySQL chooses to support will logically limit the usefulness of the this book for the MySQL user. Programmers developing for Postgres, Firebird, and others will obviously get much more out of the book and its treatments on subqueries and views than will MySQL users.
One thing that did turn me off is the inclusion of a CD-ROM. The CD has a copy of Sybase for the user to work with. I don't need to explain that the internet is a superior place to put such things. That said, at least it wasn't glued to the back cover (a pet peeve) and was instead bound into the book like a magazine reply card. Many publishers perceive that they can charge more for a book that has a CD, but I just find it annoying and wasteful. But that's hardly a reason not to buy this book and place it on your bookshelf in a prominent position, not on the bottom ghetto shelves next to the stack of paper for your printer.
In short, those looking for an book about SQL, that won't teach them bad habits would be well served by this book (and likely by its sister book, The Practical SQL Handbook: Using Structured Query Language by the same authors) and those who think they know SQL will find it a useful text to have handy as well.
You can purchase The Practical SQL Handbook: Using SQL Variants from bn.com. Slashdot welcomes readers' book reviews -- to submit yours, read the book review guidelines, then visit the submission page.
Is the sequel better? (Score:5, Funny)
Tom.
Not much different. (Score:2, Informative)
Re:Is the sequel better? (Score:2, Funny)
or, maybe:
the SQL is better than the original
(OMG, I need an holiday....!)
Cheers.
Re:Is the sequel better? (Score:1)
Tom.
Re:Is the sequel better? (Score:1)
Re:That's because (Score:1)
Do you call DOS Dee-oh-es?
Do you call CMOS, or cee-em-oh-es?
How about arr-ay-eye-dee?
There are many others. All are fine, however. Acronyms, in the techical world, are used so the user does not have to say a bunch of words. Wouldn't it then be silly to have to spell each letter out?
If the use of an acronym is for ease of use, its pronunciation should follow suit.
Some acronyms are easier spelled than pronounces. Exampli gratia, PC-MCIA*. Also, there those that are easier pronounced than spelled. For example, RAID. There are even those that are better as a mixture. Such as MS-DOS.
But some, stand on both sides of the line. They are both easy to spell, and to pronounce. Both are easy, and people are free to use whichever one they are more comfortable with. I think the most common one of those is SQL.
PostgreSQL, is spelled, post-gress-que-ell, because post-gress-sequel, is harder to pronounce, and doubles the "s".
What really ticks me off, is people who say dah-tuh(-base), as opposed to day-tuh(-base). IMNSHO, "Dah" is incorrect, and is a clear sign of a loser.
* People Can't Memorize Complex Industry Acronyms
Re:That's because (Score:2)
Re:That's because (Score:1)
Do you call it scuzzy or es-cee-es-eye?
Do you say idd, or eye-dee?
The former has no vowels in the first syllable, yet it is still pronounced as a word.
The latter starts with a vowel, though it is spelled out. Granted it is not a real acronym, but I think it makes the point.
Re:That's because (Score:2)
sPh
Re:That's because (Score:5, Interesting)
SQL != SEQUEL
Although SQL is largely derived from it, SEQUEL was the query language of IBM's first Relational Data Base Management System, System/R, dating back to the mid-1970's. (IBM's second --and current -- RDBMS was creatively named DB2.) So pedantic old farts like me are careful to distinguish between the two and pronounce SQL as ess kyoo ell to avoid confusing it with its more primitive predecessor, SEQUEL (though it's not like there is any real chance of confusion these days).
Re:That's because (Score:2)
No rows returned.
Actually, what most everyone knows as SQL and Sequel are the same thing, at least in the same sense that SQL-86, SQL-92, etc. are the same thing. (I.e. there are obvious enhancements, etc. to the language as time passed and it evolved, but the language itself is still what we think of as "sql".)
IBM changed the name from SEQUEL to SQL in the late 70's as SEQUEL was found to be an existing trademark.
-Bill
Re:That's because (Score:2)
Like my post said, SQL is largely derived from SEQUEL, and the latter is the "more primitive predecessor" of the former; that's essentially the relationship you describe. And you're right about the reason for the name change (though the odd thing is that the conflict was with the name of an airplane -- IBM's lawyers must have been paranoid in those days). But we were discussing the name, and the pronunciation of the name. Check out the following document on the history of SQL:
You'll note that the originators of SEQUEL/SQL are very careful to use one term or the other depending upon which point in time they're discussing. That the name change corresponded to some pretty significant additions to the language is probably why in circles outside of the creator's group SEQUEL and SQL are often treated as separate but related entities. But whether or not they are the same language misses the point: they are two different names, and as the above article shows, SQL was named in the style of other three-letter-languages of the era like APL (by "squeezing the vowels out of SEQUEL"), and was pronounced accordingly. This is why old farts (especially IBMers and ex-IBMers) are quick to correct whippersnappers who pronounce it SEE kwell.
Re:That's because (Score:2)
According to many dictionaries, it's not really considered strictly an acronym unless it is easily pronouncable; otherwise, it's just an abbreviation. Personally, if it's an abbreviation where the letters are the first letters of most of what it's abbreviating, I call it an acronym whether it's pronouncable or not.
As far as what to call "SQL", I think most of us are intelligent enough to know what someone means if they say either "ess cue ell" or "sequel".
Re:Is the sequel better? (Score:2)
Re:Is the sequel better? (Score:1)
sPh
Re:Is the sequel better? (Score:2, Funny)
Well-done book (Score:2, Interesting)
Re:Well-done book (Score:1)
Re:Well-done book (Score:1)
Re:Well-done book (Score:2)
Very controversial book (Score:1, Interesting)
It came as news to me, but the author is a SQL god so I guess it must be true.
Re:Very controversial book (Score:1)
Re:Very controversial book (Score:1)
Re:Very controversial book (Score:1)
Re:Very controversial book (Score:1)
While it is possible to add layers to support replication of a database, until the replication is provided or endorsed by the main distribution, it can hardly be said to be supported by PostgreSQL itself.
Re:Very controversial book (Score:4, Informative)
Postgres doesn't support automated replication in the core code but there are open source plugins that will handle this. Equally, PHP does not support gzip functions as part of the core language, but should this be highlighted as a shortcoming of the language? No - just install zlib et voila!
I don't care whether the automated tools come with the core download or not - if they're freely available and work cleanly with the code (not dirty hacks) then there is no problem. Nested subqueries in MySQL is a problem as there was no (as far as I could google) patch I could apply that would enable this functionality. This is not true for pg replication.
A chapter on the shortcomings of Postgres wrt replication would be half a page long and consist of a list of URLs, saying "install one of these".
Re:Very controversial book (Score:2)
http://dmoz.org/Computers/Software/Databases/Po
http://techdocs.postgresql.or
None of these appear to have Master-Master replication support.
-l
I am one with google. I also bother to _read_. (Score:2)
I did google for those. I also bothered to read the project statuses for each one. PostgreSQL-R critically lacks:
Whether they support a Master-Master configuration or not (which, you'll note, is not even mentioned on the site), it's not near finished enough to compete with Sybase et al. in this particular, but important area.
-l
Re:I am one with google. I also bother to _read_. (Score:2)
-mi
Re:mod this up (Score:2)
SQL books (Score:1)
Re:SQL books (Score:1)
It was based more on SQL-89 standard at the time and aluded to SQL-92 changes, which this is probably where the new one picks up.
Re:SQL books (Score:2)
Keep your pet hates to yourself (Score:1, Interesting)
Honestly, that is the most pathetic argument I've ever heard in a review - it would be more reasonable if you had said "they didn't provide a CD but made it available for download. This will be a major irritation for modem users, and there is no reason why they couldn't have shipped it with the book."
Personal Opinion (Score:5, Insightful)
For DBAs and advanced SQL programmers, however, I would recommend database-specific manuals that give greater insight than an overview text such as this, as this type of manual is unavoidably poor in the more important aspects of query optimization. Jack of all trades and master of none, as the case usually is.
Decent review, BTW (+1 INTERESTING, article moderation)
Excellent!!! (Score:3, Funny)
A free coaster!
Re:Excellent!!! (Score:1)
Microwave it and convert it into a clock!
Or better yet, if you have a tesla coil you can impress [netcomuk.co.uk] all your friends!
Re:Excellent!!! (Score:1)
No good (Score:2)
Naw (Score:2)
I do wish I had bought California real estate when it could be had for 5 figures. But I thought it was too high....
SQL Limitations ? (Score:2, Interesting)
I'm just getting into SQL myself - at least I've got perl talking to a mysql database
During a web-search for help with SQL, I came across a discussion, which said that SQL had many limitations (I don't have the link anymore.)
I've found SQL reasonably powerful so far, but obviously I'm new to this stuff.
Can anybody point out the areas that SQL is lacking in ? (and maybe where new progress is being made.)
Just interested.
Cheers.
Re:SQL Limitations ? (Score:3, Interesting)
Obj1 (type A) "owns" Obj2 (type B) and Obj3 (type C)
Obj2 (type B) "owns" Obj4 (type C)
There is no particularly good way to model this relationship in SQL; you need at least four tables (one to establish ownership relations and act as object identifiers, and three to define the traits for types A, B and C) where you would ideally want only three.
Another weakness is when implementing "business logic" -- rules that define whether or not particular changes are allowed, or what else must change to keep things consistent. In the past (I believe SQL99 improves this, but is not widely supported yet), there was no standard for defining smart triggers, constraints or stored procedures, and some database systems did not support such things at all. One common solution to this problem is to have a layer of code in front of the database that performs all of the transactions and reports business logic violations to its clients -- the classic three-layer database system, but not as efficient or clean as if the business logic could be handled by the database system itself.
There are some other application-specific weaknesses; for example, a full inverse text index cannot be stored both efficiently and portably in SQL. This has impact on things like DNA sequencing as well as text searches.
On-line analytical processing is also somewhat limited within the standard; this partly goes back to the lack of a standard trigger language, and partly to the traditional table/row model of a SQL database.
SQL is a very powerful and very useful standard, and its existence as a standard has done an incredible amount of good. It does not solve every problem -- but given how complex the standard already is (and has to be), that may be a good thing.
Re:SQL Limitations ? (Score:1)
Obj1 (type A) "owns" Obj2 (type B) and Obj3 (type C)
Obj2 (type B) "owns" Obj4 (type C)
There is no particularly good way to model this relationship in SQL; you need at least four tables (one to establish ownership relations and act as object identifiers, and three to define the traits for types A, B and C) where you would ideally want only three.
Please explain this example. I didn't really catch it. I don't understand what you mean by "owning".
Another weakness is when implementing "business logic" -- rules that define whether or not particular changes are allowed, or what else must change to keep things consistent.
This has nothing to do with SQL. A database, is a base for data, not logic. The structure of the database defines objects, and SQL is used to logically retrieve data.
Business logic is separate from the database. It is more of a manipulation of the data before or after it is INSERTed. Which is why it is amazingly correct to use a trigger for it. Triggers should not be used to make the database work, per se, rather it should modify data, as defined by various rules.
As for not having a SQL standard on triggers, that's fine. Triggers are a deviation from the database. While it is certainly nice to have, it will broaden the application of SQL, into areas where it should not be. Triggers should be able to *use* SQL, but not *be* SQL.
One common solution to this problem is to have a layer of code in front of the database that performs all of the transactions and reports business logic violations to its clients -- the classic three-layer database system, but not as efficient or clean as if the business logic could be handled by the database system itself.
But, as I mentioned before, it is the "better" solution. We do not want the database to handle business logic. The database should be completely for data, and structured relationships. As soon as business rules are implemented, the database itself loses integrity.
The rest of your comment applies to databases, not SQL. Unless you want everything implemented in SQL, which I hope never happens.
Re:SQL Limitations ? (Score:1)
Re:SQL Limitations ? (Score:1)
No it isn't. With an index on channel_id, it would be the quickest method.
With Oracle, an EXPLAIN PLAN, will easily show the optimizer chosing the index for a FAST FULL SCAN. You can't get too much quicker than that.
Re:SQL Limitations ? (Score:2)
I think the concept of "owning" is anti-relational in philosophy. "Own" is only one possible viewpoint (relationship) among *many*. One should not hard-wire such absolutisms into software designs. (OO often does this with overbearing IS-A relationships.)
(* Many real-world relationships have the required trait *)
Example? IMO, trees are over-used in computer-science. They conceptually are (initially) pleasent to work with, but fail to capture the multi-facetted nature of most real things (besides animals and shapes) well over time. You end up getting deeper and deeper into your speggetti vine. If you follow any man-made change pattern over time, it will almost certianly digress from a true tree. (Technically, you can force just about anything into a tree, however, it becomes artifical over time, often having to duplicate nodes or at least a vast majority of a node.)
Even in a "hierarchical document", you may want to search for things in a non-hierarchical manner. The "hierarchy" is just one viewpoint among many. (Plus, some complex documents cannot be easily reduced hierarchically.)
True, some niche domains can take advantage of its limited pathways. CAD may be one.
Re:SQL Limitations ? (Score:4, Insightful)
Business logic should be separate from the database, with triggers and stored procedures used primarily for data integrity issues. (Which is why the poor-to-nonexistent support for transactions and foreign key relationships make MySQL a sad also-ran for many purposes compared to the expensive proprietary options. But I still hope...) You can get some significant performance benefits to putting some often re-used procedures into the database, but that doesn't make it a best practice for all circumstances. It's overused by both lazy front-end programmers who can't be depended upon to validate the input they are accepting and bored DBAs who are trying to look busy. And such items are some of the least portable code you can write for different database systems, whereas table creation and select/insert/update commands work pretty much anywhere. Doesn't mean SQL is perfect, but if your problem comes from trying to get it to do things that properly should be done somewhere else, the failure is in the design, not SQL.
Re:SQL Limitations ? (Score:1)
But I digress: The original poster asked for limitations of SQL. I pointed out several limitations. Your reply is essentially "But your assumptions are wrong if you are using SQL!" -- and that is entirely the point. Using SQL as the only interface to the database prevents the user from making certain reasonable assumptions.
Re:SQL Limitations ? (Score:1)
Re:SQL Limitations ? (Score:1)
Just about any example you can think of can probably be solved with an rdbms (and maybe some code interacting with it), it just might be really slow and overly complex because you're trying to smash your "real world" model into tables. Slow because the optimizer is most likely pretty stupid and can't make a good plan that has more than a handful of joins (which you'll end up having with a complex design) and it can't do a damned thing about outside code that fiddles with SQL results.
Re:SQL Limitations ? (Score:2, Informative)
The real area where SQL is weak is recursion. There is no allowance for recursion in '92 and there is little I believe in '99.
An excellent language to examine is Datalog, which uses rules to do queries. The structure of the Datalog language, as well as it's queries, falls very close to the definition of a finite state machine.
You can show the flow of data, and how it fits within the bounds of the rules you give it, all by drawing the states that you define within the language. The query ends when it reaches a point where it can no longer process any data.
SQL is great for database work, but I honestly believe that the future lies in a rules-based language like Datalog.
Re:SQL Limitations ? (Score:1)
Re:SQL Limitations ? (Score:2)
Which means that for complex processing, there has to be an interface at some level to a more flexible programming language. The dominant programming model in business today is object-orientation - not without some good reasons - but unfortunately, there are some problematic issues in mapping between object and relational systems.
So the problem with relational systems is really simply that (a) in themselves, they are not appropriate for all data transformations and (b) they don't easily lend themselves towards integration with more flexible systems.
That said, I agree the most developers don't seem to be aware of what SQL can do. Having personally developed systems that included tens of thousands of lines of SQL, I'm pretty familiar with what it can do, but also with how restrictive and inflexible it is compared to some other approaches. One of its biggest problems is that it lacks a powerful enough reuse mechanism, and the various proprietary extensions don't do a very good job of correcting this.
SQL Aternatives (was: SQL Limitations ?) (Score:2)
But there are different ways to "math" the same thing. For example, Relativity and Quantum Physics may solve certain problems, but sometimes old fashion Newtonian physics can do it quicker, have a shorter learning curve, and be 99.99999999 percent as accurate.
If I replaced SQL, here is some draft suggestions:
http://geocities.com/tablizer/relat2.htm
My biggest complaint is that SQL is too nested-based, whereas, I would rather see it be reference-based. Graphs are more general-purpose than trees. Plus, being able to isolate the name-space into smaller chunks would be helpful IMO.
Glad they emphasis SQL-92 (Score:3, Insightful)
Select A.*
From A,B
Where A.MayorName is not null
and A.CityID = B.CityID
and B.TaxRate > 5
vs.
Select A.*
From A JOIN B
ON (A.CityID = B.CityID)
Where A.MayorName is not null
and B.TaxRate > 5
The major difference is that the join is explicityly removed from the filtering done in the where cluase. This makes queries much easier to read. Queries can get extreamly complex and when you have something like 6 joins you will soon appreciate the new syntax.
This book sounds interesting so I will be checking it out!
--Peter
Re:Glad they emphasis SQL-92 (Score:3, Informative)
Oracle 9i now supports the SQL-92 syntax including natural joins. If you want to join two or more tables that have properly named keys (like key names for PK/FK relationships), then you can use the following:
select *
from A
natural join B
where A.MayorName is not null
and B.TaxRate > 5
It's a very nice way to join a lot of properly normalized tables with little to no WHERE clauses. SQL Server can probably do the same thing as well.
Re:Glad they emphasis SQL-92 (Score:1)
Re:Glad they emphasis SQL-92 (Score:2)
Did they fix the bug where circular joins crash the DBc connection?
Re:Glad they emphasis SQL-92 (Score:2)
This makes queries much easier to read
Really? As a programmer who has used Oracle for years, I find the SQL-92 style join syntax more confusing. I spend a lot of time getting it correct when writing SQL for RDBMS who use that join style.
I suppose maybe it is just what you are used to.
Re:Glad they emphasis SQL-92 (Score:2)
The one big reason to use SQL-92 (why we do it at my job) is because it effectively prevents an accidental cartesian query:
SELECT * FROM table1, table2
if table1 and table2 each have 1000 rows, you just selected 1,000,000 rows. 10,000 rows each, that's 100,000,000, and you get the point. You can easily crush a server by making a typo.
While the above query is a trivial example, easy to overlook that you didn't join properly, especially when you start complicating it with > 2 table joins with lots of WHERE critieria. If you always use explicit SQL-92 JOINS, your SQL won't run if you don't join properly.
Re:Glad they emphasis SQL-92 (Score:1)
Re:Glad they emphasis SQL-92 (Score:2)
SELECT * FROM table1, table2
WHERE table1.id = table2.id
SQL-92:
SELECT * FROM table1 JOIN table2
ON table1.id = table2.id
Re:Glad they emphasis SQL-92 (Score:1)
just wish more of it was implemented. MS SQL-
Server actually does a better job of it than
even Oracle. Compare
Select A.*
From A,B
Where A.MayorName is not null
and A.CityID = B.CityID
and B.TaxRate > 5
vs.
Select A.*
From A JOIN B
ON (A.CityID = B.CityID)
Where A.MayorName is not null
and B.TaxRate > 5
The major difference is that the join is explicityly removed from the filtering done
in the where cluase. This makes queries much easier to read. Queries can get extreamly
complex and when you have something like 6 joins you will soon appreciate the new syntax.
This book sounds interesting so I will be
checking it out!
--Peter
This Seems To work Better for me!
Select A.Moron, A.Geek
From A JOIN B
ON (A.Geek = B.Nerd)
Where A.Geek is not null
and B.Nerd > 12
Yes, I do like this way so much better!
This is SQL-99, not SQL-92, and it's in Oracle 9i. (Score:2)
According to Daniel K. Benjamin's "Oracle 9i New Features For Administrators Exam Guide," Oralce 9i introduces:
Oracle has a lot of problems, but standards conformance is not one of them. Oracle is one of the few databases to have certified with NIST for SQL-92.
Re:Glad they emphasis SQL-92 (Score:1)
From SQL Server Books Online
"In earlier versions of Microsoft® SQL Server(TM) 2000, left and right outer join conditions were specified in the WHERE clause using the *= and =* operators. In some cases, this syntax results in an ambiguous query that can be interpreted in more than one way. SQL-92 compliant outer joins are specified in the FROM clause and do not result in this ambiguity. Because the SQL-92 syntax is more precise, detailed information about using the old Transact-SQL outer join syntax in the WHERE clause is not included with this release. The syntax may not be supported in a future version of SQL Server. Any statements using the Transact-SQL outer joins should be changed to use the SQL-92 syntax."
If I changed your query to an outer join,
Select A.*
From A,B
Where A.MayorName is not null
and A.CityID *= B.CityID
and B.TaxRate > 5
This could be interpreted as
"Give me all rows from A and B where the CityID's match and TaxRate > 5. and MayorName is not Null"
OR
"Give me all rows from A where MayorName is not null and only join rows from B where the CityID's match and the TaxRate > 5".
But if you write it as
Select A.*
From A
LEFT OUTER JOIN B ON
and A.CityID = B.CityID
and B.TaxRate > 5
Where A.MayorName is not null
OR
Select A.*
From A
LEFT OUTER JOIN B ON
and A.CityID = B.CityID
Where A.MayorName is not null
and B.TaxRate > 5
...you avoid this ambiguity.
Re:Glad they emphasis SQL-92 (Score:1)
Re:Glad they emphasis SQL-92 (Score:1)
select a,b,c,d,e
from foo, bar
where foo.a = bar.a
and (foo.a, foo.b) in (select a, b from zee)
You just can do it in SQL Server without doing some ugly casting like:
select a,b,c,d,e
from foo, bar
where foo.a = bar.a
and (foo.a + '|' + foo.b) in (select a + '|' + b from zee)
Which really hurts query performance
BTW: SQL Server isn't half the dbms that Oracle is
Re:Glad they emphasis SQL-92 (Score:2)
I'm actually a fan of the JOIN clause. You might think that it's easier to read when you're writing it, but things change when you have to deal with more complex queries or decipher a long unformatted one that you or someone else wrote long ago.
I'm currently coding up a SQL "pretty printer", and moving the joining criteria from the FROM clause where it makes sense to the WHERE clause where it's just convenient does not look pretty.
Re:Glad they emphasis SQL-92 (Score:1)
Trouble is when you have a complex database with a load of table decodes and your doing a complex set of joins on a dozen tables then deciphering a query written 6 months ago with SQL-92 syntax is hell. In effect SQL-92 just doesn't scale anywhere near as well as SQL-89.
Re:Glad they emphasis SQL-92 (Score:2)
I have worked on and developed on MySQL, Oracle, Sybase, PostgreSQL, and a tiny bit of MS-SQL (7.0) so I have a few bad habits stemming from my Oracle days. I do like Postgres best of all, though.
Re:Glad they emphasis SQL-92 (Score:2)
I understand 9i now supports JOIN, but we're still running 8. SIGH.
Why even need explicit joins? (Score:2)
Only when you are doing something different or odd should the joins need to be explicitly stated, and only incrimentally. (I know some DB's already support something like this, but it should be standardized IMO.)
Then again, if we are going to change SQL, then perhaps overhaul it completely (another thread below).
SQL Security (Score:2, Insightful)
Another good book (Score:3, Insightful)
A First Course in Database Systems (2nd Edition)
- Jeffrey D. Ullman, Jennifer D. Widom
I found that it covers almost everything I needed, with a no-nonsense approach (no "CheckPoints", long pointless blurbs, or long code listings).
Although written for the academic, it didn't stop me from reading mostly the second half of the book first (the SQL stuff), and reading some theory when I wanted to.
The SQL it covers is pretty standard stuff that works with most databases (except for MySQL at the time I read it, some ACID principles couldn't apply). The specific details for each databases can be picked up by reading online docs.
If you visit SE-asia, check out their bookstores where you can find tons of "mainland china" editions of these classics that cost a tenth of the price as the real deal.
MySQL again (Score:5, Insightful)
CDs everywhere (Score:2)
Also, increasing the "perceived value" of the book is porbably only part of the story. Undoubtedly AW got some kind of consideration from Sybase for advertising their product this way.
Compare to /Visual Introduction to SQL/ ? (Score:2)
sPh
my suggestion (Score:1)
Get a copy of whatever database you're going to use. Microsoft SQL Server is actually really easy to configure and use and has some great graphical tools. If anyone knows of some similar graphical tools for an OSS database, please let me know.
Next, look at a database that someone else has written and attempt to manipulate the data through queries.
The best book I've actually purchased for SQL is "Transact-SQL Programming" by O'Reilly. If you are working on a Microsoft database, this book is a great companion to the built-in help system in Query Analyzer.
Hands on, limits of (Score:3, Insightful)
Re:Hands on, limits of (Score:2)
Good Suggestion for T-SQL (Score:2)
But lets say you want to run a database for yourself or you are a smaller company. Then I would not recommend worrying too much about learning a variant of SQL tied to an expensive propietary system. (SQL Server only runs on MS NT or 2000- and so you've got server licensing, db server licensing and then seat licenses for everyone who will connect to the db)
At my small company we looked at expanding a product so we priced a new server- and then SQL Server licenses for that server and 200 users. The licensing on the software was much more expensive than the hardware we wanted to buy.
Our solution? We are going w/PostgreSQL. It has some very nice visual tools for management. It has good ODBC support. And it has most of the capability that SQL Server has. Enough to justify taking advantage of the monetary savings.
And Oracle? Forget it- more expensive than SQL Server.
Granted there are businesses out there where the cost of Oracle or SQL Server is more than justified- but those huge companies are a minority of the business world. There are many more like us- not huge but we need good RDB systems.
.
Re:Good Suggestion for T-SQL (Score:2)
I just like to be able to go in and modify tables and look at recordsets easily...
Re:Good Suggestion for T-SQL (Score:2)
At this point I've been using PGAdmin II. It is open source written in VB (yeah - I use VB and I'll admit it). It gives you the ability to do quite a bit of what you can do in enterprise manager.
There are other tools that I have not used yet that will work on multiple platforms. The postgreSQL has great documentation and links to many of the useful tools. This is one project where it is very, very easy to find what you need to get the ball rolling.
PostgreSQL can not do everything SQL Server and Oracle can do. As of right now you cannot back up transactions. I believe it is also limited in regards to replication and some other features that the big boys handle pretty well.
But in many cases, like ours- we don't need that stuff. I just need a dependable rdbms that doesn't cost an arm and a leg and isn't a piece of crap like MS Access.
.
T-SQL != MS SQL Server (Score:2)
You'll find it used with at least some versions of Sybase.
Remember M$ SQL Server's History (purchased from Sybase, indeed they were Paying Sybase royalties until 7 IIRC).
That being said, while I try and stick as closely to SQL89/92 as possible, I would say that TSQL with it's extentions is not nearly as much of a PITA as PL/SQL.
Re:my suggestion (Score:2)
Titles? Editions? Sequels? (Score:3, Informative)
Another great book (Score:1)
This thing covers all the basics, theory, and advanced topics I have ever asked of it. It will really take your SQL to a whole new level.
Why Sybase? (Score:4, Insightful)
Why not Postgres 7.2 for the Linux crowd, and Firebird (Open Source version of Borland's Interbase db) for the Windows crowd.
Lots of graphical tools available, and not that difficult to set up (compared to Oracle, anyway).
Both implement all features that a modern relational database are supposed to support.
Re:Why Sybase? (Score:2)
Postgres 7.2 implements all of the features a modern relational database is supposed to support? How about master-master replication? Even master-slave replication is only supported through third-party patches that do not scale well. The open source databases (postgres, mysql) are poorly scalable and this lack of scalability makes it impossible to even start to compare them to their commercial counterparts.
maru
Re:Why Sybase? (Score:2)
For learing SQL, I fail to see how master-master replication is going to help.
Re:Why Sybase? (Score:2)
Re:Why Sybase? (Score:2)
Re:Why Sybase? (Score:2)
And last I heard, Oracle is not free. We pay $14,000 per CPU every 2 years.
Re:Why Sybase? (Score:2)
The book is on SQL, not tuning, or database administration. As most databases are mostly SQL 92 compliant, it should be a non-issue.
Re:Why Mods Suck? (Score:3, Insightful)
I would love to here from whoever moderated my post as Flamebait and have them explain some reason for that. There's nothing I said that isn't accurate and parts of it are posted all over this thread.
I guess I committed the cardinal sin of posting something that did not toe the party line. How freaking pathetic.
I like the moderation system and I like to moderate- but some times I just get pissed when some idiot who knows absolutely nothing mods someone down.
I think modding down should burn 2 points and modding someone up should burn 1. Too many people are way too free w/off topic, redundant, troll, etc.
So to the faceless, ignorant moderator of my post let me just say - You Suck.
(yeah - its friday I've got some time on my hands and I do feel better now. That's worth a little karma)
.
Where's the spoiler alert?! (Score:1)
Resources for learning SQL (Score:1)
SQL in a Nutshell helpful for variants (Score:2, Informative)
As the reviewer posted, learning sql and learning the various flavours IMHO is too much for one book. The Nutshell book is a reference for advanced users.
Re:my question (Score:1)
Re:my question (Score:1)
SQL was developed by IBM in the 1970s for use in System R. It is the de facto standard as well as being an ISO and ANSI standard. It is often embedded in general purpose programming languages.
The first SQL standard, in 1986, provided basic language constructs for defining and manipulating tables of data; a revision in 1989 added language extensions for referential integrity and generalised integrity constraints. Another revision in 1992 provided facilities for schema manipulation and data administration, as well as substantial enhancements for data definition and data manipulation.
Development is currently underway to enhance SQL into a computationally complete language for the definition and management of persistent, complex objects. This includes: generalisation and specialisation hierarchies, multiple inheritance, user defined data types, triggers and assertions, support for knowledge based systems, recursive query expressions, and additional data administration tools. It also includes the specification of abstract data types (ADTs), object identifiers, methods, inheritance, polymorphism, encapsulation, and all of the other facilities normally associated with object data management.
The emerging SQL3 standard is expected to be complete in 1998.
According to Allen G. Taylor, SQL does _not_ stand for "Structured Query Language". That, like "SEQUEL" (and its pronunciation