Pre populated SQLite database is the database which will be created before its use in mobile development. Developer can manually create the database, tables in database and insert records inside it. To create pre populated database we’ll to use DB Browser for SQLite a free software available. In today’s tutorial we would learn about How to use DB Browser for SQLite for mobile development purpose. So in this tutorial we would discuss about Example of Creating Pre Populated SQLite Database For React Native.
Contents in this project Example of Creating Pre Populated SQLite Database For React Native:
1. Step 1 is to download and install the DB Browser for SQLite in your operating system. Here is the link of their download page, Download the file as per your system.
2. After successfully done downloading, Install the Browser in your system.
3. Click on the DB Browser(SQLite) icon present on your Desktop screen.
6. Not it will open the Edit Table definition window, Enter the Table name then create table fields. After creating all the table fields hit the Enter button to save the table. I’m creating a table named as class10th with 4 fields student_id, student_name, student_phone_number and student_address.
7. Here you go, Now your table has been successfully created. Next step is Inserting Data into table. Click on Brows Data -> Select your Table -> Insert a new record in current table and enter records manually.
Note: All the records in this table are completely random and just for testing purpose.
10. Below is the screenshot of my school_details.db database.
Here you go friends, Now your Database is successfully created and ready to use in react native mobile application. In my next tutorial I’ll explain you how to integrate the SQLite database in react native app.