From fd7e129d09e6b1da98f3ab1652382fec9c890760 Mon Sep 17 00:00:00 2001 From: abregman Date: Sun, 12 Jan 2020 20:18:40 +0200 Subject: [PATCH] Add a couple of questions --- README.md | 93 +++++++++++++++++++++++++++++++++++++++++-- credits.md | 2 +- images/databases.png | Bin 0 -> 2963 bytes 3 files changed, 90 insertions(+), 5 deletions(-) create mode 100644 images/databases.png diff --git a/README.md b/README.md index 35b6302..b62a1f6 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ HR
HR
+ Databases
Databases
Design
Design
you
Questions you ask
Challenges
Challenges
@@ -676,7 +677,7 @@ True #### AWS Databases
-What is RDS?
+What is Amazon RDS?
@@ -686,6 +687,19 @@ True 2. Read Replicas - for better performances
+
+What is AWS Redshift and how its different than RDS?
+
+ +
+What do you if you suspect AWS Redshift performs slowly?
+ +* You can confirm your suspicion by going to AWS Redshift console and see running queries graph. This should tell you if there are any long-running queries. +* If confirmed, you can query for running queries and cancel the irrelevant queries +* Check for connection leaks (query for running connections and include their IP) +* Check for table locks and kill irrelevant locking sessions +
+
What is EBS?
@@ -1556,7 +1570,7 @@ If you mention at any point ps command with arugments, be familiar with what the
-What strace does?
+What strace does? What about ltrace?
@@ -1840,7 +1854,11 @@ If wait is not used by a parent process then a child process might become a zomb
-What happens when you execute ls?
+What happens when you execute ls -l?
+ +* Shell reads the input using getline() which reads the input file stream and stores into a buffer as a string +* The buffer is broken down into tokens and stored in an array this way: {"ls", "-l", "NULL"} +* Shell checks if an expansion is required (in case of ls *.c)
@@ -2731,7 +2749,16 @@ Statements are instructions executed by the interpreter like variable assignment SOLID design principals are about: -* Make it easier to extend functionality +* Make it easier to extend the functionality of the system +* Make the code more readable and easier to maintain + +SOLID is: + +* Single Responsibility - A class should only have a single responsibility +* Open-Closed - An entity should be open for extension, but closed for modification. What this practically means is that you should extend functionality by adding a new code and not by modifying it. Your system should be separated into components so it can be easily extended without breaking everything. +* Liskov Substitution - Any derived class should be able to substitute the its parent without altering its corrections. Practically, every part of the code will get the expected result no matter which part is using it +* Interface segregation - A client should never depend on anything it doesn't uses +* Dependency Inversion - High level modules should depend on abstractions, not low level modules
@@ -3370,6 +3397,10 @@ with open('file.txt', 'w') as file: ```
+
+How to print the 12th line of a file?
+
+
How to reverse a file?
@@ -5646,6 +5677,10 @@ TODO: explain what is actually a Cookie What is faster than RAM?
+
+What is a memory leak?
+
+
What is your favorite protocol?
@@ -5828,6 +5863,56 @@ you can show how you'd be able to mitigate that problem. Not only this will tell you what is expected from you, it will also provide big hint on the type of work you are going to do in the first months of your job.
+## Databases + +
+What is a connection pool?
+ +Connection Pool is a cache of database connections and the reason it's used is to avoid an overhead of establishing a connection for every query done to a database. +
+ +
+What is a connection leak?
+ +A connection leak is a situation where database connection isn't closed after being created and is no longer needed. +
+ +
+What is Table Lock?
+
+ +
+Your database performs slowly than usual. More specifically, your queries are taking a lot of time. What would you do?
+ +* Query for running queries and cancel the irrelevant queries +* Check for connection leaks (query for running connections and include their IP) +* Check for table locks and kill irrelevant locking sessions +
+ +
+What is a connection leak?
+
+ +
+What is a Data Warehouse?
+ +"A data warehouse is a subject-oriented, integrated, time-variant and non-volatile collection of data in support of organisation's decision-making process" +
+ +
+What is a data lake?
+ +A single data source (at least usually) which is stored in a raw format. +
+ +
+What is OLTP (Online transaction processing)?
+
+ +
+What is OLAP (Online Analytical Processing)?
+
+ ## Design #### Architecture diff --git a/credits.md b/credits.md index 5ba915b..8fc7878 100644 --- a/credits.md +++ b/credits.md @@ -12,4 +12,4 @@ Linux, Kubernetes and Prometheus logos are trademarks of The Linux Foundation®< Mongo logo is a trademark of Mongo®
Distributed logo by Flatart
Challenge icon by Elizabeth Arostegui in Technology Mix -"Question you ask" icon (man raising hand) by [Webalys](https://www.iconfinder.com/webalys) +"Question you ask" (man raising hand) and "Database" icons by [Webalys](https://www.iconfinder.com/webalys) diff --git a/images/databases.png b/images/databases.png new file mode 100644 index 0000000000000000000000000000000000000000..e335ebd00685997b3a7ff0c8090eac86eb772e3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