Skip to content

Database and a client interface for an Art Gallery, using PSQL, Python and psycopg2

License

Notifications You must be signed in to change notification settings

simonaslaurinavicius/art-gallery-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database and a client interface for an Art Gallery, using PSQL, Python and psycopg2

Made as a study project for my Databases class at Vilnius University. Goal of the project was to put theoretical knowledge into practice by making your own database from scratch.

Development was split into several parts:

  • ER and Retalional Schema models for the database.
  • SQL sentences to create the structure of the database: tables, views, triggers and indexes.
  • Client interface for a database in a programming language of your choice.

Chose Art Gallery as I was familiar with this kind of bussiness and could think of more real life cases while designing the database.

It's important to note that the language used for database structures and client interface is in Lithuanian.

Table of contents

Requirements

Project requires:

  • Python: tested with python3 only, also shebang line specifies python3 as an interpreter.
  • psycopg2

Setup

To install Python go to Python Downloads
To install psycopg2 module go to Install psycopg2

Run

To create a database

Assuming you've navigated to sql folder locally and from there connected to PSQL with a user that has CREATEDB privilege, run:

\i create_db.sql

To start a client interface

Assuming you have your PSQL server up and running, navigate to program folder locally and run:

python3 db.py

Using shebang line:

sudo chmod +x db.py
./db.py

License

This project is licensed under the MIT License - see the LICENSE file for details

References

About

Database and a client interface for an Art Gallery, using PSQL, Python and psycopg2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published