Postgres Flashcards

1
Q

Why do we ie databases in Web Development?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is PostgreSQL and what are some alternative relational databases?

A

An open source relational database. MySQL, SQL Server by Microsoft

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some advantages of learning a relational database?

A

To be able to reference datasets, to be able to store and access data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is one way to see if PostgreSQL is running?

A

with the ‘sudo service postgresql status’ command (sudo stands for super user do , it allows you to run as an admin)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a database schema?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a table?

A

A table is a list of rows each having the same set of attributes. Every row in a table must have the same column

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a row?

A

A row is an object, instance of the data or an item.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an attribute and what other names are used to describe them?

A

Attributes are commonly referred to as columns. Property, key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you create a database?

A

with the ‘ $ createdb “mydb” ‘ command ,
another way is including an absolute path, ex:
‘ $ /usr/local/pgsql/bin/createdb “mydb” ‘

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you remove a database?

A

With the ‘ $ dropdb “mydb” ‘ command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly