FAQs for "The Structured Query Language" on Coursera

The current version (2.0) of bit.io includes some changes relative to the version (1.0) used to develop the courseware for The Structured Query Language course on Coursera. We have compiled a list of FAQs related to these changes.

📘

Getting a smoother start with bit.io and SQL

If you are new to bit.io and SQL, we highly recommend working through our guides Getting started with bit.io and SQL Crash Course.

1. Why am I getting "Query failed: relation "alanparadise/nw"."orders" does not exist"?

In version 2 of bit.io, you can check the available schemas and tables for a database page using the left-most UI component. If you receive an error of the format Query failed: relation "alanparadise/nw"."orders" does not exist, make sure that you see both the schema (name before the "/") and table (name after the "/").

1705

In this screenshot, we are on the "alanparadise/nw" database page and can query the "orders" table within the "alanparadise/nw" schema.

A common source of confusion is trying to query a schema and table from a separate database page, as shown below (note the left-most UI component no longer shows the schema and table). This is currently not supported in version 2 of bit.io.

1696

In this screenshot, we are on the "bitdotio/demo_db" database page and cannot query the "orders" table within the "alanparadise/nw" schema.

🚧

INSERT INTO [table_name] SELECT * FROM "alanparadise/nw"."orders";

For the same reason described above, it is not currently possible to insert data into a table in your own database (e.g. "bitdotio/demo_db" above) directly from a public database such as "alanparadise/nw".

Instead, we currently recommend that you:

  1. Download tables from the instructor's database (click the download button and download as csv).
  2. Create a schema named "alanparadise/nw" in your own, private database:
    CREATE SCHEMA "alanparadise/nw";
  3. Upload the csv files for the tables to your private schema "alanparadise/nw" using the "Upload Data" button.

Now, you have a copy of the instructor's data accessible in your own private database.

2. Why am I getting "Query failed: schema "alanparadise/nw" does not exist"?

If you receive this message when trying to create a table in your private database, you first need to create your own schema named "alanparadise/nw".

1697

Notice that our private database doesn't have a schema named "alanparadise/nw". We don't include any columns in this example, but typically you would define your columns in a CREATE TABLE statement.

You can create a schema with the name "alanparadise/nw" as follows:

CREATE SCHEMA "alanparadise/nw";
1697

We now have a schema named "alanparadise/nw", and can create the table. We don't include any columns in this example, but typically you would define your columns in a CREATE TABLE statement.

3. Why am I getting "Query failed: Permission Denied"?

Unless you are the owner of a public database or have been granted access by the owner or an owner-delegated admin, you will have read-only access. For example, this means that you can't create or drop tables, insert or remove data, or alter the database schema or records in anyway.

You can read more about permissions and sharing on bit.io in our guide, Getting Started with bit.io.

1695

"alanparadise/nw" is a public database, but that doesn't mean we as the user "bitdotio" can create a new table in it. Instead, we need to create a table in our private database.