Page 231 - Open Soource Technologies 304.indd
P. 231
Unit 10: Database Fundamentals and Connectivity Option
Figure 10.5: Object Category Branch.
After a table and its columns are defined, we can then populate the table with data from a file.
We can also create an index to improve query processing and define a view, or virtual table, to
limit access to specific columns.
10.3.4 Populate a Table Using the Import Assistant
We can populate a table with data by importing the data from a file. The Ingres Import Assistant
can import data from various file types.
In this example, we use a CSV file located in %II_SYSTEM%\ingres\demo\data\airport.csv.
The airport table in the demodb is already populated. This sample procedure
creates a new table called temp, which we can delete (drop) after this exercise.
10.3.5 To Import Data From a File Using the Import Assistant
1. Click the Ingres Import Assistant button on the toolbar in Visual Manager. Step 1
of 4 of the Import Assistant is displayed.
2. Use the browse button in the File to be imported control to locate the file.
3. Expand the (local) node in the Into Ingres Table control, and then expand the demodb
database. Select the <new table> option and enter temp into the Ingress Table to be Created
field. Press Next. Step 2 of 3 of the Import Assistant (File Format Identification) is
displayed. The Import Assistant displays each of its interpretations of the data as a tab.
LOVELY PROFESSIONAL UNIVERSITY 225