Building a database for crime reports

  • Guided Project
  • 0.8 hours
  • Intermediate
  • Python
  • SQL

Practice creating databases, schemas, and tables in PostgreSQL to store and manage crime report data.

Overview

In this project, you'll assume the role of a database administrator tasked with building a PostgreSQL database to store data on crime reports in Boston. You'll apply your knowledge of creating databases, schemas, tables, users, and groups to develop an organized system for managing this important data. This hands-on project allows you to showcase your database design and management skills using PostgreSQL. You'll create a logical database structure, define appropriate data types, set up user permissions, and load data from CSV files. These are essential skills for working with databases in a professional setting. Objective: Use PostgreSQL to build a database with proper schemas, tables, and user roles to efficiently store and manage crime report data.

What You'll Learn

  • Build a database
  • Load CSV data into a database

Before You Start

  • Understanding Postgres and its differences from other databases
  • Creating Postgres tables with appropriate data types
  • Loading CSV data into Postgres tables
  • Managing Postgres users and databases using security best practices

Project Steps

12 steps

  1. 1 Introduction
  2. 2 Creating the Crime Database
  3. 3 Obtaining the Column Names and Sample
  4. 4 Creating an Auxiliary Function
  5. 5 Finding the Maximum Length
  6. 6 Creating the Table
  7. 7 Loading the Data
  8. 8 Revoking Public Privileges
  9. 9 Creating User Groups
  10. 10 Creating Users
  11. 11 Testing
  12. 12 Next Steps

Join 1M+ data learners on Dataquest.

  1. 1

    Create a free account

  2. 2

    Choose a learning path

  3. 3

    Complete exercises and projects

  4. 4

    Advance your career