Once database is made, time to create tables to store the data.

Source CSV
"3413902336","3413925887","AU","AUS","AUSTRALIA"
"3413925888","3413927455","SG","SGP","SINGAPORE"
"3413927456","3413927471","CA","CAN","CANADA"
"3413927472","3413927487","US","USA","UNITED STATES"
SQLite Database Schema
<?php
// create database
$db sqlite_open("./ip.db");

/* create table to store country information */
sqlite_query("CREATE TABLE country_data (
    id INTEGER PRIMARY KEY,
    cc_code_2,
    cc_code_3,
    country_name
)"
$db);

/* create table to store IP ranges */
sqlite_query($db"CREATE TABLE ip_ranges (
    ip_start INTEGER,
    ip_end INTEGER,
    country_code INTEGER)"
);
?>
Notes