SQL and Postgres Flashcards
SQL
language of relational databases
SQL statements can be categorized into two main groups: 1. Data Definition
2. Data Manipulation
SQL data definition
ex. such as creating tables
SQL data manipulation
ex. inserting and deleting data from tables
PostgreSQL
Relational database management system
Database management system (include?)
usually includes:
- Data Definition Language
- Data Manipulation Language
- security system to prevent unauthorized access
- system to maintain the integrity of the data
- concurrency control system for allowing shared access to the database
- recovery control system to restore the database in the event of a hardware or software failure
- other utilities to facilitate secure, fast, scalable, data access
Relational Databases
data and the relationship between them are represented as tables.
relationship of sql and postgres sql
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
What is an XSS attack and do you know any steps to take to prevent them?
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.
What are environmental variables and what might you put in them?
.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
Why use env variables?
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!
when use env variables?
any place in your code that will change based on the environment