9-3-3 Data manipulation
Database management systems employ a standardized method of manipulation called “SQL” to define tables and search, insert, update, and delete
data. Commands called SQL statements execute functions like data searches in an interactive fashion. SQL is standardized by ISO (International Organization for Standardization) and JIS (Japan Industrial Standards Committee), which allows for data to be handled without regard to the type of
database management system.
Extracting the necessary data from the database is called an “operation.”
Examples of operations are “relational operations” and “set operations.”
Reference
Data manipulation
In addition to the three relational operations, the following are different kinds of
data manipulation.
Insert ·····Insert the specified record into
the table.
Delete ····Delete the specified record
from the table.
Update ···Update the specified record in
the table.
●Relational operation
A “relational operation” is an operation that extracts the desired data
from a table.
There are three basic relational operations.
Project ·········Extract the specified item from the table.
Select ···········Extract the specified record from the table.
Join ··············Extract data that combines two or more tables by means of a
certain item with the same value.
Relational operation example
Select
Customer code Customer name Rep code
Ono
2051
A12
Tanaka
4293
B30
Harada
5018
A11
Customer code Customer name Rep code
Tanaka
4293
B30
Extract only records where the
customer code is “4293”
Project
Customer code
2051
Extract only the
4293
customer code “item”
5018
Customer code Customer name Rep code
Ono
A12
2051
Tanaka
B30
4293
Harada
A11
5018
Rep code
A12
A11
B30
B60
Rep name
Suzuki
Yamada
Saito
Yoshida
Rep name
Suzuki
Saito
Yamada
Join data where the “rep code”
is the same in a row In this
case, the “rep code” is called a
“join key”
Join
Customer code Customer name Rep code
Ono
2051
A12
Tanaka
B30
4293
Harada
5018
A11
253