Chapter 3: Using SQL to Work with a Database
In this chapter and the next, you will be learning to use the SQL language to work with the database. There is much to learn, so the topic has been split into two chapters, with Chapter 3, Using SQL to Work with a Database (this chapter), concentrating on database creation, tables, fields, indexes, and foreign keys, the same topics that were covered in Chapter 2, Creating a Database (excluding EER) but using SQL statements and not a GUI such as Workbench. You will still be using the Query tabs in Workbench in which to write SQL. Learning to perform these functions in pure SQL will enhance your knowledge and skills. We will also cover some new topics, such as adding, modifying, and deleting data and records.
This chapter covers the following topics:
- Working with data
- Backing up databases
- Restoring databases
- Working with SQL code to maintain a database
- Creating a new database
- Creating and modifying tables ...