Contacts

Michael J. Hernandez, John L. Vieskas - SQL requests for ordinary mortals. SQL queries for simple SQL mortal for simple mortal graber

Database General Michael J. Hernandes, John L. Vieskas - SQL requests For ordinary mortals

Michael J. Hernandez, John L. Vieskas - SQL Requests for ordinary mortals

03.09.2009

The SQL query book for simple mortals is an excellent introduction to SQL requests. Real programmer (simple mortal) spending a large number of time writing SQL requests and less - to design the database itself. Schemes make up high-paying database administrators who own individual cabinets and sports cars. The majority of programmers are engaged in the fact that they are trying to force SQL to work in a rigidly specified scheme.

About authors
Michael J. Hernandes - A well-known consultant for relational databases and owner of the Datatex consulting group in Seattle. Often stands with reports at various conferences. It also owns the book Database Design for Mere Mortals (design databases for ordinary mortals).

John L. Viezkas - President of Viescas Consulting, Inc., a well-known consulting company on database issues. He is also the author of Bestseller Running Microsoft Access 2000 (work in Microsoft Access 2000) and Programmer "S Quick Reference Guide to SQL (SQL Programmer Brief Reference Guide).



SQL for simple mortals is a complete introduction to the structured query language, written specifically for beginners. If you do not have database management experience, thanks to this book you will learn how to work with SQL easily and freely, applying simple queries and complex operations. For mastering SQL:

  • Using the meaning of the concepts associated with the database management, using a brief and simple introduction to relational databases.
  • Follow these instructions on applying SQL basic commands to search for information and work with it posted in data tables. Learn to choose and summarize data, as well as skillfully manage.
  • Work effectively with composite data tables, applying the developed query technique to more than one table at the same time, constructing complex requests and subqueries.
  • Create new data tables for sales business applications. Learn the important principles of efficient design database and the integrity and data protection technique.
  • Learn to apply SQL with programming languages \u200b\u200busing a special chapter for programmers.

SQL For simple mortals is a necessary manual for any implementation of the structured query language, which includes a brief handbook on standard SQL and a description of the common properties of non-standard SQL.

1. Introduction to relational databases
2. Introduction to SQL
3. Using SQL for data sampling from tables
4. Use of relational and boolean operators to create more complex predicates
5. Use of special operators in "Conditions"
6. Summation of data using aggregation functions
7. Formatting query results
8. Using multiple tables in one request
9. Operation of the connection, the operands of which are represented by one table
10. Investing requests
11. Related subqueries
12. Using the EXISTS operator
13. Use of Any Operators, All and Some
14. Using the Offer Union
15. Entering, deletion and change of field values
16. Use of subqueries with update commands
17. Creating tables
18. Restrictions on the set of permissible data values
19. Support for data integrity
20. Introduction to submission
21. Changing values \u200b\u200bthrough representations
22. Determination of data access rights
23. Global aspects of SQL
24. How to maintain order in the database sQL data
25. Using SQL with other programming languages \u200b\u200b(Built-in SQL)
Applications
A. Answers to the exercises
B. SQL data types
C. Some common deviations from the SQL standard
D. Help on syntax and teams
E. Tables used in examples
F. SQL today

Introduction to relational databases

... We will also use both terms when discussing SQL as synonyms. You are already familiar with simple tables. With all its short and simplicity, they are quite suitable for demonstrating the most important features of the language, which you later make sure. Sometimes we will enter other tables or consider other data in one of these tables in order to show some additional features their applications. Now we are ready for direct immersion in SQL. Next chapter, to
which you will have to come back from time to time gives general view about the language and orients the material set out in the book.

Introduction to SQL

This chapter covers a large number of basic information that gives a general view of SQL. You learned how it is structured, as is used how data is expressed in it, how and by whom it is determined (and what contradictions occur), as well as some agreements and terminology used to describe. The following chapter explains in detail the formation and action of commands. You will get acquainted with the team that allows you to extract information from the tables and is one of the most frequently used in SQL. You can withdraw the specific information from the database.

Global aspects of SQL.

  • Synonyms (how to create new names for data objects)
  • Database space (DBSpace) (how to divide the space available in the database)
  • Transaction Processing (How to Save or Refuse Changes in the Database)
  • Parallelism control (as SQL eliminates the effect of teams on each other)

Synonyms are objects, have names and (sometimes) owners, but do not exist independently and regardless of the table whose name they are replaced. They can be common and, therefore, available for each having access to an object, or belong only to a specific user. DBSpaces is the database subsections allocated to users. Related tables for which the connection is often performed, it is better to store the database in the same space. Commit and Rollback - commands used to save in the form of a group of all database changes, ranging from the previous Commit or Rollback command or from the start of the session or for the failure of them. The control of the parallelism determines to which the extent simultaneous commands affect each other. Here are "workers" differences in the functioning of databases and methods of isolation of the results of commands.

