Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming Books Media Book Reviews IT Technology

SQL Fundamentals 233

Slashdot's own Robo takes a look at SQL Fundamentals, writing "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 a 834-page beginners look at the application of SQL to Access and Oracle. Read more for SQL Fundamentals' strengths, weaknesses and everything in-between."
SQL Fundamentals
author John Patrick
pages 800
publisher Pearson Education
rating 7
reviewer Rob ("robo") Oostendorp
ISBN 0130669474
summary Truly a beginner friendly book for anyone needing a crash course in the basics of SQL; of limited but real use to those who already are familiar with SQL.

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 discussion has been archived. No new comments can be posted.

SQL Fundamentals

Comments Filter:
  • by johnalex ( 147270 ) on Wednesday November 06, 2002 @12:09PM (#4608237) Homepage
    If you need to expand your SQL to include PostgreSQL, try:

    PostgreSQL: Introduction and Concepts [postgresql.org] by Bruce Momjian

    Practical PostgreSQL, by Command Prompt, Inc. [commandprompt.com] 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.
  • by Anonymous Coward on Wednesday November 06, 2002 @12:09PM (#4608241)
    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.
  • by glwtta ( 532858 ) on Wednesday November 06, 2002 @12:13PM (#4608284) Homepage
    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)
  • For More Advanced... (Score:5, Informative)

    by glenstar ( 569572 ) on Wednesday November 06, 2002 @12:22PM (#4608385)
    For the more advanced, I *personally* would recommend Joe Celko's SQL for Smarties [amazon.com]. Celko is a rather bizarre character, but there is no problem that he cannot solve using ANSI92 SQL. None.

    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 [amazon.com].

  • Re:834 pages?! (Score:3, Informative)

    by Abcd1234 ( 188840 ) on Wednesday November 06, 2002 @12:40PM (#4608546) Homepage
    Just a note, the whole point of SQL is that it's a *declarative* language. The addition of an if-then-else construct completely breaks that model, producing something which is sort-of-but-not-quite procedural. ie, PL-SQL and similar variants. So, no, of course ANSI SQL doesn't have an if-then-else construct... it was never meant to!
  • by SailorBob ( 146385 ) on Wednesday November 06, 2002 @12:53PM (#4608674) Homepage Journal
    Try The Practical SQL Handbook: Using SQL Variants [amazon.com]. It's much shorter at 450 pages and is a very good book for the person just learning SQL and databases.
  • Re:SQL (Score:2, Informative)

    by HunkyBrewster ( 578901 ) on Wednesday November 06, 2002 @01:25PM (#4609020)
    You would be much better off starting with an introduction to relational database theory. (Notice I did *NOT* say SQL database theory.)

    I have found http://www.dbdebunk.com/ [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.

  • by SPiKe ( 19306 ) on Wednesday November 06, 2002 @01:32PM (#4609085)
    Yes, but Celko's examples tedn to shoot off in the acamedic (read: features not implemented by any vendor).

    If one wants a fairly good book on SQL (though oriented towards T-SQL, and a lot towards Microsoft), Ken Henderson's "The Guru's Guide to Transact-SQL" is good. Ken also lists Celko as one of his major influences.
  • Re:SQL (Score:4, Informative)

    by pnatural ( 59329 ) on Wednesday November 06, 2002 @03:28PM (#4610361)
    No, no, no... how do I say this? NO!

    The OP is completely correct: triggers and such are rubbish (except to enforce data integrity when the integral RDBMS mechanisms cannot). DBs are for storage, period. You claim that a DB is a great place to shoe horn logic, but that leads to problems.

    1. The bloat is in a functional-programming layer (SQL) instead of a procedural/OO layer. Given a choice between lotsa logic down in a DB and lotsa logic in my app, I'll take the logic in my app any day of the week. SQL does not promote code reuse, whereas most procedural and OO languages do promote it to some degree.

    2. The more code you put in a DB, the less portable your schema is -- and I'm not talking about platform portability, I'm talking about RDBMS portability. Nothing is worse than [IBM|MS|ORA] database lock-in.

    3. The poor performance you site may be common in your experience, but code in the middle layer(s) is not the cause of that: bad design and poor testing are the causes. Don't confuse correlation with causation.

    These points are backed with experience: I've been programming for 15 years, 7 years of that using databases heavily. The company I work for now has terabytes of data stored in the schemas I've developed for my apps, and no one has ever complained about maintenance or performance on one of my designs.
  • by Anonymous Coward on Wednesday November 06, 2002 @05:47PM (#4611784)
    I would vote for SQLCourse.com [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 [informit.com] saves quite a bit on books too.

    No affiliate links were used in this message. :-)

    Leonid S. Knyshov
  • Re:Anyone Know? (Score:1, Informative)

    by Anonymous Coward on Thursday November 07, 2002 @01:43AM (#4614754)
    It is pronounced Es-Que-eL.
    I am serious, that is how it is REALLY pronounced. I have also noticed that most of the people from the Windows world incorrectly refer to it as Sequel, while most people from the *nix world refer to its proper name Es-Que-eL.
    Not that its all that big a deal or anything it is just aa trend that I have noticed.

There are two ways to write error-free programs; only the third one works.

Working...