Chapter 5: Making Changes to Your Data


In Chapter 4, you learn how to get data from a database, but working with databases involves much more than just getting data-it involves adding data, modifying existing data, and deleting data. This chapter covers the basics of these three essential database-manipulation skills.

Because SQL is modeled after the English language, you can count on SQL statements being quite easy to remember. For adding data to a database, use the SQL statement ADD. UPDATE modifies an existing record, and DELETE removes a record from a table.

Once we have covered those three basic data-manipulation operations, we will bring it all together into a comprehensive program that will give you a working example. This example program could then be used as a starting point for more powerful database applications.

This chapter still deals with very basic database concepts. Once we get into more advanced chapters, you will learn many shortcuts and more powerful ways to deal with the data in a database.

Before we begin walking through the example programs for this chapter, be aware that we are still using our 'library' table for our examples. This is a very simple, single-table database we are using to store the book data. As we get into the advanced chapters, we will deal with some database normalization and multiple tables.

Perl Database Programming
Perl Database Programming
ISBN: 0764549561
EAN: 2147483647
Year: 2001
Pages: 175

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: