For Dummies SQL 7th Edition
Introduction
Welcome to database development using SQL, the industry-standard database query language. Many database management system (DBMS) tools run on a variety of hardware platforms. The differences among the tools can be great, but all serious products have one thing in common:
They support SQL data access and manipulation. If you know SQL, you can build relational databases and get useful information out of them.
About This Book
Relational database management systems are vital to many organizations. People often think that creating and maintaining these systems must be extremely complex activities — the domain of database gurus who possess enlightenment beyond that of mere mortals. This book sweeps away the database mystique. In this book, you
✓ Get to the roots of databases.
✓ Find out how a DBMS is structured.
✓ Discover the major functional components of SQL.
✓ Build a database.
✓ Protect a database from harm.
✓ Operate on database data.
✓ Determine how to get the information you want out of a database.
The purpose of this book is to help you build relational databases and get valuable information out of them by using SQL. SQL is the international standard language used to create and maintain relational databases. This edition covers the latest version of the standard, SQL:2008.
This book doesn’t tell you how to design a database (I do that in Database Development For Dummies, also published by Wiley). Here I assume that you or somebody else has already created a valid design. I then illustrate how you implement that design by using SQL. If you suspect that you don’t have a good database design, then — by all means — fix your design before you try to build the database. The earlier you detect and correct problems in a development project, the cheaper the corrections will be.
Who Should Read This Book?
If you need to store or retrieve data from a DBMS, you can do a much better job with a working knowledge of SQL. You don’t need to be a programmer to use SQL, and you don’t need to know programming languages, such as Java, C, or BASIC. SQL’s syntax is like that of English.
If you are a programmer, you can incorporate SQL into your programs. SQL adds powerful data manipulation and retrieval capabilities to conventional languages. This book tells you what you need to know to use SQL’s rich assortment of tools and features inside your programs.
How This Book Is Organized
This book contains eight major parts. Each part contains several chapters. You may want to read this book from cover to cover once, although you don’t have to. After that, this book becomes a handy reference guide. You can turn to whatever section is appropriate to answer your questions.
Part I: Basic Concepts
Part I introduces the concept of a database and distinguishes relational databases from other types. It describes the most popular database architectures, as well as the major components of SQL.
Part II: Using SQL to Build Databases
You don’t need SQL to build a database. This part shows you how to build a database by using Microsoft Access, and then you get to build the same database by using SQL. In addition to defining database tables, this part covers other important database features: domains, character sets, collations, translations, keys, and indexes.
Throughout this part, I emphasize protecting your database from corruption, which is a bad thing that can happen in many ways. SQL gives you the tools to prevent corruption, but you must use them properly to prevent problems caused by bad database design, harmful interactions, operator error, and equipment failure.
Part III: Storing and Retrieving Data
After you have some data in your database, you want to do things with it: Add to the data, change it, or delete it. Ultimately, you want to retrieve useful information from the database. SQL tools enable you to do all this. These tools give you low-level, detailed, brass-tacks control over your data.
Part IV: Controlling Operations
A big part of database management is protecting the data from harm, which can come in many shapes and forms. People may accidentally or intentionally put bad data into database tables, for example. You can protect yourself by controlling who can access your database and what they can do with it. Another threat to data comes from unintended interaction of concurrent users’ operations. SQL provides powerful tools to prevent this problem too. SQL provides much of the protection automatically, but you need to understand how the protection mechanisms work so you get all the protection you need.
Part V: Taking SQL to the Real World
SQL is different from most other computer languages in that it operates on a whole set of data items at once, rather than dealing with them one at a time. This difference in operational modes makes combining SQL with other languages a challenge, but you can face it by using the information in this book. You can exchange information with no database applications by using XML.
Part VI: Advanced Topics
In this part, you discover how to include set-oriented SQL statements in your programs and how to get SQL to deal with data one item at a time. This part also covers error handling. SQL provides you with a lot of information whenever something goes wrong in the execution of an SQL statement, and you find out how to retrieve and interpret that information.
Part VII: The Part of Tens
This section provides some important tips on what to do, and what not to do, in designing, building, and using a database.
Appendix and Glossary
The Appendix lists all of SQL’s reserved words, as of the 2008 release of Part 14 of the ANSI/ISO SQL standard. These are words that have a very specific meaning in SQL and cannot be used for table names, column names, or anything other than their intended meaning. Also, you can download a basic glossary of some frequently used terms at www.dummies.com/go/sqlfd7e.

0 comments:
Post a Comment