This tutorial shows how to create an Online Phone Book with search feature using
Oracle Database and SQLDeveloper.
What’s needed?
Let’s roll…
1. First let’s prepare our data set in excel sheet.
= "INSERT INTO MYPHONEBOOK (FIRST_NAME, LAST_NAME, PHONE_NUMBER) VALUES ( '"&A2&"', '"&B2&"', '"&C2&"');"
Apply above formula to all rows in excel sheet:
2. Next, let’s create a table “MYPHONEBOOK” in a database:
The following SQL DDL does the job (a table with three columns):
CREATE TABLE MYPHONEBOOK ( "FIRST_NAME" VARCHAR2(20 CHAR), "LAST_NAME" VARCHAR2(20 CHAR), "PHONE_NUMBER" VARCHAR2(20 CHAR) ) ;
3. Our Table is ready for data load; copy and paste all insert statements into SQLDeveloper’s worksheet and run it;
INSERT INTO MYPHONEBOOK (FIRST_NAME, LAST_NAME, PHONE_NUMBER) VALUES ( 'Donald', 'OConnell', '650.507.9833'); INSERT INTO MYPHONEBOOK (FIRST_NAME, LAST_NAME, PHONE_NUMBER) VALUES ( 'Douglas', 'Grant', '650.507.9844'); INSERT INTO MYPHONEBOOK (FIRST_NAME, LAST_NAME, PHONE_NUMBER) VALUES ( 'Jennifer', 'Whalen', '515.123.4444'); ... ... ...
4. Now let’s create an Online Phone Book using SQLDeveloper’s export feature:
5. We are done! Now embed htm file at any webhosting plan, web server or use it locally. Enjoy your online phone book with searching …
Click here to see a working example of the Online Phone Book.
Cheers!!