FAQ - Databases

Everything related to lectures, exercises and projects - and even additional stuff

Recommendations

1) Use lower letters for creating objects in a PostgreSQL database

2) No special characters - No reserved keywords for object names in a database

3) Put comments to all your tables and all your columns

4) Name your primary keys, foreign keys or spatial indices with a constant speaking name pattern

Modelling

In our tree table we have a categorical attribute which is a color component (red, green blue). Shall we write the text values in a text-column or encode the text values with numbers?

SQL General Questions

Which datatypes should I use for tables in PostgreSQL with PostGIS?

Which column datatypes or subtypes exist in a table?

Can we automatically count up an identification field in a table?

How can I retrieve a limited number of rows in a SELECT Query?

How can I grant or revoke a table to a different user?

How difficult is it to store files in the DB (e.g. .pdf, .docx, .wav or others)?

Other Material

Can a PostreSQL database be accessed via PHP or other programming languages?

Errors