☰ Contents · Computing

Creating a database and importing

Lessons 24–25 · 2 lessons · N. I. Taylaqov (general editor), A. B. Akhmedov, M. D. Pardayeva, A. A. Abdug‘aniyev, U. M. Mirsanov. Informatics and Information Technologies, Grade 10, 1st edition. “Extremum-Press”, Tashkent, 2017
24

Practical lesson

Textbook: pp. 51–52
GoalCreates a new Access database, imports an Excel table into it, exports a table to Excel and responds correctly to security warnings.
New words
import: bringing data from another file into the database · importexport: saving a database object to another file format · eksportBlank database: a new empty .accdb file · bo‘sh omborEnable Content: the button that allows macros and active content in an opened database · Enable Content
Explanation

Creating a new database: start Access, choose File – New – Blank database, type the database name and the folder to save it in, and press Create; an .accdb file appears and the first table opens in Datasheet view. Importing an Excel table: External Data – New Data Source – From File – Excel. Choose the file, tick “Import the source data into a new table”, tick “First Row Contains Column Headings” if the first row has column names, choose the key and name the table. To export, select the table and use External Data – Export – Excel. If a yellow “Security Warning” bar appears in an opened database, press “Enable Content” only if you trust the source of the file: macros in a foreign database can harm your computer. Before changing an important database or table, save a copy.

Worked examples
An Excel sheet with 6 invented books (a header row + 6 rows, 7 rows in all) is ready. When imported into Access with “First Row Contains Column Headings” ticked, the table has 6 records; if it is not ticked, the headings become a record too and 7 records appear.
Export: after exporting the “Books” table to Excel, you can calculate the mean year in the “Year” column with =AVERAGE() and draw a chart. Export does not change the original data in the database: the Excel file is a separate copy.
Class activity

“The import-export chain”: a pair imports an Excel table into Access, adds one record, exports it back and shows the new row in Excel.

Practice
1
Which tab holds the import command?
2
An Excel table with a header row and 6 data rows is imported correctly. How many records does the table have?
3
What is the “First Row Contains Column Headings” tick for in the import window?
4
Why must you be careful pressing “Enable Content” in a foreign database?