---[REF]---"style":"heading"---[REF]--- Databases and applications that rely on databases are used in all industries. They are used in small, medium, and large companies. Business people use databases to help with all types of business tasks from marketing to operations and accounting to human resources management. Developers and engineers use databases in the development of new products and computer applications. Legal, medical, and educational professionals use database systems. Truthfully, it would be difficult to find a profession that *does not* use database systems. Those who learn how to effectively interact with databases will have a significant advantage over those who do not. Structured query language (SQL) is popular and powerful tool for interacting with databases. It is relatively easy to learn. Additionally, it can be used with all of th major database systems. The lessons in this book are designed to teach SQL. They are targeted to beginners and assume no prior database knowledge. The set of lessons is also a comprehensive reference. It covers basic, intermediate and advanced SQL topics. They describe some principles of database design that will compliment your understanding of SQL. ## DBMSs Covered in This Book As much as possible, the SQL statements covered in this set of lessons will apply to any Database Management System (DBMS). Unfortunately, some DBMS implement some aspects of SQL differently. When this is the case, the following DBMSs (and their specific instructions) are also covered: * Oracle * data.world * SQLite ### Features of This Book There are a number of examples, practice problem sets, and novel features in the lessons that will help you effectively learn SQL. These features include: **Execute Live Queries in the Book** You will find a number of example SQL statements presented in each lesson. Each example is presented in a special query box that will allow you to execute the query syntax against a live database. An example of a query window is below. The window contains a visual depiction of the database to be queried and the syntax to be executed. When you click on the "Play" button, the query results will be displayed. Give it a try. ---[SQL]--- connection:sql_book_connection schema:canvas diagram:canvas|visible owner:atlas-query result:museum-name ---[SQL]--- SELECT name FROM museum; ---[SQL]--- **Use Artificial Intelligence to Create SQL Syntax** You can configure the book to teach you how to effectively use artificial intelligence (AI) tools such as ChatGPT to help you to write SQL syntax. The examples in each lesson present an example chat session with an AI tool that ends with the tool generating SQL code. The lessons also describe how to evaluate SQL statements that are AI generated to determine if they will work for your needs. An example AI chat session used is below. ---[AI]--- [ { "prompt": "Write a SQL statement to list the names of museums", "pretext": "To list the names of museums from a database, you would need to know the specific table and column where the museum names are stored. Assuming there is a table called \"Museums\" with a column named \"Name,\" you can use the following SQL statement:", "response": "SELECT Name \nFROM Museums;", "posttext": "This query selects the \"Name\" column from the \"Museums\" table and retrieves all the museum names. Replace \"Museums\" with the actual table name in your database to execute the query successfully." } ] ---[AI]--- **Receive Feedback on your Query Writing** You may choose to purchase example problem sets that will give you extra practice. These problem sets are scored by an automated grading system which provides immediate feedback on your queries. If you are using these lessons for a formal class, your scores and feedback can be forwarded to your instructor. **Get Additional Help and Tips on Query Writing** Scattered throughout the lessons, you will find information spotlighted in sidebars. There are six different types of sidebars that highlight different types of information. Example of eaach type of sidebar are below with a description of the type of information that will be highlighted in each. ---[SIDEBAR]--- "type":"note", "title":"Note Sidebar", "text":"Used to highlight interesting information that is related to the content presented in the lesson." ---[SIDEBAR]--- ---[SIDEBAR]--- "type":"tip", "title":"Tip Sidebar", "text":"Used to highlight a suggested best practice or easier way to do things." ---[SIDEBAR]--- ---[SIDEBAR]--- "type":"term", "title":"Term Sidebar", "text":"Used to highlight highlight a glossary term and definition." ---[SIDEBAR]--- ---[SIDEBAR]--- "type":"caution", "title":"Caution Sidebar", "text":"Used to highlight common mistakes or issues encountered by SQL programmers." ---[SIDEBAR]--- ---[SIDEBAR]--- "type":"objectives", "title":"Objectives Sidebar", "text":"Used to highlight the learning objectives of the lesson." ---[SIDEBAR]--- ---[SIDEBAR]--- "type":"review", "title":"Review Sidebar", "text":"Used to highlight information that was presented in a prior lesson that is relevant to the current topic." ---[SIDEBAR]---