layout | element | title | language |
---|---|---|---|
page |
notes |
Database Control |
SQL |
Open Excel spreadsheet. Fill in a couple of columns.
Open SQLite Manager, if it is not already open.
- 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.
- 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
Do [Exercise 1 - Data entry validation in Excel]({{ site.baseurl }}/exercises/Qaqc-data-entry-validation-in-excel-SQL/).
Walk through [Exercise 2 - Importing Data]({{ site.baseurl }}/exercises/Database-control-importing-data-SQL), Tasks 1-10.
Do [Exercise 2 - Importing Data]({{ site.baseurl }}/exercises/Database-control-importing-data-SQL), Task 11.
- 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
.
Do [Exercise 3 - Creating Tables]({{ site.baseurl }}/exercises/Database-control-creating-tables-SQL/).
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
.
Do [Exercise 4 - Adding Records]({{ site.baseurl }}/exercises/Database-control-adding-records-SQL/).
- Select record on
Browse & Search
panel. - Click on the
Edit
button. - Modify record in
Enter Field Values
. - Click
OK
. - Click
OK
. - Click
Cancel
.
- Select record on
Browse & Search
panel. - Click on the
Delete
button. - Click
Yes
.
Do [Exercise 5 - Updating Records]({{ site.baseurl }}/exercises/Database-control-updating-records-SQL/).
- Click on
Drop Table
in theTable
dropdown menu. - Click
Yes
.
- 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.