Create Database from CSV

Create a new database and populate it with data from a CSV file

For this exercise we will use the tweets.csv file.

Download this file to your home directory (right-click on link and select 'Save Link As')

In DB Browser

  • Select 'New Database' from the top left menu
  • Save the database as trump.db and save it to your home directory
  • When the 'Edit table Definition' box appears select 'Cancel'
  • Select 'File'
  • Hover over 'Import'
  • Select 'Table from CSV file'
  • Browse to the 'tweets.csv' file, select it and click 'Open'
  • A preview of the data is displayed; make sure the 'Column Names in Fist Row' checkbox is ticked and click on OK
  • Click 'Write Changes'