• Complain

Bill Karwin - SQL Antipatterns: Avoiding the Pitfalls of Database Programming

Here you can read online Bill Karwin - SQL Antipatterns: Avoiding the Pitfalls of Database Programming full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2010, publisher: Pragmatic Bookshelf, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

No cover
  • Book:
    SQL Antipatterns: Avoiding the Pitfalls of Database Programming
  • Author:
  • Publisher:
    Pragmatic Bookshelf
  • Genre:
  • Year:
    2010
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

SQL Antipatterns: Avoiding the Pitfalls of Database Programming: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "SQL Antipatterns: Avoiding the Pitfalls of Database Programming" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Bill Karwin: author's other books


Who wrote SQL Antipatterns: Avoiding the Pitfalls of Database Programming? Find out the surname, the name of the author of the book and a list of all author's works by series.

SQL Antipatterns: Avoiding the Pitfalls of Database Programming — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "SQL Antipatterns: Avoiding the Pitfalls of Database Programming" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
SQL Antipatterns Avoiding the Pitfalls of Database Programming Bill Karwin - photo 1
SQL Antipatterns
Avoiding the Pitfalls of Database Programming
Bill Karwin
Version: P1.0 (May 2010)

Copyright (c) 2010, The Pragmatic Bookshelf. This book is licensed to the individual who purchased it. We don't copy-protect it because that would limit your ability to use it for your own purposes. Please don't break this trust--don't allow others to use your copy of the book. Thanks.
-- Dave & Andy.

Table of Contents
    IntroductionLogical Database Design Antipatterns
      JaywalkingNaive TreesID RequiredKeyless EntryEntity-Attribute-ValuePolymorphic AssociationsMulticolumn AttributesMetadata Tribbles
    Physical Database Design Antipatterns
      Rounding Errors31 FlavorsPhantom FilesIndex Shotgun
    Query Antipatterns
      Fear of the UnknownAmbiguous GroupsRandom SelectionPoor Man's Search EngineSpaghetti QueryImplicit Columns
    Application Development Antipatterns
      Readable PasswordsSQL InjectionPseudokey Neat-FreakSee No EvilDiplomatic ImmunityMagic Beans
    Appendixes
      Rules of NormalizationBibliography

Copyright (c) 2010, The Pragmatic Bookshelf.
Chapter 1
Introduction



An expert is a person who has made all the mistakes that can be made in a very narrow field.

Niels Bohr

I turned down my first SQL job.

Shortly after I finished my college degree in computer and information science at the University of California, I was approached by a manager who worked at the university and knew me through campus activities. He had his own software startup company on the side that was developing a database management system portable between various UNIX platforms using shell scripts and related tools such as awk (at this time, modern dynamic languages like Ruby, Python, PHP, and even Perl weren't popular yet). The manager approached me because he needed a programmer to write the code to recognize and execute a limited version of the SQL language.

He said, "I don't need to support the full language---that would be too much work. I need only one SQL statement: SELECT."

I hadn't been taught SQL in school. Databases weren't as ubiquitous as they are today, and open source brands like MySQL and PostgreSQL didn't exist yet. But I had developed complete applications in shell, and I knew something about parsers, having done projects in classes like compiler design and computational linguistics. So, I thought about taking the job. How hard could it be to parse a single statement of a specialized language like SQL?

I found a reference for SQL and noticed immediately that this was a different sort of language from those that support statements like if and while, variable assignments and expressions, and perhaps functions. To call SELECT only one statement in that language is like calling an engine only one part of an automobile. Both sentences are literally true, but they certainly belie the complexity and depth of their subjects. To support execution of that single SQL statement, I realized I would have to develop all the code for a fully functional relational database management system and query engine.

I declined this opportunity to code an SQL parser and RDBMS engine in shell script. The manager underrepresented the scope of his project, perhaps because he didn't understand what an RDBMS does.

My early experience with SQL seems to be a common one for software developers, even those who have a college degree in computer science. Most people are self-taught in SQL, learning it out of self-defense when they find themselves working on a project that requires it, instead of studying it explicitly as they would most programming languages. Regardless of whether the person is a hobbyist or a professional programmer or an accomplished researcher with a PhD, SQL seems to be a software skill that programmers learn without training.

Once I learned something about SQL, I was surprised how different it is from procedural programming languages such as C, Pascal, and shell, or object-oriented languages like C++, Java, Ruby, or Python. SQL is a declarative programming language like LISP, Haskell, or XSLT. SQL uses sets as a fundamental data structure, while object-oriented languages use objects. Traditionally trained software developers are turned off by this so-called impedance mismatch , so many programmers are drawn to object-oriented libraries to avoid learning how to use SQL effectively.

Since 1992, I've worked with SQL a lot. I've used it when developing applications, I've provided technical support and developed training and documentation for the InterBase RDBMS product, and I've developed libraries for SQL programming in Perl and PHP. I've answered thousands of questions on Internet mailing lists and newsgroups. I see a lot of repeat business---frequently asked questions that show that software developers make the same mistakes over and over again.

Who This Book Is For

I'm writing SQL Antipatterns for software developers who need to use SQL so I can help you use the language more effectively. It doesn't matter whether you're a beginner or a seasoned professional. I've talked to people of all levels of experience who would benefit from the subjects in this book.

You may have read a reference on SQL syntax. Now you know all the clauses of a SELECT statement, and you can get some work done. Gradually, you may increase your SQL skills by inspecting other applications and reading articles. But how can you tell good examples from bad examples? How can you be sure you're learning best practices, instead of yet another way to paint yourself into a corner?

You may find some topics in SQL Antipatterns that are well-known to you. You'll see new ways of looking at the problems, even if you're already aware of the solutions. It's good to confirm and reinforce your good practices by reviewing widespread programmer misconceptions. Other topics may be new to you. I hope you can improve your SQL programming habits by reading them.

If you are a trained database administrator, you may already know the best ways to avoid the SQL pitfalls described in this book. This book can help you by introducing you to the perspective of software developers. It's not uncommon for the relationship between developers and DBAs to be contentious, but mutual respect and teamwork can help us to work together more effectively. Use SQL Antipatterns to help explain good practices to the software developers you work with and the consequences of straying from that path.

What's in This Book

What is an antipattern? An antipattern is a technique that is intended to solve a problem but that often leads to other problems. An antipattern is practiced widely in different ways, but with a thread of commonality. People may come up with an idea that fits an antipattern independently or with help from a colleague, a book, or an article. Many antipatterns of object-oriented software design and project management are documented at the Portland Pattern Repository,

by William J. Brown et al.

SQL Antipatterns describes the most frequently made missteps I've seen people naively make while using SQL as I've talked to them in technical support and training sessions, worked alongside them developing software, and answered their questions on Internet forums. Many of these blunders I've made myself; there's no better teacher than spending many hours late at night making up for one's own errors.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «SQL Antipatterns: Avoiding the Pitfalls of Database Programming»

Look at similar books to SQL Antipatterns: Avoiding the Pitfalls of Database Programming. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «SQL Antipatterns: Avoiding the Pitfalls of Database Programming»

Discussion, reviews of the book SQL Antipatterns: Avoiding the Pitfalls of Database Programming and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.