Open Excel spreadsheet. Fill in a couple of columns.
Open SQLite Manager, if it is not already open.
Database Control
- There are many ways to add and modify data in a database management system.
- Enter the data into another program (e.g., a spreadsheet) and import it to SQLite.
- Get the data from somewhere and import it.
- Though, data isn’t always ready to import into a database
- Enter the data directly.
Enter the data into another program
- Quality Assurance in Excel
- Select column.
- On the
Data
menu tab, selectData Validation
. Settings
tabAllow:
selects type of data.Data:
selects condition of value inputsValue:
Minimum:
Maximum:
Input Message
tab- Show input message when cell is selected for entry.
Error Alert
tabStyle:
controls response to invalid input valueStop
Warning
Information
Import existing data
Walk through Exercise 2 - Importing Data, Tasks 1-10.
Do Exercise 2 - Importing Data, Task 11.
Enter the data directly
- Create a new table by clicking on
Create Table
in theTable
dropdown menu. - Fill in
Table Name:
- Complete the
Define Columns
section.- Fill in
Column Names
. - Choose
Data Type
. - Choose toggle options.
Primary Key?
andAutoinc?
Allow Null?
Unique?
- Fill in
- Click
OK
. - Click
Yes
.
Show students the SQLite Manager
Browse & Search
tab.
- Add new records by clicking on the
Add
button from theBrowse & Search
panel. - Check
Table Name:
. Enter Field Values
.- Click
OK
. - Click
OK
. - Add another entry or click
Cancel
.
Modifying existing records
- Select record on
Browse & Search
panel. - Click on the
Edit
button. - Modify record in
Enter Field Values
. - Click
OK
. - Click
OK
. - Click
Cancel
.
Deleting records
- Select record on
Browse & Search
panel. - Click on the
Delete
button. - Click
Yes
.
Deleting a table
- Click on
Drop Table
in theTable
dropdown menu. - Click
Yes
.
SQL - structured query language
- The language of databases
- Even graphical tools like Microsoft Access write SQL for you behind the scenes
Show students the SQLite Manager
Execute SQL
tab.
SELECT * FROM Experiment;
Assign remaining exercises.