How the order in the SQL database is supported

So, SQL systems use multiple tables, which is called a system directory of the database structure. For these tables, you can formulate queries, but they cannot be updated. In addition, you can add comments columns in the SystemCatalog and SystemColumns tables (and also delete them). Creating views for these tables is an excellent way to accurately define the information to which users have access rights. On this we finish consideration of SQL in interactive mode. The following chapter will consider the use of SQL directly · in programs written in programming languages; Such use allows you to retrieve the benefits of the interaction of the program with the database.

Using SQL with other programming languages \u200b\u200b(Built-in SQL)

SQL commands are included in procedural programming languages \u200b\u200bto combine the strength of the two approaches. Implementation of this feature requires some SQL extensions. Embedded SQL commands are broadcast using a program called pre-compartment (preprocessor), to create a program that understands the language compiler. high level. The built-in SQL commands are replaced by calling subroutines that are created using the built-in preprocessor; These subprogramme are called access modules. With this approach ANSI supports the built-in SQL for languages pascal programming, Fortran, Cobol, PL / 1. Other languages \u200b\u200bare also used by developers. The most important of these is C. When describing the embedded SQL, pay special attention to the following:

  • All embedded SQL commands begin with the words of EJES SQL and end depending on the high level language used.
  • All high-level variables used in SQL commands must be entered into SQL descriptions to its application.
  • If the SQL commands use the high-level variables, the colon must be specified before their names.
  • The output data for queries can be stored directly in high-level variables using INTO if and only if the query selects the only string.
  • Cursors can be used to store the query output and to access them one row for one processing cycle. The cursors are declared (along with the definition of a query, the output of which contains the cursor), open (which corresponds to the execution of the query) and closes (which corresponds to the removal of output data from the cursor, breaking the link between output data and cursor). While the cursor is open, you can use the FTCH command to access the output of the query data: one line for each Fetch execution.
  • Cursors can be updated or "read only." To be updated, the cursor must satisfy all the criteria as the presentation. He should not use the proposals of Order Wu and Union, which are forbidden to apply in the presentation. Unnecessary cursor is a read-only cursor.
  • If the cursor is updated, it can be applied to drivers, which are used by the built-in SQL Update and Delete commands from the offer of WHERE CURRENT OF. Delete or Update must belong to the table, access to which is carried out through the request cursor.
  • SQLCode can be declared as a numerical type variable for each program using the built-in SQL. The values \u200b\u200bof this variable are installed automatically after each SQL command is executed.
  • If the SQL command is performed normally, but does not generate output or does not perform the expected changes in the database, SQLCode takes the value 100. If the command displays an error, then SQLCode takes some negative value describing the cause of the error, depending on the specific SQL system. Otherwise, SQLCode is zero.
  • Whenever proposal can be used to determine the action that should be performed if SQLCode accepts the value 100 (not found) or a negative value (SQLERROR - error when executing SQL). This action lies in the transition to a certain point of the program (Goto<метка>) or to the execution of "empty action" (Continue, equivalent to the concept of "do nothing"). By default, "Empty Action".
  • Only numeric variables can be used as indicators. The indicator variables follow the other names of the variables in the SQL command without any separating characters, with the exception of the word Indicator.
  • Typically, the value of the indicator variable is O. If the SQL command tries to accommodate the NULL value in variable language High level using this indicator, it takes a negative value. This property can be used to protect against errors and as a flag marking in SQL NULL values \u200b\u200bthat will be specifically interpreted in the main program.
  • The indicator variables can be used to insert NULL values \u200b\u200bto the SQL Insert or Update command. They take positive values \u200b\u200bwhen the truncation situation occurs.
SQL for simple mortal + SQL for 10 minutes
Sams Teach Yourself SQL In 10 Minutes
Posted by: Ben Fort
Translator: V. Ginzburg
Languages: Russian
Publisher: Williams.
Series: Excess 10 minutes
ISBN 978-5-8459-1858-1, 978-0-672-33607-2; 2014

Pages 288 pp.
Format 84x108 / 32 (130x200 mm)
Circulation 2000 copies.
Binding Soft Cover

