• Complain

Date - SQL and relational theory: how to write accurate SQL code

Here you can read online Date - SQL and relational theory: how to write accurate SQL code full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. City: Sebastopol, CA, year: 2011, publisher: OReilly Media, genre: Romance novel. 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.

Date SQL and relational theory: how to write accurate SQL code
  • Book:
    SQL and relational theory: how to write accurate SQL code
  • Author:
  • Publisher:
    OReilly Media
  • Genre:
  • Year:
    2011
  • City:
    Sebastopol, CA
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

SQL and relational theory: how to write accurate SQL code: summary, description and annotation

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

SQL is full of difficulties and traps for the unwary. You can avoid them if you understand relational theory, but only if you know how to put the theory into practice. In this insightful book, author C.J. Date explains relational theory in depth, and demonstrates through numerous examples and exercises how you can apply it directly to your use of SQL. This second edition includes new material on recursive queries, missing information without nulls, new update operators, and topics such as aggregate operators, grouping and ungrouping, and view updating. If you have a modest-to-advanced background in SQL, youll learn how to deal with a host of common SQL dilemmas. Why is proper column naming so important? Nulls in your database are causing you to get wrong answers. Why? What can you do about it? Is it possible to write an SQL query to find employees who have never been in the same department for more than six months at a time? SQL supports quantified comparisons, but theyre better avoided. Why? How do you avoid them? Constraints are crucially important, but most SQL products dont support them properly. What can you do to resolve this situation? Database theory and practice have evolved since the relational model was developed more than 40 years ago. SQL and Relational Theory draws on decades of research to present the most up-to-date treatment of SQL available. C.J. Date has a stature that is unique within the database industry. A prolific writer well known for the bestselling textbook An Introduction to Database Systems (Addison-Wesley), he has an exceptionally clear style when writing about complex principles and theory. Read more...
Abstract: SQL is full of difficulties and traps for the unwary. Understanding relational theory is essential for avoiding those traps, but you need to know how to map the ideas of that theory into SQL code. In SQL and Relational Theory, author C.J. Date demonstrates how you can apply relational theory directly to your use of SQL. Read more...

SQL and relational theory: how to write accurate SQL code — 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 and relational theory: how to write accurate SQL code" 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 and Relational Theory
C.J. Date
Published by OReilly Media

Beijing Cambridge Farnham Kln Sebastopol Tokyo Dedication Those who are - photo 1

Beijing Cambridge Farnham Kln Sebastopol Tokyo

Dedication

Those who are enamored of practice without theory are like a pilot who goes into a ship without rudder or compass and never has any certainty where he is going Practice should always be based upon a sound knowledge of theory .

Leonardo da Vinci (14521519)

The trouble with people is not that they dont know but that they know so much that aint so .

Josh Billings (18181885)

Languages die... mathematical ideas do not .

G. H. Hardy (18771947)

Unfortunately, the gap between theory and practice is not as wide in theory as it is in practice .

Anon.

These are my principles. If you dont like them, I have others .

Groucho Marx (18901977)

There is no royal road to geometry .

Euclid (c. 365275 BCE), attrib.

To all those who think an exercise like this one is worthwhile, and in particular to the memory of Lex de Haan, who is very much missed

SPECIAL OFFER: Upgrade this ebook with OReilly

for more information on this offer!

Please note that upgrade offers are not available from sample content.

Preface to the First Edition

SQL is ubiquitous. But SQL is hard to use: Its complicated, confusing, and error prone (much more so, I venture to suggest, than its apologists would have you believe). In order to have any hope of writing SQL code that you can be sure is accurate, thereforemeaning it does exactly what its supposed to do, no more and no lessyou must follow some appropriate discipline. And its the thesis of this book that using SQL relationally is the discipline you need. But what does this mean? Isnt SQL relational anyway?

Well, its true that SQL is the standard language for use with relational databasesbut that fact in itself doesnt make it relational. The sad truth is, SQL departs from relational theory in all too many ways; duplicate rows and nulls are two obvious examples, but theyre not the only ones. As a consequence, the language gives you rope to hang yourself with, as it were. So if you dont want to hang yourself, you need to understand relational theory (what it is and why); you need to know about SQLs departures from that theory; and you need to know how to avoid the problems they can cause. In a word, you need to use SQL relationally. Then you can behave as if SQL truly were relational, and you can enjoy the benefits of working with what is, in effect, a truly relational system.

Now, a book like this wouldnt be needed if everyone was using SQL relationally alreadybut they arent. On the contrary, I observe much bad practice in current SQL usage. I even observe such practice being recommended, in textbooks and similar publications, by writers who really ought to know better (no names, no pack drill); in fact, a review of the literature in this regard is a pretty dispiriting exercise. The relational model first saw the light of day in 1969, and yet here we are, over 40 years later, and it still doesnt seem to be very well understood by the database community at large. Partly for such reasons, this book uses the relational model itself as an organizing principle; it explains various features of the model in depth, and shows in every case how best to use SQL in order to comply with the feature in question.

Prerequisites

I assume youre a database practitioner and therefore reasonably familiar with SQL already. To be specific, I assume you have a working knowledge of either the SQL standard or (perhaps more likely in practice) at least one SQL product. However, I dont assume you have a deep knowledge of relational theory as such (though I do hope you understand that the relational model is a good thing in general, and adherence to it wherever possible is a desirable goal). In order to avoid misunderstandings, therefore, Ill be describing various features of the relational model in detail, as well as showing how to use SQL to conform to those features. But what I wont do is attempt to justify all of those features; rather, Ill assume youre sufficiently experienced in database matters to understand why, e.g., the notion of a key makes sense, or why you sometimes need to do a join, or why many to many relationships need to be supported. (If I were to include such justifications, this would be a very different bookquite apart from anything else, it would be much bigger than it already isand in any case, that book has already been written.)

Ive said I expect you to be reasonably familiar with SQL. However, I should add that Ill be explaining certain aspects of SQL in detail anywayespecially aspects that might be encountered less frequently in practice. (The SQL notion of possibly nondeterministic expressions is a case in point here. See .)

Database in Depth

This book is based on, and intended to replace, an earlier one with the title Database in Depth: Relational Theory for Practitioners (OReilly Media Inc., 2005). My aim in that earlier book was as follows (this is a quote from the preface):

After many years working in the database community in various capacities, Ive come to realize theres a real need for a book for practitioners (not novices) that explains the basic principles of relational theory in a way not tainted by the quirks and peculiarities of existing products, commercial practice, or the SQL standard. I wrote this book to fill that need. My intended audience is thus experienced database practitioners who are honest enough to admit they dont understand the theory underlying their own field as well as they might, or should. That theory is, of course, the relational modeland while its true that the fundamental ideas of that theory are all quite simple, its also true that theyre widely misrepresented, or underappreciated, or both. Often, in fact, they dont seem to be understood at all. For example, here are a few relational questions ... How many of them can you answer?[]

  1. What exactly is first normal form?

  2. Whats the connection between relations and predicates?

  3. Whats semantic optimization?

  4. Whats an image relation?

  5. Why is semidifference important?

  6. Why doesnt deferred integrity checking make sense?

  7. Whats a relation variable?

  8. Whats prenex normal form?

  9. Can a relation have an attribute whose values are relations?

  10. Is SQL relationally complete?

  11. Why is The Information Principle important?

  12. How does XML fit with the relational model?

    This book provides answers to these and many related questions. Overall, its meant to help database practitioners understand relational theory in depth and make good use of that understanding in their professional day-to-day activities.

As the final sentence in this extract indicates, it was my hope that readers of that book would be able to apply its ideas for themselves, without further assistance from me as it were. But Ive since come to realize that, contrary to popular opinion, SQL is such a difficult language that it can be far from obvious how to use it without violating relational principles. I therefore decided to expand the original book to include explicit, concrete advice on exactly that issue (how to use SQL relationally, I mean). So my aim in the present book is still the same as beforeI want to help database practitioners understand relational theory in depth and make good use of that understanding in their professional activitiesbut Ive tried to make the material a little easier to digest, perhaps, and certainly easier to apply. In other words, Ive included a great deal of SQL-specific material (and its this fact, more than anything else, that accounts for the increase in size over the previous book).

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «SQL and relational theory: how to write accurate SQL code»

Look at similar books to SQL and relational theory: how to write accurate SQL code. 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 and relational theory: how to write accurate SQL code»

Discussion, reviews of the book SQL and relational theory: how to write accurate SQL code 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.