I'M new to SQL and I'M reading the book "Simply SQL". I'M running Ubuntu Linux and I downloaded MySQL Workbench. I also downloaded the source .sql files for the book. I need some help getting started. How do I get the files into Workbench so I can follow along with the book? There are a lot of options upon start up. New Connection, Create New EER, Create EER Model form Existing Database, New Server Instance, etc. Thanks for any and all replies.
Congratulations that you started to learn SQL from this great book Simply SQL written by my friend Rudy Limeback! This is the finest book for beginners I ever read. Clearly and precisely written, covering all important aspects of (DML-) SQL, contains a wealth of useful examples and tips, thoroughly founded on Rudys comprehensive experiences on database field.
Yes, it is "The fun and easy way to learn best-practice SQL".
I am sure that Rudy will add a small chapter on DDL-SQL to the next edition, the only very little SQL-part I am really missing from his wonderful book.
As for MySQL workbench you have already downloaded, assuming you have installed Ubuntu 10.04 (lucid) then workbench version must be 5.1.xx which does not have integrated Query SQL broswer to execute simple SQL statement like SELECT * FROM ... nor it has mysql administration functionality. However, it is possible to build version 5.2, which contains query and admin, from the sources. I have tested 5.2 new functionalities and in my opinion it is still in a very beta state. Of course, it is a good tool for designing kind of entity relationship models (ERM, not EER), much more better than its old error-prone predecessor (V4.2) from source-forge.
However, the most important thing is, you need to install a standard SQL database first, if you don't have already done this job. So what database for beginners?
Well, if you complete Rudy's book, you will have also learned some of mysql's special gotchas, Rudy discretely points to, for example on pages 76, 87, 154, 189, 230.
I should add that some of his examples don't work or don't show any effect on mysql 5.1, for example CAST(... AS VARCHAR) on page 153 does not work because of improper implementation of this very important SQL-kernel function (still bugs since 2007?). Also check clause on pages 208 and 266 will be parsed but silently ignored (!) by all storage engines. There are also some flaws concerning mysql's special group-by interpretation not mention by him.
Well, I have been doing database design and programming in depth since Oracle 5 on all kinds of relational database systems for American and German companies though, I have never met a similarly imperfect system than mysql.
To cut a long story short, I am deeply convinced that mysql is not a good system for beginners.
I would suggest that you start with postgresql 8.4 which is available for all unix systems and by using pgAdmin III or TOra all examples from Rudy's book will be executed without any problem. On ubuntu 10.04 there are only a handful commands necessary: sudo apt-get update; sudo apt-get upgrade –show-upgraded; apt-get install postgresql postgresql-contrib; sudo su -u postgres psql (enter root password); On prompt postgres=# enter: \password postgres; now enter your postgres password twice; \q to quit. That's it! (hopefully without typos)
Now you have a perfect (object-) relational SQL database system running on your Linux system which is utterly free of any royalties. (Ok, to start it: sudo /etc/init.d/postgresql-8.4 restart, then pgAdmin III chosen from developement menu, then create new user, password and database and you are ready to enter SQL commands.)
Yes, I am the poster who "strongly recommended Sybase SQL Anywhere developer" as griswolf stated. Depending on your Linux knowledge installation of tar-file isn't that difficult, however some additional manual work needs to be done until SQL Anywhere 12 menu is clickable from Ubuntu's application menu. It's really the complete professional system but without the formal right to deploy anywhere-based applications commercially. Here are some more details.
Oops, possibly nobody won't trudge through this somewhat too long text ...