Skip to content

Commit 8037e25

Browse files
committed
adding questions on DB
1 parent 8114ba4 commit 8037e25

File tree

2 files changed

+51
-4
lines changed

2 files changed

+51
-4
lines changed

README.md

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[Node JS](#table-of-contents---node-js)<br/>
55
[Express JS](#table-of-contents---express-js)<br/>
66
[MongoDB and Mongoose](#table-of-contents---mongodb-and-mongoose)<br/>
7+
[Database Engineering](#table-of-contents---database-engineering)<br/>
78
[Golang](#table-of-contents---golang)<br/>
89
910

@@ -767,8 +768,9 @@
767768
Routing is the process of determining what should happen when a URL is called, or also which parts of the application should handle a specific incoming request.<br/>
768769
769770
In the Hello World example we used this code<br/>
771+
770772
```
771-
app.get('/', function(req, res) {
773+
app.get('/', function(req, res) {
772774
/* */
773775
})
774776
//This creates a route that maps accessing the root domain URL / using the HTTP GET method to the response we want to provide.
@@ -813,7 +815,6 @@
813815
814816
app.use(express.static('public'))
815817
816-
817818
app.listen(3000, () => console.log('Server ready'))
818819
```
819820
@@ -1363,4 +1364,50 @@
13631364

13641365
A Go compiler goes through the following steps , they are in brief , if we go in detail then you will need a complete book to understand each module, for interview purpose , I have attached a hand written note , I will generate a digital form soon
13651366

1366-
![go compiler](/img/go_compiler.jpeg)
1367+
![go compiler](/img/go_compiler.jpeg)
1368+
1369+
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1370+
1371+
1372+
1373+
1374+
### Table of Contents - Database Engineering
1375+
1376+
1377+
| No. | Questions |
1378+
| --- | --------- |
1379+
| | **Database Engineering** |
1380+
| 1 | [What is ACID Model in Database?](#what-is-acid-model-in-database)
1381+
| 2 | [What does ACID acronym mean?](#what-does-acid-acronym-mean)
1382+
| 3 | [Explain in brief the ACID Model?](#explain-in-brief-the-acid-model)
1383+
| 4 | [What are the read phenomena in Isolation?](#what-are-the-read-phenomena-in-isolation)
1384+
| 5 | [What are the four Isolation levels?](#what-are-the-four-isolation-levels)
1385+
1386+
1. ### What is ACID Model in Database?
1387+
1388+
The ACID database transaction model ensures that a performed transaction is always consistent. This makes it a good fit for businesses which deal with online transaction processing (e.g: finance institutions) or online analytical processing (e.g: data warehousing). These organizations need database systems which can handle many small simultaneous transactions. There must be zero tolerance for invalid states
1389+
1390+
1391+
**[ Back to Top ⬆ ](#table-of-contents---database-engineering)**
1392+
1393+
2. ### What does ACID acronym mean?
1394+
* A - Atomicity
1395+
* C - Consistency
1396+
* I - Isolation
1397+
* D - Durability
1398+
1399+
3. ### Explain in brief the ACID Model?
1400+
* **Atomicity**: Each transaction is either properly carried out or the process halts and the database reverts back to the state before the transaction started. This ensures that all data in the database is valid .<br/>
1401+
* **Consistency**: The database must remain in a consistent state after any transaction. No transaction should have any adverse effect on the data residing in the database , also a DB should have Atomicity and Isolation for this property.<br/>
1402+
* **Isolation**: Any reads or writes performed on the database should not be impacted by other reads and writes of separate transactions occurring on the same database.<br/>
1403+
* **Durability**: The database should be durable enough to hold all its latest updates even if the system fails or restarts .
1404+
1405+
**[ Back to Top ⬆ ](#table-of-contents---database-engineering)**
1406+
1407+
4. ### What are the read phenomena in Isolation?
1408+
* **Dirty Read**:A Dirty read is the situation when a transaction reads a data that has not yet been committed .<br/>
1409+
* **Non Repeatable read**: Non Repeatable read occurs when a transaction reads same row twice, and get a different value each time.<br/>
1410+
* **Phantom Read**: Phantom Read occurs when two same queries are executed, but the rows retrieved by the two, are differen i.e a new row might have been inserted or deleted
1411+
1412+
**[ Back to Top ⬆ ](#table-of-contents---database-engineering)**
1413+

sentence_to_hashing_converter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ function hashing(num=0,str) {
2020
return `| ${num} | [${str}?](#${hashed})`
2121
}
2222

23-
console.log(hashing(11,'How does a go compiler work'));
23+
console.log(hashing(5,'What are the four Isolation levels?'));

0 commit comments

Comments
 (0)