Chapter 2: Access and SQL
pages 1 - 17
Data Files
Database Terminology
- database
- relational database
- table
- row
- entity relationship diagram (Figure 2-1)
- attribute
- attribute's type (Table 2-2)
- attribute's value
SQL
Creating Tables (setting primary keys)
Manipulating Data with SQL
- insert command: INSERT INTO table VALUES (..., etc.)
- update command: UPDATE table SET ... WHERE ...
- delete command: DELETE FROM table WHERE ...
Sample SQL Lab Exercise
Create a table named SleepZone that contains a booking id
(an integer or an autonumber), a last name (a text field of size 30) and
an arrival data (a date). The booking id is the primary key.
Then do the following:
- Add your name and "2005-05-12" to the table.
- Change your arrival date to "2005-05-13".
- Delete yourself from the table.