Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo tài liệu 'linux all in one desk reference for dummies phần 4', công nghệ thông tin, hệ điều hành phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Databases 207 To use MySQL you have to first log in as root and start the database server with the following command etc init.d mysqld start The database server mysqld is a daemon a background process that runs continuously that accepts database queries from the MySQL monitor. Now you have to design a database create that database in MySQL and load it with the data. Reviewing the steps to build the database Use this basic sequence of steps to build a database 1. Design the database. This involves defining the tables and attributes that will be used to store the information. 2. Create an empty database. Before you can add tables database systems require you to build an empty database. 3. Create the tables in the database. In this step you define the tables by using the CREATE TABLE statement of SQL. 4. Load the tables with any fixed data. For example if you had a table of manufacturer names or publisher names in the case of books you d want to load that table with information that s already known. 5. Back up the initial database. This step is necessary to ensure that you can create the database from scratch if necessary. 6. Load data into tables. You may either load data from an earlier dump of the database or interactively through forms. 7. Use the database by querying it. Make queries update records or insert new records using SQL commands. To illustrate how to create and load a database I set up a simple book catalog database as an example. Book II Chapter 4 Introducing Linux Applications TEAM LinG - Live Informative Non-cost and Genuine 208 Databases Designing the database For my book catalog example I don t follow all the steps of database building. For the example the database design step is going to be trivial because my book catalog database will include a single table. The attributes of the table are as follows Book s title with up to 50 characters Name of first author with up to 20 characters Name of second author if any with up to 20 characters Name of .