Adding Table/Column to an embedded derby database created at the time of installation of Helical Insight application.
In this blog we will discuss how to add a new table or column to an already connected embedded derby database and populate newly created table or column.
We will use db-visualizer as a client to connect to an embedded derby database create a table and populate the newly created table. We will use SampleTravelData database as an example, in this database, we will there be “HIUSER” schema and inside this schema, there should be 4 tables:
“travel_details”, ”employee_details”, “geo_cordinates”and “meeting_details”. We will add new table name ”FirstTable” with columns inside this table “id” and “name” and add one record as an example.
First we will connect to SampleTravelData database using db-visualizer. After connecting through db-visualizer it should look as shown below:
Note:In case you cannot connect to database shutdown the Helical Insight application and try again. Query to create new Table(FirstTable):
CREATE TABLE FIRSTTABLE (ID INT PRIMARY KEY, NAME VARCHAR(12));
After successfully executing the first query. It should look as shown below:
Query to populate FirstTable:
INSERT INTO FIRSTTABLE VALUES (10,'TEN'),(20,'TWENTY'),(30,'THIRTY');
After successfully running the query table should look as shown below:
Next restart the application. After restarting you should be able to connect to the database and at the time of creating metadata you can see the new table (FirstTable) is visible and corresponding columns should also visible as shown in below image.
you can use FirstTable to create charts and tables.
In case if you have any queries please get us at firstname.lastname@example.org