Postgres Flashcards
Why do we ie databases in Web Development?
When you’re handling complex data its better to have it in a data base due to the simplicity to how easy it is to access. As well as it being reliable
What is PostgreSQL and what are some alternative relational databases?
An open source relational database. MySQL, SQL Server by Microsoft
What are some advantages of learning a relational database?
To be able to reference datasets, to be able to store and access data
What is one way to see if PostgreSQL is running?
with the ‘sudo service postgresql status’ command (sudo stands for super user do , it allows you to run as an admin)
What is a database schema?
A schema defines how the data in a relational database should be organized. 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. The definition of the structure of everything included in the database.
What is a table?
A table is a list of rows each having the same set of attributes. Every row in a table must have the same column
What is a row?
A row is an object, instance of the data or an item.
What is an attribute and what other names are used to describe them?
Attributes are commonly referred to as columns. Property, key
How do you create a database?
with the ‘ $ createdb “mydb” ‘ command ,
another way is including an absolute path, ex:
‘ $ /usr/local/pgsql/bin/createdb “mydb” ‘
How do you remove a database?
With the ‘ $ dropdb “mydb” ‘ command