SQL Fundamentals
This beginner book takes a traditional look at the ever-popular Structured Query Language. Never bothered to learn SQL? Here's your chance. SQL Fundamentals, by John Patrick, takes the first layer of SQL in Access and Oracle [robo, I find this a confusing phrase, not sure how best to recast, but somehow] and sums it up in this 834-page manual. Read more for SQL Fundamental's strengths, weaknesses and everything in-between.
The Basics SQL Fundamentals discusses the practical realities of extracting information from a database. Patrick shows the reader how to use SQL in both Oracle and Access. The book starts with a brief overview of the roots of SQL and relational databases; after this introduction, the book covers select statements and the basics of a query. Each chapter builds on the next, and the book follows a simple progression, adding complexity as it goes along.
This book is a very easy read -- it flows much better than a textbook, yet still conveys the information it promises. However, it's definitely for newcomers to SQL. So, if you have any experience in SQL this would not be the best choice. (Chapter 1 explains the concepts of a cell, row, column, and table, which might be enough to let you decide if this book is at the right level for you.) Throughout the book, the author relies on applying each newly introduced concept to a single relational database example. This hypothetical database (a table of employees trying to calculate their meal credits) makes the book feel consistent, and helps eliminate confusion about where the example information comes from, but it's also limiting for readers who want a broader range of examples.
One of the greatest strengths of this book is its wealth of code examples and accompanying tables. In contrast to many other manuals, this book illustrates queries along with their effects on the tables. Other SQL books (ones I consider going up to "layer 2" SQL) have many example queries, but some of them fail to show any sort of results from their example tables. Also, much of the code in SQL Fundamentals is well documented, with footnotes explaining any changes that occurred.
Caution: Beginner Book The book is called SQL Fundamentals. However, in this case, the fundamentals are only as they apply to the Oracle and Access databases. It mentions the existence of other distributions at the beginning of the book: "Oracle, Access, DB2, MS SQL, Informix, SQL Windows, Sybase, SAS sql procedure, FoxPro, dBase, Tandem SQL, MySQL, SQLBase, Cold Fusion, SAP, Business Objects, ODBC, Ingres, Ocelot SQL, OsloData, PostgreSQL, Rapid SQL, XDB, SQL/DS, Mini SQL, Empress, Interbase, Progress, Supra, SQL Report Writer, Paradox, Delphi, VAX SQL, Essbase, Beagle SQL, GNU SQL Server, Just Logic/SQL, PrimeBase, Altera SQL Server, DataScope, and PowerBuilder." However, Patrick never speaks of them again; perhaps he should re-title this book SQL Fundamentals: Applied to Oracle and Access? Readers considering this book should keep this in mind. The book explains things well, but the book's overall logic is geared toward those using one of those databases, and the examples are relevant only in that context.
I primarily use MySQL and Progress, so a book explaining SQL fundamentals applied to Access and Oracle isn't going to help me unless I specifically take on projects which use these particular databases. Also, The book often goes into unneeded repetition of subjects: for instance, the first 150 pages are all about select statements. I've never seen so many select statements picking apart one table. I personally think it would benefit from being trimmed down, and leaving further study to the reader.
The Plug I would recommend this book to a newcomer to SQL. It covers the fundamentals just like it claims. After finishing this book, you will have a grasp on things ranging from the most basic select statements to unions, self joins, & cross-joins.
Something to consider might be what SQL database you will be working with. If you'll be working with either Oracle or Access this book will be helpful. If not, I suggest looking at things like Managing Using MySQL by O'Reilly.
Finally, from the text comes this concise answer to the question "Who Should Read This Book?"
Everyone with an interest in getting information from a database can read this book. It can be a first book about databases for people who are new to the subject. You do not need to be a computer programmer. The discussion begins at the beginning and it does not assume any prior knowledge about databases.
That seems like a fair summary; with the caveats already mentioned, I can recommend it for newcomers to SQL looking for a thorough but not patronizing introduction.
You can purchase SQL Fundamentals from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This book recommends that you do not attempt to run SQL on a Linux machine, as it willl surely break down.
Cunning linguists
SELECT * FROM Slashdot_Editors WHERE clue > 0
0 rows returned
If you celebrate Xmas, befriend me (538
SQL 2000 = win. MySQL = slow.
When the SQL to this book will be out? Har de har har har.
Error: Erection reset by beer.
Can it be, another FP?
Thank god I don't have to be near your fat Yanks.
At subway, you get a sub prepared anyway you like, by the friendly, efficient staff. Choose from mouth-watering veggies, succulent meats and cheeses, and a variety of freshly-baked bread. Why not stop in today and pick up some subs for the whole family to enjoy. I suggest the Italian BMT, piled high with genoa salami, pepperoni, ham, and provolone cheese. Top it with lettuce, tomato, onion, and pickles, add a few spritzes of italian dressing and you've got a meal fit for king. Subway: eat fresh!
g to the oatse
c to the izzex
fo shizzle my nizzle click here (note: the site is currently down. I expect it to come back online around Thanksgiving) to dispatch Jared and his formerly overweight goons to crack down on Subway if they don't honor the $3.49 Troll Tuesday deal. Make sure you provide the store number and address. Mine is store number 5839. Don't believe me about the concept of the jared dispatch? Yahoo has an article about it here, although it is pretty light on the details.
Note: I've gotten a few comments that the link to Jared Dispatch doesn't work. I think the site got taken down because of abuse of the service. Although the site got taken down, I still highly reccomend Subway and their high quality subs. To show my appreciation, here is a link to Free Subway Coupons. I had to redirect it through Yahoo's site redirector, because my of the filter at work. Anyways, here is the link!
Note 2: I've received word that those links to yahoo actually point to goatse.cx. I am truly sorry about that, and I found the cause. A couple weeks ago, a hacker broke into yahoo and set up some scripts that redirect the user to goatse.cx if a file is in a certain directory. I accidentally tried to access a file in one of those haunted directories. I fixed the links (I have a cousin who works at yahoo), so they should bring you to the actual sites now, not goatse.cx. Update 10/28: The hacker, or should I say hax0r, actually has posted a page on yahoo on how he did it and how the goatse redirector works. It's a very good read. I suggest reading it soon before yahoo finds out about it and takes it down. Check it out ASAP!
Note 3: I am working on locating the articles using google's cache. It is taking some time because I don't remember the exact titles. However, I hope to have the links fixed and working very soon. Keep eating at Subway in the meantime, and request that they bring back the jalepeno cheese roll. It is a fanscrumptiously brilliant roll.
Note 4: To all those who think that sub is an incorrect term, I live in upstate NY, and we call it a sub here. There are no hoagies, grinders, po'boys, footlongs, heroes, or any other made up names. It's not hoagieway after all, its Subway.
Important: It is my duty to report to you, loyal low-threshold readers, of a very disturbing incident that happened to me last week. I went into subway at the normal lunch time, but instead of the standard line out the door, the restaurant was vacant. Normally, the queue doesn't concern me, since the crew knows enough to make me a footlong Italian BMT with my standard fixin's and have it ready at 11:30 sharp, on tuesdays. I approached the counter casually, when two bulky men appeared from each side of the potato chip display rack. They held me down, and Jared appeared from behind the counter. He took my preprepared footlong BMT and cracked an evil grin. The manager grabbed the bottle of italian dressing and lubed up my general ass area. Jared shoved the footlong Italian BMT repeatedly into my ass, mixing it with the chucks of feces that were in my bowels, until the fresh crisp veggies resembled brown spoiled food. I begged him to stop, but little did I know the torture waiting for me. He took the italian dressing, and squirted it into my pee hole. Now, it burns when I pee, and it hurts when I sit. I asked him why he was doing this, and he said that they had tracked me down for my abuse of the Jared Dispatch system. You see, Jared gets airsick, and his constant flying over the country has caused him to lose weight due to his vomiting on planes. Normally, this loss of weight would be a good thing, but Subway can't actually claim that he lost weight by eating Subway subs. They told him to put the weight back on and then lose it again by eating subs, somthing Jared does not want to do. As a result, they are the ones who closed down Jared Dispatch. I am begging you, loyal readers DON'T GO TO JARED DISPATCH ANY MORE. Thank you for your time. I have to go to Subway now, and tell them that I want less italian dressing on my footlong Italian BMT. Remember, if you don't eat at subway, then the terrorists win!
This books sounds like a good read for those of us who know nothing about SQL databases. I am always up for learning new code and systems. I still consider myself a newbie on many computer topics so books like these always seem to help out.
[n8.r0n] http://petesweb.spymac.net/
How big is the typeface? I mean, come on, it's not that big a language after all and you could easily fit the basics into 50 pages at most...
Code, Hardware, stuff like that.
Do you pronounce it Sequel or S-Q-L???
/. poll!
To me it is Postgres-Q-L and My-S-Q-L, but I think the Microsofties call it Microsoft Sequel Server...
Maybe good for a
If you need to expand your SQL to include PostgreSQL, try:
PostgreSQL: Introduction and Concepts by Bruce Momjian
Practical PostgreSQL, by Command Prompt, Inc. written by John Worsley and Joshua Drake of Command Prompt, Inc.
Very practical definitions, examples, and procedures. I'm still scratching the surface of SQL, so I haven't found anything yet these sources can't handle.
I've also found the Usenet Posgres groups useful.
JA
http://www.johnalex.org/
I recommend this book highly!
Knowing SQL today is like being a literate man in the 15th century.
It's a must have!
I'm surprised they didn't mention FireBird. It's the actively developed version of interbase, and probably one of the best open source databases in existance, even though its relatively unknown. SAP DB (formerly Adabas) is another very mature open source database that is relatively unknown. MySQL and Postgres aren't the only options.
itself to
Slashdot- Book Reviews For Everyone: Books That
Don't Count
Thanks for nothing.
Something to consider might be what SQL database you will be working with. If you'll be working with either Oracle or Access this book will be helpful. If not, I suggest looking at things like Managing Using MySQL by O'Reilly.
I would suggest not, because you will learn bad habits, and they will be hard to shake once you start working on a real database (Oracle, Sybase, SAP-DB, etc). I have seen MySQL programmers do massively inefficient (and stupid) things like retrieve a list of keys from one table, store them in an in-memory array, then loop through the array executing a select for each key in another table - because they didn't know about subselects. I've seen them put all sorts of redundant validation crap in the middle tier because they didn't know about constraints and triggers. I could go on and on...
If you want to learn SQL, you first need a solid general foundation like this (I have an earlier edition) then later study the extensions that each vendor provides (Oracle PL/SQL, Sybase T-SQL, etc).
With OS X came a bundling of MySQL, and CTOs (Chief Technology Officers) across the country thought to themselves that "Hey, if a big profitable company puts this package of OpenSource software into their flagship OS, it must be OK to use. Let's stop dishing out tens of thousands of dollars a year to Oracle and let's just use this free RDBMS implementation. (Sure, PostreSQL is a bit more weathered, but both are pretty nice considering their price).
Wider acceptance of MySQL and its related products/technologies is a good thing, and books such as this are only a good thing in my mind.
If you celebrate Xmas, befriend me (538
For those who don't know, you can download Oracle 9i for free:l
http://otn.oracle.com/software/content.htm
And if you want a video introduction to SQL, you can get a video course at:
nerdmaker.com
SELECT * FROM girls WHERE body LIKE 'hot' AND status LIKE 'available'
Mysql returned an empty result. *frustrating*
about the book:
It mentions the existence of other distributions at the beginning of the book: "... and PowerBuilder."
I know I stopped using PowwerBuilder with the version 7, and the version 9 is out, but at that time, it was not a SQL database, only a client for SQL databases.
about SQL:
SQL is a langage with which it is really easy to obtain a result that is not what you intended.
A "7"! Nowhere near the standard "9".
:-(
I weep for the murdered trees who gave their lives for this.
I personally prefer going with SQuirreL, but from dealing with other Oracle and ms DBAs most conformists go with sequel.
It in fact is Postgres-Q-L and My-S-Q-L, but you use "sequel" to query both of those. I haven't seen anyone in a long time pronounce the language name S-Q-L, the names of the two products you mentioned are dictated by their respective developers, so it's a different matter. (incidentally, I'm as far from a Microsofty as it gets)
sic transit gloria mundi
Actually, what I've found with the people I've dealt with is that most US based people tend to say Sequel whilst over in Europe it tends to be S Q L. I've just got into the habit of pronouncing it however the other person wants to refer to it, as I'm more than happy to use it either way.
I know whenever I'm at a Microsoft event it's been pronounced the Sequel way, but I'm not sure if Oracle or IBM do.
Here is my username and password for a free download of Oracle 9i. You can get your own if you register.
username: support@nerdmaker.com
password: anon314
AFAIK almost everyone says sequel, not just M$ites. What really has me wondering though is, is it Lynnucks or Line-ex and how do you say that Bjarne guys last name?
When I first started making dynamic web pages, I used access. I used acces for various reasons. 1. It was on a computer at school. 2. I was running win 98 at the time. Not many good databases will run with 98. Even though I wanted a database to keep track of things, I only had one option.
Even though I layed out the database in access, I didn't touch access after the file was created. I then moved to personal web server (an all the security holes that creates) to manipulate the database through ASP.
I know there are many others that because of various reasons are unable to get their hands on other databases, if you get the fundementals of sql through access, you are able to understand the majority of sql statements having to deal with other databases. Even though,things do differ, you have somewhat of a foundation to understand sql.
SQL is an interesting critter: you can learn the basics in 10 minutes, but mastery is very tough.
Seems to me that learning SQL requires a 10 page "which end is up" book (the PostgreSQL tutorial is good for this, if I recall correctly) -- enough so that one gets the basics, along with an 814 page reference for doing those big nasty queries that are needed in serious environments.
834 pages seems might intimidate a newbie!
It's Microsoft Squeeeeeal! Server (say it in your best deliverance voice )
Todd
---- "If we have to go on with these damned quantum jumps, then I'm sorry that I ever got involved" - Erwin Schrodinger
I think the SQL in a Nutshell is a great resource, but if you're just starting with SQL this sounds like a decent book, would be nice to have a comparision though. I've lost track of how many times I've had to explain what the first chapter covers (cell, row, column, table, etc). Maybe I should keep a copy around just to loan out in such cases. "Go read chapter one and come back later, then try tell me what you want done."
PS: Amazon has it for $34.99 [associate]
This may be of interest. www.cgisecurity.com/lib
XXXX XXXX
I XXXXXX XXXXXX
XXXXXXXX XXXXXXXX
XXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXX U
XXXXXXXXX
XXXXXXX
XXX
X
FYI
Anyone who would mod down a love post would also eat their own children.
sPh
SELECT Amazon.Price FROM Amazon WHERE Amazon.Price < bn.com AND Amazon.savings = 12.50 [aff.]
Save some money
SQUEEEL
Quick way (internet) Step 1: go to mysql.com and download mysql
Step 2: go to google.com and enter:
+mysql +sample
Step 3: Spend some time reading, figure it out.
Standardized way (book) The advantages of a good book are mainly in the way of standardization and security. While I've seen books that were crap in reference to this, most do a much better job of providing code samples than the underinformed indivuals writing "samples." That being said, major sites like Zend.com and php.net still provide good examples etc, but in that case you need some fore-knowledge to know what to look for.
All IMHO of course. Many of us are "example learners" as opposed to "book learners".
If you want to make the developers/DBAs/bosses in your company think you are an absolute god, get a copy of Celko's SQL Puzzles and Answers.
1. Learn SQL fundamentals
2. ?????
3. Get laid!
Actually, usage changed sometime around 1994
I think it started happening before then. I was doing SQL stuff back in the 1990 timeframe (even interviewed at Ingres and Sybase) and everyone I knew was saying sequel even back then. It might have been a Bay Area thing though, or maybe even specific to the "upstart" db's, don't know what the IBM or Oracle camp was calling it.
There is an element to database design that is a subfield of calculus. Just learning the syntax for CREATE TABLE and SELECT doesn't really get you very far. Understanding why relational sets are powerful, and being able to leverage that power to problem solving ends, is a far bigger learning process than simply understanding the syntax of SQL.
In order to fully comprehend, say, the works of E. F. Codd, one really needs a background in automata and in abstract algebra.
Of course I took all the databases courses at DeVry but they never covered this obscure topic. I was recently laid off as an HTML Programmer for a Fortune 5000 Company. During my job search I found many other programming positions required knowledge of SQL in addition to HTML.
I read this book in a long weekend and am ready to design mission critical HTML and SQL application for your business.
If I wanted to learn the theory behind designing databases what would be a good book to read? I'm thinking more along the lines of learning from a text book v.s. learning from The Blithering Idiot's Guide to Database Design.
Chris Kuivenhoven is a thief, beware
With the Free Software Movement gaining steam. MySQL is the perfect vehicle for getting more Free Software used in government.
The IRS and Social Security should run all of their databases with MySQL!
It in fact is Postgres-Q-L and My-S-Q-L, but you use "sequel" to query both of those. I haven't seen anyone in a long time pronounce the language name S-Q-L, the names of the two products you mentioned are dictated by their respective developers, so it's a different matter. (incidentally, I'm as far from a Microsofty as it gets)
It is properly S-Q-L because Sequel is something different (Structured English Query Language, an IBM project that never went anywhere). But the term "sequel" for SQL has come into common use, so it's the de facto pronounciation.
Microsoft people just call the product "SQL Server" which IMHO is like calling Windows "Operating System" but it comes from the old days when Sybase and Microsoft cooperated (circa MSSQL 4-6/Sybase 10). Sybase's product was called "Sybase SQL Server", but people just call it "Sybase" (akin to calling Windows "Microsoft"). When they split, MS kept the rest of the name.
You can easily spot a hardcore elite database guru by the fact that these people pronounce it "squirrel".
pages 800 Fundamentals?
Mabye it should be called a Bible! SQL in a Nutshell is a book about fundamentals.
Justen Stepka
Does anyone else find their choice of databases funny? I could see MS SQL & Oracle, but aren't Access & Oracle two totally different beasts?
Access is for small db's, usually personal ones or very small business databases. Oracle is a big enterprise database capable of storing huge amounts of data.
Isn't that kind of like writing a book teaching you an introduction to writing batch files and mastering C++ all at once?
"Linn uks" would be the closest American accent equivalent. In Torvalds' accent, it's "Leen ooks".
You get the feeling this guy sits at his office all day, hitting refresh on Slashdot's main page every two minutes, waiting for a book review to come up. Not that he's interested at all in the book, but so he can be the first one to post a link to Amazon.com, with his affiliate's ID embedded. Mod this guy down!
I here you. I always get confused with 'C'. Is it pronounced "See"? Or as I like to refer to it: "C".
My coworkers like to read the "Fack" when they need help. If people ask me, I just tell them to consult the "Fa" "Q".
I don't have a sig...Do you??
http://www.bookpool.com/.x/rzzwsost6n/ss/1?qs=sql+ fundamentals
Bookpool is a great resource for technical manuals.
First of all, you do have a point. SQL isn't a big language with a lot of features, but if you had really spent a lot of time working with SQL, you would know that SQL is a language usually implemented with A LOT of nuances, and that many problems that are easy in procedural languages that take a lot of work with SQL.
SQL is a powerful tool, but solving many problems with SQL can be very daunting at times, especially when you're dealing with vendor specific nuances.
"Communism is like having one [local] phone company " - Lenny Bruce
Actually there is an official answer. I have an aquaintance that has spend time on and around the ANSI X3H2 committe, and acccording to him the official pronunciation (yep, they actually argued over this) was "ess-que-ell", and not "sequel" or "squeal".
As if it was that important.
Actually, in 93 I heard quite a few people calling SQL "squeal".
Best Slashdot Co
Go design your own porn site to make money, but don't come anywhere near my company. Do you think I'm going to let you design "mission critical" applications after you read a book about SQL on the weekend?
;)
Let me guess, you went to DeVry, didn't you.
Oh... wait..
With OS X came a bundling of MySQL, and CTOs (Chief Technology Officers) across the country thought to themselves that "Hey, if a big profitable company puts this package of OpenSource software into their flagship OS, it must be OK to use.
Yes, the mindset of the fortune 500 lives or dies by what Apple does. "Hey I wouldn't buy any of their overpriced computers but if they think MySQL is great, it must be".
MySQL is pretty good though. Ah hee ah hee hee
I am not a number! I am a man! And don't you
Go to bookpool.com to save money, click on the Slashdot link, if you want to help Slashdot...
Wow! Oracle and Access mentioned in the same sentence without sarcasm or outright laughter. Someone please note the date and time.
--an unbreakable toy is useful for breaking other toys--
> Error, column SexLife does not exist in this table.
/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
It's always pronounced S-Q-L. However, Microsoft (and Sybase) call their product "Sequel" Server. You see, Microsoft "Sequel" Server is basically the brand name of a satabase server that uses S-Q-L, in the same way that "Orace Enterprise Edition" is the brand name of a database server that uses S-Q-L, or "Apache" is the brand name of an HTTP server.
So, it's correct to refer to Microsoft "Sequel", as long as you understand that you're talking about the product, and not the language.
Slashdot is jumping the shark. I'm just driving the boat.
I pronounce it "squirrel". I worked in a place where everyone said "sequel" and I hated that name. The strange thing is, I don't know why. I just did.
Don't label something "offtopic" unless you know the topic well enough to tell what's on topic.
No, they most assuredly should not do this.
They should run all of their databases on stone tablets engraved with cardboard styluses. That would be a real step up for them. ;-)
Access and Oracle don't strike me as 'good' databases to learn SQL on, there just not ANSI compilent enough!.
Maybe I'm a couple of years out of date but
Oracle has a problem with Joins, they just don't work, and that's a big bit of SQL.
Access has a poor SQL implementation, I can't remeber how poor, but very!.
Prohaps it would have been better if the book used a free, more ANSI complient database and included on a CD) e.g. Postgres or Intrabase.
thank God the internet isn't a human right.
When my mom calls me and tells me she's having problems with her "microsoft", it takes an additional 10-20 minute to figure out if she's talking about Windows, Word or Outlook...
I have found http://www.dbdebunk.com/ very informative. If you insist on cutting down trees, I would recommend any of the books that this site links to.
There are fundamental problems with SQL. You may well be forced to work with it but you should at least know what its limitations are.
Hopefully, once you truly understand the problems with SQL, you will see the light, rebel, tell Oracle et al to go screw, and help develop some nice good Open Source alternative to the crappy SQL language.
If you disagree, you are welcome to touch me lower.
Dear Slash-Dotters,
I can't believe how clueless you guys are. Everybody knows it's Structured QUERy Language, or
SQUERL, which is properly pronounced _SQUIRREL_.
Sincerely,
Steve
If you watch TV news, you know less about the world than if you just drank gin straight from the bottle.
So I can't say "squirrel" for MS-SQL. I can't be 1337. Waah! :)
No, the language is SQL (or "seequel").
Only MS idiots refer to the MS SQL Server product as "Microsoft SQL" or "Microsoft Seequel". It's right up there with Windows or Word users who refer to either as "Microsoft".
Oracle is just...Oracle.
Sorry for the shameless plug -- I just use them, I don't get anything out of this.
http://www.addall.com/New/submitNew.cgi?query=013Note, my location is in the URL and it uses this to calculate shipping. You will need to re-search for shipping costs...
Sleep is for the Weak
How is this a beginner's book? A much smaller book will do. Maybe K&R should write one.
love is just extroverted narcissism
I refuse to give money to companies that try and make me feel like an idiot.
Al Qaeda has ninjas!
People who don't understand databases don't know how to use them, and code all of the logic into the middle tier. Very typical. It leads to horrendous bloat, very poor performance, and occasionally, complete project collapse. In one case that I was involved in, the company closed because their project couldn't be done on time since they decided to listen to this "expert" who spouted off similar stuff like what you're saying. The project became an OOP mess.... [emph. added]
./ topic), but the proper solution is NOT to write your own database and index managers from scratch. If you want to get out from under the DBA's thumb, then try some other approach besides using arrays for indexing and manually-written joins.
It seems that many OO fans have a desire to create their own "database" from scratch via programming code, and treat the RDBMS as mere "persistence". They end up using array-like things to manage their own indexes for one-to-many and many-to-many relationships, for example.
This is a widely accepted practice in the OO community. I really don't want to maintain such code.
It seems many OO fans want "control". If you use the database for such things instead, then you are more dependent on the DB vendor and DBA's, and that bothers them.
I agree that DBA politics can be a bottleneck for developers at times (would make a great
(Note that I did *not* say that *all* OO fans avoid or mis-use databases. I am only saying that it is too common a practice. Thus, I am not really bashing OO here, but a bad practice often found in OO shops, for whatever reason.)
Table-ized A.I.
If you need a "quick introduction to SQL" try reading Teach Yourself SQL in 10 Minutes. 800+ pages??? If it was a reference book, maybe you could justify the pagecount, but who has the time to thumb through an 800 page introductory text?
Most developers (read: non-DBAs) are just going to do simple SELECT queries. TY SQL in 10 Minutes does the trick for those 95% of cases.
I would like to see SQL overhauled. It could be replaced with a functional-like syntax (FP) where you reference stuff instead of only nest it. Nesting gets really messy for bigger stuff because it splits "lists" in halfs and separates the halfs by jillions of miles. Plus, you cannot reference repeating sections in SQL without writing views, which requires bothering the grumpy DBA.
A functional syntax would also allow one to add extensions without worrying about ruining the parse tree. Thus, if Oracle had something that Sybase did not when you switched vendors, the DBA could write their own library function to match it. A shop can't add to SQL very easily on their own because of the complexity of the language. FP syntax is more modular.
The longer we wait, the more SQL will become entrenched, due to books like this.
Table-ized A.I.
"Beginners" guide should really be these three lines:
To select something
select columnname1, columnname2 from tablename where columnname1 = 'thevaluetogetby';
To add a line to the DB
insert into tablename (columnname1, columnname2) values('value1', 'value2');
To update a line
update tablename set columnname1 = 'value1', columname2 = 'value2' where columnname1 = 'thelinetoupdate'
THAT is a beginners guide. I don't know what the other 833 1/2 pages have... Sure some people consider all the different joins to be "beginner" but I'd call that stuff intermediate.
Travis
We keep our phone lists in text files and edit 'em with vi.
I have seen MySQL programmers do massively inefficient (and stupid) things like retrieve a list of keys from one table, store them in an in-memory array, then loop through the array executing a select for each key in another table - because they didn't know about subselects.
And I have seen Oracle programmers cursor through data and/or use sub-selects, because they don't have a good understanding of what you can do with JOIN or GROUP BY.
The point is that all invocations of SQL have their idiosynracies/extensions, and getting to know them is part of the game. MySQL is as good a place to start as any. There is no right answer here.
I'm gonna make this server squeel like a pig.
There is nothing so silly as other peoples traditions, and nothing so sacred as our own.
Heh, Windows is called Windows, as in "Windowing System" - not much better than "Operating System" if you ask me.
sic transit gloria mundi
Stroustrup? Catch a Dane, make him SQueaL! *Cough*. Actually, it's something like Strowstrup.
.au floating around with mr Torvalds himself pronouncing it?
Apropos Bjarne, most Scandinavians I've met say S-Q-L, I've _never_ heard anyone call it sequel.
As to Linux, isn't there a
IBM had a language QUEL which stood for something, the successor was naturally called SEQUEL but the name could not be used for copyright reasons so the vowels were dropped. This is why SQL is pronounced sequel and no it does not stand for Structured Query Language.
--- Nukes don't kill people psychopathic megalomaniacs do.
"You can easily spot a hardcore elite database guru by the fact that these people pronounce it "squirrel". "
Haha, that's mean. Planting fake little facts like that to weed out the people who read slashdot and the jargon file and try to sound all cool by using the terminology.
Hardcore elite hackers also call OS/370 'ocelot' too. And the nerd term for Apple is actually 'Fuji', or 'Granny Smith' if you're from Washington.
(disclaimer: I have no idea if SQL is pronounced as squirrel or not, it's just a joke)
Ok, I've never said 'sequel' (like Star Wars ep. 2 is a sequel to ep. 1, both of which are prequils to eps. 4, 5 and 6). It's just S.Q.L. (you don't say issssbnn for ISBN).
.. just my opinions :)
Anyhow
Year, right. Next after 5000 hours. Even professional SQL programmers keep doing serious mistakes in sub-queries. Not only in performance optimization area (waiting for results forever), but also in consistency are (getting unexpected result sets).
When you have 2-3 tables with 1-2 foreign keys than you may learn sub-queries in 12 hours. But when you do a very specific data mining work, combining several huge historical journals, several classification graphs, lots of assotiation maps and many lots of lookup tables, then you might realize that you still have to learn SQL even after 5000 hours of using it. If you don't think so, then you've never done any serious data mining by yourself. I spoke with many SQL programmers who worked with ERP, CRM and Supply-Chain applications and they had the same opinion.
Less is more !
thank you !
I was waiting for someone to point out that the given example of a subselect is really just a simple join. That's really just SQL 101. Now, there are cases for subselects, but they do get hairy.
btw - middle tier all the way - what do you do in sql when you want to say, check db value a, based on return of C function b? run home to mom that's what.
middle tier promotes code re-use, but it also promotes a _logical_ data schema over the _physical_ data schema which is exactly what putting logic in things like triggers and such in does not do.
I would have to agree that this is definitely a book for newcomers. I am new to SQL and I can say that the examples and the index will make anything you need to find/do very easy, especially when I am trying to get my homework done right before it's due. :)
The reviewer hits it right on the nose when he says the book should be renamed SQL Fundamentals: Applied to Oracle and Access (or something like that). This isn't necessarily a bad thing,though. Used in an academic setting (where schools would most likely use Oracle or MS Access) or at home (where most people run Windows with Office installed), you get the most for you value.
If you want a book that covers MySQL (or a different version) so that you can read and use it, chances are that you already know how to install, set up, and configure it. While that may describe the majority of /. readers, it doesn't come close to and every day joe schmoe users.
I work for a publishing company, and believe me, we all say "izbin" for ISBN all the time. I also go back and forth between ess-que-ell and sequel, depending on my mood.
I'm not an actor, but I play one on tv.
Having redundant, or seemingly ludicrous table structures can sometimes be the fault of client specs changing under a programmer/designer's feet.
;-)
I recently completed an app to handle load allocations for a haulage company. A weeks worth of deliveries are emailed over every Saturday, the app sucks it in and populates the db, then makes descisions based upon vehicle availability, capacity etc etc. This was all well and good UNTIL the supplier started reusing distribution point IDs as they changed! So one week we would have ID 65536 holding details for Fred Bloggs, the next, ID 65536 would be Joe Smith. This brilliant idea of reusing IDs was never mentioned, and only appeared after 2 months had passed and problems arose with deliveries appearing at the wrong addresses!
When asked why they did this, the reply was "we just do it that way"?! Needless to say, since the distributor IDs were the foreign key for orders, which were in turn linked to delivery items, and also to the vehicles used for delivery, this lead to some "creative" changes in the db (now delivery points have the id plus another "version" id which doesn't help efficiency all that much, and must look ridiculous to anyone else viewing the code).
Then there was the fact the haulage company wanted to be able to "squeeze" extra items into a vehicle after specifying its maximum capacity - and then asking me why the app wouldn't allow it - oh and also they often wanted to be able to route large vehicles to locations marked as "inaccesible" for that vehicle - which kind of screwed up the routing logic... In fact, just thinking about that project brings tears to my eyes
Code, Hardware, stuff like that.
you will see the light, rebel, tell Oracle et al to go screw, and help develop some nice good Open Source alternative to the crappy SQL language.
The people you mention are very good preaching, but very bad providing a working alternative. Telling other people to do stuff is not the free software way.
... but when you're developing for a highly-scalable database, you want to wring out as much performance as possible. And that means accepting the fact that if you dump all of your application logic into the middle tier, you'll be sacrificing some potential performance gains for portability.
I also think it's foolish to code all of your stuff to be 100% portable between different databases, since each RDBMS has its own set of customized extensions / improvements. Why would you sacrifice the potential performance of your app just so you can port stuff between SQL Server and Oracle easily, unless you're planning to go back-and-forth between the two?
Your mom is an idiot for repeating such ignorance. You are an idiot for taking up to 20 minutes (?!) to figure out if she's talking about her OS, word processor, or mail program.
Beg to differ. Here in the world of books, "izbin" is the common pronunciation - saying "eye-ess-bee-enn" confirms you to be a newbie.
No, Thursday's out. How about never - is never good for you?
Sure, this book will help you learn SQL syntax (maybe they ought to have named it "SQL-Primer Plus") and elucidate the schemas found in your favorite LAMP (linux, apache, mysql, perl/php/python) guides, but how will this help teach people the fundamentals of good database design? Sounds like this book will just churn out even more people who can just add "I know SQL and how to build databases" to their resume even though they will give you a blank stare when you ask about normalization. Like how using MySQL for 'learning' purposes leads to bad habits, I fear that this book might also promote loose discipline in web-based-database-applications. If I am contracting someone to build me an ecommerce site and know they have read this book, they won't be hired.
In the coming months I am going to need to learn SQL, in particular, for use with MS SQL (as well the Oracle product). Does anyone have any suggestions for good books for using MS SQL? I am very new to SQL, so this should be an introductory text.
No need to respond to my linux or bjarne comment, I was joking, I've heard the pronunciations, please, stop :)
SEQUEL is indeed Structured English QUEry Language, which was invented by IBM back in the 70's as the query language for their relational database System/R. But it did go somewhere: into the public domain, where the acronym was shortened to SQL.
Its success is as much attributeable to Relational Software Inc. as IBM (who continued to use it in System/R's followup SQL/Data System, and SQL/DS's successor DB2), as Relational Software chose it as the query language for their fledgling RDBMS, which you may have heard of - ORACLE
As it became apparent that SQL was here to stay, ANSI created a standard definition (the first of which was SQL-89). Today's SQL standard is based mostly on IBM's implementation, with a good few substantial additions.
So as I understand it, SQL is not really something different to SEQUEL, it's just a newer evolution.
Oh, and back on topic, here's an excellent online introduction to SQL by James Hoffman. I'd also recommend checking out the Google Directory's SQL FAQs, Help, and Tutorials.
Cheers,
For beginners, I always recommend "SQL Queries for Mere Mortals" by Hernandez. Easy to understand and follow.
Madness takes its toll...
From The "You Say Tomatoe..." Dept:
Maybe it's the Southern boy in me, but does anyone else pronounce it see-kwuhl and not see-kwell?
"The forecast for tonight is dark, with widely scattered light in the morning."
I would vote for SQLCourse.com as the easiest way to get started in SQL.
:).
:-)
:-)
After it I had to read 4 other books, but that is the site that I refer all people who ask me about SQL. Simple, enjoyable, and hands-on practice.
Since I was a moderator, I am posting as a logged out AC (my points are used up
Anyhow sqlcourse.com, "Database design for mere mortals", "PHP & MySQL development" (on Sams), and "SQL Server 2000 Developer Guide" is all that I needed to learn database programming. For the Enterprise-inclined, I'd recommend "Instant SQL Server 2000 Applications". mySQL is OK for beginning programming in SQL. One quickly enough outgrows its capabilities.
As far as Access goes, here's a not-so-obvious shortcut to its SQL interface.
Open a database, go to Query, create query in design mode, right below the file menu is a button that looks either like a grid, or a triangle. If you click it, the last choice in the pull down menu is SQL.
Select at will
I will also argue that Access 2002 (XP) uses MSDE as its engine, so the user has an excellent environment to work with. MDB format is bad, MSDE is nice as it's simply an embedded edition of SQL Server 2000.
These are good resources.
As long as someone tries to stick to ANSI-compliant SQL, it's nothing too difficult.
For someone who understands relational theory tools such as Access Visual Query and Datanamic's DeZign for Databases greatly simplify their life.
Lastly, using Safari saves quite a bit on books too.
No affiliate links were used in this message.
Leonid S. Knyshov
middle tier promotes code re-use, but it also promotes a _logical_ data schema over the _physical_ data schema which is exactly what putting logic in things like triggers and such in does not do.
Let's say you want to access the same group of tables from multiple places in your application, in different objects running on different hosts written by different people, and you don't have source to some of them. You've got 3 choices:
Option 1 is just silly - impossible to maintain for all but the most trivial cases. Option 2 adds an additional layer of indirection, hitting performance, it's another layer to test and another point of failure in production, and it's functionally the same as a trigger anyway. Or pick option 3, which has been refined over 2-3 decades in some of the toughest transactional processing apps in the world, keeps all you code in one place, and guarantees integrity even if you can't in your objects.
As an experienced system architect, one of the mistakes I see newbies make all the time is that they think because their tiers are logically distinct, they have to be physically distinct too. In a professional shop, your logical design will be done by a theoretician who doesn't even know or care what the eventual platform will look like, then the physical design is done by a hardcore, grey-haired DBA who's been there and done that on a dozen major projects. The programmers who actually implement it almost always don't see the big picture, because they're the specialists that focus on their own personal bits of the code.
> [schnip] and you don't have source to some of them.
if I don't have the source to applications that are accessing my database, then I'm in pretty big trouble. not having the source means I don't trust the app, and at that point it's like having a wide open door to your db. Sure you could play catch up with some triggers and such, but really, you're already in a bit of a mess aren't you?
Let's assume a reasonable environment though, we're you're building an app, and have control over the source. So - if twenty apps update 5 tables, then which sounds better - leave the database wide open and assume they can be updating it any which way, biting your nails worrying about a data integrity problem (like - maybe application a updates column a in one way and application b does it in another) or put the update code in one place, such that all applications go through the same api.
Preferably this api is a middle ware api, but it could just be an object to, middle ware is easier to maintain, but perhaps has more up front infrastructure.
As far as performance goes, that's just total bullshit. If anything, moving the core integrity checking off to another host, and freeing you're database server to do record management only will speed things up. Further, if reads and writes are funneled through a correct api you only need to change one set of code once when you want to change database schemas, which you _will_ want to do. Business requirements change, tables need to be added.
btw - in you're description of what 'professionals' do, how do the programers ever know of the logical data model if they are hitting the physical data directly?
Why not download MySQL AB's own manual? It is good.
A 834 page book is not a beginners book. This
books really was'nt worth getting a review posted
here. There are plenty of online SQL tutorials
to get started.
It should be pronounced SEQUEL instead of spelled S-Q-L because you save one syllable that way and I'm a lazy freakin' sod.
From my experience consulting ... I discovered that 80% of the Database pros (those actually in the field) have a very weak database foundation.
And worst of all they tend to be arrogant.
a bad combination
So many clueless Database programmers, DBAs, & Instructors from all camps,(Even Oracle!),generally don't understand/appreciate the science behind database theory, don't fully understand the standard, confuse vendor extensions and quarks for the standard.
It's a sad scary state of affairs out in the field.
Many don't grasp basic principles like the cardinal rule: "Thy shall maintain Data integrity at all times".
The guys at work bet me that I was wrong.
So we decided to have a poll, silently quizing every expert we came across for 6 months.
So far (5 months later) the numbers indicate 90% of the the gurus don't know much.
Please before you master any DBMS product learn the standard practices & principles of handling data.
You don't even have to study E. F. CODD's papers.
Another handy resource: Database: Principles, Programming, Performance by Patrick O'Neil, Elizabeth O'Neil & Jim Gray (Editor)
Re. SQL + design, the best literature I've read on the topic is the documentation published by informix (now IBM). Obviously some of it is informix specific but the publication below is definitely worth reading regardless of what DB you use. It contains an excellent chapter on design. You can get the book in PDF from IBM Here
The general list of docs are Here
Elmasri & Navathe
A book that I found very helpful for learning SQL is Sams Teach Yourself SQL in 10 Minutes. When I first started learning SQL I mostly got everything from the early Slashcode sources and the MySQL manual as I needed it - not the best way to learn :-). I was a bit skeptical about the "10 minutes" approach, but each of the chapters actually did work out to about 10 minutes and the information was easy to understand (may have helped that I already knew some about SQL) and was fairly thorough. Another point that I really liked about it is that for the most part it only talked about the SQL standard, not just how one vendor implemented it. However, if an important vendor differed in their implementation, they would talk about it. This worked out great for me because I just wanted to know SQL basics and "best practices" and could figure out vendor specifics from their manuals.
btw, can someone tell me what the heck postgres means? or where it comes from? thanks
Large print giveth, and the small print taketh away
I just wanted to say hello to all the people linking from the future! HELLO!