SQL and Postgres Flashcards

1
Q

SQL

A

language of relational databases
SQL statements can be categorized into two main groups: 1. Data Definition
2. Data Manipulation

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

SQL data definition

A

ex. such as creating tables

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

SQL data manipulation

A

ex. inserting and deleting data from tables

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

PostgreSQL

A

Relational database management system

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

Database management system (include?)

A

usually includes:

  1. Data Definition Language
  2. Data Manipulation Language
  3. security system to prevent unauthorized access
  4. system to maintain the integrity of the data
  5. concurrency control system for allowing shared access to the database
  6. recovery control system to restore the database in the event of a hardware or software failure
  7. other utilities to facilitate secure, fast, scalable, data access
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Relational Databases

A

data and the relationship between them are represented as tables.

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

relationship of sql and postgres sql

A

sql is the language of postgresql that does data definiteon and data manipulation
sql is the panguage used in postgresql to do data definition and data manipulation

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

What is an XSS attack and do you know any steps to take to prevent them?

A

Cross-site scripting (XSS)
an embedded piece of JavaScript inside content from an API response. This JavaScript gets into your user’s castle (browser), it then reads their secured data, such as; API tokens, authentication tokens, account details… and then sends them to another malicious server! The malicious server can store the token and use it to do damage to your user’s account.
client side code that could make website to run someone else’s code
prevent XSS attacks by “sanitizing” the content in our response data.

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

What are environmental variables and what might you put in them?

A

.env file
Which HTTP port to listen on
What path and folder your files are located in, that you want to serve
Pointing to a development, staging, test, or production database

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

Why use env variables?

A

they externalize all environment specific aspects of your app and keep your app encapsulated. Now you can run your app anywhere by modifying the environment variables without changing your code and without rebuilding it!

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

when use env variables?

A

any place in your code that will change based on the environment

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