ABSTRACT

This chapter provides the tools necessary to set up a new database and populate it. It presents concepts that will help the readers construct efficient databases that enable faster query performance. While the treatment herein is not sufficient to make the readers a seasoned database administrator, it should be enough to allow them to start experimenting with SQL databases on their own. Different relational database management systems may implement a variety of different kinds of keys, but three types are most common: PRIMARY KEY, UNIQUE KEY, and FOREIGN KEY. The chapter discusses how to set up an SQL database, and how to optimize it for speed. It briefly touches upon the UPDATE and INSERT commands, which allow the readers to do exactly that. The chapter illustrates how to set up a MySQL database for the babynames data using the command line and SQL, but not R.