On Tue, Jul 09, 2013 at 11:22:35PM +0200, Stephan Beal scratched on the wall:
> On Tue, Jul 9, 2013 at 7:24 PM, Paolo Bolzoni <paolo.bolzoni.br...@gmail.com
> > wrote:
> 
> > I am sorry the part that look Greek to you is actually fairly
> > important base of the theory behind SQL, the relational algebra.
> 
> Bad news for me ;), but you've given me a new search term: relational
> algebra.

  I really wanted to put a chapter on the Relational Model into "Using
  SQLite", but there just wasn't room.  The book went way over its
  page budget as it was.


  To jump start your searches a bit...  Modern "relational databases" are
  called that because SQL is based off something called the Relational
  Model.  The Relational Model is a formal mathematical system that
  combines Set Theory with information management.  It is a "formal
  system" in the sense that it has rigid mathematical proofs, theorems,
  and all that kind of stuff.  It was first defined in a 1969 IBM paper
  written by E.F. Codd.

  There are two mathematical systems that can be used to define and prove
  the self-consistency of the Relational Model.  One system is called
  "Relational Algebra" and the other "Relational Calculus."  The two
  systems start from slightly different base assumptions, and allow
  slightly different types of proofs, but you can more or less prove
  all of the Relational Model using either system.

  Unless you actually want postulate theorems or do proofs, the details
  of Relational Algebra and Relational Calculus aren't that important.
  If you trust that some very smart people did their math correctly,
  you can just trust that the proofs work out.  What is useful and
  important is understanding the Relational Model itself, which gives
  you a much better idea of the fundamental operations behind SQL
  statements, as well as stuff like the Normal Forms and the theory
  behind them.

  I would argue, strongly, that DBAs and database developers that have
  a solid understanding of the Relational Model are much better at what
  they do.  SQL is not purely Relational-- in fact, there are a lot of
  differences-- but having a strong grounding in the Relational Model
  will make you a better SQL developer.

  In a sense, the difference between the Relational Model and SQL is
  like the difference between Object Oriented Programming theory, and
  C++.  If you learn C++, especially from a strictly syntax standpoint,
  you'll pick up a bit on object oriented programming, but you won't
  really *know* OOP.  Similarly, even if you're an expert C++ developer,
  if C++ is you're only OOP language, you still don't really get what
  clean OOP is all about (because C++ sure as heck isn't that, even if
  it is a darn useful language).  So it is with SQL-- darn useful, but
  not quite what the theory is about, and a very foggy glass to try to
  learn the theory through.

  If you want to learn more about the theory and concepts behind SQL, I
  would strongly recommend these two books:

    SQL and Relational Theory (2nd Ed) by C.J. Date
    http://shop.oreilly.com/product/0636920022879.do

    Relational Theory for Computer Professionals by C.J. Date
    http://shop.oreilly.com/product/0636920029649.do

  They'll get into some details about the theory, but not to the point
  of actual algebra or Greek math symbols to define the theory.  I
  found them extremely useful in better understanding what I was trying
  to express in SQL, and how to write better, more direct SQL (and
  better database design).

  C.J. Date was one of the people that worked with E.F. Codd to refine
  the whole concept of modern database.  He has some very strong views,
  some of which I don't agree with, but he's a very good writer and
  presenter.  He's also a very, very theory heavy guy that tends to put
  elegance and theory before any practical concern-- which is great for
  research and teaching, but less useful for getting stuff done by a
  deadline.  Still, in the last eight years or so he has visibly
  shifted his stance from something of a "SQL sux and must die" point
  of view to a more relaxed "since you're going to work in SQL anyways,
  you may as well do it right."  And *that* I can agree with.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to