Raspberry Pi_Eng_24.2.5 Database SQL

24.2.5 Database SQL

24.2.5.1 Introduction of Database SQL

All relational databases use special instruction called SQL (Structured Query Language) to manage their internal data. By using SQL, you can define the type and content of data in the database, to enter data into the database, to modify the data entered, and to view the data entered.

The main functions of SQL that are necessary for database management are as follows:

Raspberry Pi_Eng_24.2.4 Using MySQL Shell – “mysql” command

24.2.4 Using – “mysql” command

24.2.4.1 Basic Framework of

Use to use MySQL database. is a simple SQL Shell program that allows you to enter and edit your own database commands.

This can be used both in interactive manner and in noninteractive manner. When used interactively, the results are displayed in an ASCII-table format, and if used noninteractively, the results are displayed in tab-separated format.

Raspberry Pi_Eng_24.2.3 MySQL Management Tool

24.2.3 MySQL Management Tool

24.2.3.1 – mysqladmin command

is a management-dedicated utility program used to manage the MySQL database system on the whole. This command is used in a noninteractive manner.

This program is automatically installed on the computer where is installed. However, if you want to remotely access a system with a MySQL database from another computer on the network and perform management works, you need to download a appropriate program for the operating system of the remote computer and install it separately.

Raspberry Pi_Eng_24.2.1 Relational Database and SQL

24.2 MySQL Database

24.2.1 Relational Database and SQL

24.2.1.1 Relational database

The database is a tool to provide a function that stores and manages many complicated data systematically and search the data in various formats easily later.

There are many types of databases, but the type of most databases that are most popular in the world is relational database. Relational database is that many of datas in it are not simply managed as independent data, but rather that the data are systematically managed in relation to each other. The relationship between these data is defined at the same time when defining the form of the data in advance, and the data is managed according to the defined relationship and provides various functions.

Raspberry Pi_Eng_24.1.2 LAMP

24.1.2 LAMP

On Linux systems, there is a powerful combination of tools that can build a web site using database and web server along with operating system, LAMP. LAMP is a combination of Linux, Apache, MySQL, and PHP. The basic compositions and roles are as follows.

■ OS — Linux

■ Web server — Apache

■ Database — MySQL

■ script Language — PHP

Raspberry Pi_Eng_24.1.1 Needs for Database and Web

24.1 LAMP Overview

24.1.1 Needs for Database and Web

Until now, all we could do was to run command on Terminal screen to check the result, or run a specific application program and do limited work by using function provided by the program. But this level of functionality alone can not meet all of the requirements we need, so a number of additional features are required.

Raspberry Pi_Eng_24.0 Chapter 24 Utilizing Database and Web

Chapter 24 Utilizing Database and Web

Chapter’s Main Topics

This Chapter describes database used to systematically store and analyze a lot of data, and discuss how to communicate with other people on the Internet in various dynamic ways using HTML, script language.

It includes descriptions on the following topics:
■ LAMP Overview

■ MySQL Database

■ Apache web server

■ PHP web script language