In the book SQL in 10 minutes, simple and practical solutions are offered for those who want to quickly get the result. Having worked out all 22 lessons, each of which will have to spend no more than 10 minutes, you will learn about everything that is necessary for practical use of SQL. The examples given in the book are suitable for IBM DB2, Microsoft Access, Microsoft SQL Server, MySQL, Oracle, PostgreSQL, SQLite, Mariadb and Apache OpenOffice Base.
Access to all links
Visual examples will help to understand how SQL instructions are structured.
Tips will prompt short paths to solutions.
Warnings will help avoid common mistakes.
Notes will provide additional clarifications.
What can be found in 10 minutes:


  • - basic SQL instructions;
    - the creation of complex SQL queries with many proposals and operators;
    - extraction, sorting and data formatting;
    - obtaining specific data with various filtering methods;
    - apply the final functions to obtain a summary data;
    - Combining relational tables;
    - add, update and delete data;
    - creation and change of tables;
    - Work with ideas, stored procedures and much more.
Ben Fort - Director of the Development Department at Adobe Systems. The author of a variety of bestsellers, including books on databases, SQL and ColdFusion. It has extensive experience in designing databases and application development.

Understanding SQL.
Posted by: Martin Graber
Translator: V. Hawk
Languages: Russian
Publisher: Lori.
ISBN 978-5-85582-301-1; 2014
additional characteristics
Pages 378 p.
70x100 / 16 format (170x240 mm)
Circulation 200 copies.
Binding Soft Cover

SQL for simple mortals is a complete introduction to the structured query language, written specifically for beginners. If you do not have database management experience, thanks to this book you will learn how to work with SQL easily and freely, applying simple queries and complex operations. For mastering SQL:
- Support the meaning of the concepts associated with the management of the database, using a brief and simple introduction to relational databases.
- Follow these instructions on applying the main SQL commands to search for information and work with it posted in the data tables. Learn to choose and summarize data, as well as skillfully manage.
- Effectively work with composite data tables, applying a developed query technique to more than one table at the same time, constructing complex queries and subqueries.
- Create new data tables for sales business applications. Learn the important principles of efficient design database and the integrity and data protection technique.
- Learn to apply SQL with programming languages \u200b\u200busing a special chapter for programmers.

SQL For simple mortals is a necessary manual for any implementation of the structured query language, which includes a brief handbook on standard SQL and a description of the common properties of non-standard SQL.

Download the book SQL queries for ordinary mortals

Books on SQL - SQL queries for simple mortals

Over the past few years, from the language known only to specialists in the field of computers, SQL has become a widely used international standard. The total number of compatible with SQL and the databases supplied each year is now calculated by millions. If you address the corporate information on the Internet or on the internal network, then you probably use SQL. The SQL query book for simple mortals will help novice users to study the basics of SQL queries and will become the necessary reference guidance for experienced and advanced users.

SQL queries for simple mortals. Description of the book on SQL

The book is an excellent introduction to SQL requests and well complements the previous book design database for ordinary mortals, published in the Addison-Wesley publishing house. It can be said that it is even a better introduction than the first book. Real programmer (i.e., a simple mortal) spends more time to write SQL requests and less - to design the database itself. Schemes make up high-paying database administrators who own individual cabinets and sports cars. Most programmers are engaged in trying to force SQL to work in a rigidly specified scheme.
By virtue of your profession, I set up a database and teach an extended SQL, so I can confirm that most of the SQL texts are as
Attractive for reading, like Egyptian hieroglyphs. As soon as the program begins to work, the programmer who wring it moves to solving the next task, never looking around what was done. And when something is wrong with this program, another person sends desperate messages to discussion groups on the Internet, where John and Mike will save it with several wiser words and coding. They helped people to solve their problems associated with SQL. Finally, it is time to set out all this in the book that each can take advantage!
It is absolutely not difficult and no time needs to write good program. If you understand what you are doing, most problems are solved quite simply. First of all, it is necessary to study the basics. This book provides you with a chance to explore these basics in understandable and well-written form. Then it is necessary to understand when and how to adjust a simple solution to a specific DBMS and a specific SQL implementation. When the basics are reliably learned, contact me, and I will teach you really nontrivial things.

Over the past few years, from the language known only to specialists in the field of computers, SQL has become a widely used international standard. The total number of compatible with SQL and the databases supplied each year is now calculated by millions. If you address the corporate information on the Internet or on the internal network, then you probably use SQL. The SQL query book for simple mortals will help novice users to study the basics of SQL queries and will become the necessary reference guidance for experienced and advanced users.


