Database Archive

Postgres sql database cheatsheet

In this post, I am installing postgres on ubuntu and then will perform different sql operations on it. Installation commands may vary with other distributions like CentOS or Mac. To install: sudo apt-get update sudo apt-get install postgresql postgresql-contrib This will also install other dependencies. To connect to Postgres: sudo su - postgres psql To check the

Database Notes

  Relational database management system (RDBMS) A relational database like SQL is a collection of data items organized in tables. ACID is a set of properties of relational database transactions. Atomicity – Each transaction is all or nothing Consistency – Any transaction will bring the database from one valid state to another Isolation – Executing transactions concurrently has the same