postgres Flashcards
- What is PostgreSQL and what are some alternative relational databases?
a. PostgreSQL is a powerful, free, open source Relational Database Management System (RDBMS).
b. It is often cited as the most advanced open source database of its kind and is well-liked by the developer community for its robust feature set, standards compliance, and reliability.
c. Other popular relational databases include MySQL (also free), SQL Server by Microsoft, and Oracle by Oracle Corporation.
- What are some advantages of learning a relational database?
a. Because of the frequency of use, by using relational databases, you are learning how a large portion of databases are utilized.
b. A quality of many relational databases is that they support good guarantees about data integrity.
c. They can store and modify data in a way that makes data corruption as unlikely as possible.
d. This means that developers can set up their database to reject “bad” data and not worry about data being “half written”
- What is one way to see if PostgreSQL is running?
a. Check the status of postgresql by using the command:
i. sudo service postgresql status
ii. in the terminal.
iii. Note – anything that runs under service, runs in the background and can be run in any portion of the terminal without hogging up the terminal.
- What is a database schema?
a. The schema defines the STRUCTURE of a database.
b. A collection of tables is called a schema.
c. A schema defines how the data in a relational database should be organized.
d. In relational databases, you typically have to define your schema up front and the database server will make sure that any data being written to the database conforms to that schema.
- What is a table?
a. Relational databases store data in relations, commonly referred to as tables.
b. A table is a list of rows each having the same set of attributes.
- What is a row?
a. Each row in a table is a single record of data.
b. This is similar with working with classes in OOP.
c. The table is defined by what attributes or columns each row or column should have
d. And each row is one instance of all of the attributes that a table has.