Creating a bash script that create/open database

Hi.
I have two text files(tables) which include some information and I want to make some query codes using them.

First of all, I want to create bash script that read this two tables, create/open database and insert data from files into database.

#!/bin/bash

while read line; do
      echo "$line"
  done < text1.txt

This is just simple code for reading text1.txt file in bash script.
The problem is that I don't know how can I create/open database through the bash script.
Do you have any idea?
Thanks.

Is this homework?