Content.
Part I Relational Databases and SQL. one
Chapter 1 What is "relational"?. 3.
Database types3
Brief history of the relational model. four
Anatomy of relational databases. five
Why all this is necessary. fourteen
Results.16
Chapter 2 Ensuring the reliability of the database structure. 17.
Why this chapter is placed here. 17.
Why do you need a well-thought-out structure. eighteen
Field settings. eighteen
Setting tables. 26.
Installation and correction of connections. 36.
And it's all?. 43.
Results. 43.
Chapter 3 Brief History SQL. 45.
SQL sources. 45.
Early implementations. 47.
". And then there was a standard." 48.
Development of the ANSI / ISO standard. 49.
What is preparing the future. 54.
Why learn sql. 56.
Results. 57.
Part II Basics SQL. 59.
Chapter 4 Creation simple requests. 61
Acquaintance with SQL. 61.
SELECT statement. 62.
Summary: Data in comparison with information.64
Transfer request for SQL. 66.
Exception of duplicate string.72.
Sort information. 74.
Saving work79.
Examples of operators. 79.
Results.87
Tasks for self solutions. 88.
Chapter 5 How to get something more than just columns. 91.
SELECT Condition, Two.92
Outside Azov96
What is "expression" 97
What are you trying to express .97
Types of expressions. 100
Using expressions in the SELECT condition. 109.
NULL value. 117.
Examples of operators. 120.
Results.127
Tasks for self solutions. 128.
Chapter B Data Filtering 131
Clarification of the resulting WHERE.131
Definition of search terms .35
Using multiple conditions.156
Re-meeting with NULL: Warning remark.168
Expression of conditions different ways. 172
Examples of operators. 173.
Results.179
Tasks for self solutions. 179.
Part III Work with multiple tables. 183.
Chapter 7 Thinking Multiple. 185.
What is a lot. 186.
Operations on sets. 186.
Crossing. 187.
Difference. 192.
An association. 199.
Sets with sets in SQL. 203.
Results. 12.
Chapter 8 Internal Connections. 214.
What is join. 214.
Inner Join. 215.
Applications Inner Join.231
Examples of operators.233
Results.251
Tasks for self-decidation.251
Chapter 9 External Connections.255
What is Outer Join.255
Left / Right Outer Join.257
Full Outer Join.276
Using Outer Join.281 operations
Examples of operators.282.
Results. 95.
Tasks for self-decide296
Chapter 10 Operations Union 298
What is Union.298
Recording requests with Union.300
Application Union.311
Examples of operators.312
Results.322
Tasks for self-decision.322
Chapter 11 * Subqueries325
What is a subquery.326
Subqueries as column expressions.327
Subqueries like filters.332
Use subqueries.347
Examples of operators349
Results.361
Tasks for self-decision.362
Part IV Summation of data and union into groups. 365.
Chapter 12 * Simple amount.367
Aggregate functions.367
Using aggregate functions in filters.381
Examples of operators.384.
Results. 390.
Tasks for self-decision.390
Chapter 13 Grouping Data. 393.
Why do you need to group data.393
GROUP BY condition. 395.
Overlay some restrictions .404.
Using Group BY.408.
Examples of operators.409
Results.417
Tasks for self-decisions.418
Chapter 14 Filtration of Grouped Data.420
Narrowing group.420
Filters: Feel the difference. 425.
Use Having. 432.
Examples of operators. 433.
Results. 441.
Tasks for self solutions. 441.
Conclusion. 445.
Applications 447.
Appendix A Chart of SQL Standard. 449.
Appendix in database structures used
as examples. 455.
An application with literature recommended for reading. 459.

Preface
The SQL request book for simple mortals is an excellent introduction to SQL requests and well complements the previous book design database for ordinary mortals, published in the Addison-Wesley publishing house. It can be said that it is even a better introduction than the first book. A real programmer (i.e., a simple mortal) spends more time to write SQL requests and less - to design the database itself. Schemes make up high-paying database administrators who own individual cabinets and sports cars. Most programmers are engaged in trying to force SQL to work in a rigidly specified scheme.
By virtue of your profession, I set up a database and teach an extended SQL, so I can confirm that most of the SQL texts are as attractive for reading as Egyptian hieroglyphs. As soon as the program begins to work, the programmer who wring it moves to solving the next task, never looking around what was done. And when something is wrong with this program, another person sends desperate messages to discussion groups on the Internet, where John and Mike will save it with several wiser words and coding. They helped people to solve their problems associated with SQL. Finally, it is time to set out all this in the book that each can take advantage!


Free download electronic book In a convenient format, watch and read:
Download the book SQL queries for simple mortals, practical manipulation guide to SQL, Michael J. Hernandes, John L. Vieskas., 2003 - FilesKachat.com, fast and free download.

Download PDF.
Below you can buy this book on best price With a discount with delivery throughout Russia.



Did you like the article? Share it