Episode #10 | Create a Database


Thursday, 25 Oct 2018 Kudzai Nyandoro 6:55 Minutes

Description:

A database is a collection of information that is electronically stored in a particular way for easy access. PostgreSQL is a database management system (DBMS), a tool used for retrieving information from the database using Structured Query Language (SQL).

Notes:

Create a database named rivers, , notice you're not yet in the PostgreSQL console. Hint ... hint $

$ createdb rivers

Enter into the default database

$ psql 

Delete a database named rivers, notice that you're now in the Postgres console. Hint ... hint postgres#=

postgres=# DROP DATABASE rivers;

Create a database named rivers. Compare the syntax used in step one with the one below.

postgres=# CREATE DATABASE rivers;

Connect to the rivers database

postgres=# \c rivers

List the databases

rivers=# \l

Exit

=# \q