#include #include struct MyStruct { MyStruct(int value) { if (value
Blog
#include #include class Person { std::string name; int age…
#include #include class Person { std::string name; int age; public: Person(std::string name, int age) : name(name), age(age) {} }; std::ostream& operator
Why is DRAM considered volatile memory?
Why is DRAM considered volatile memory?
#include #include #include std::mutex mtx1, mtx2; int sha…
#include #include #include std::mutex mtx1, mtx2; int shared_resource_1 = 0; int shared_resource_2 = 0; void thread1() { for (int i = 0; i
Consider a banking application where a transaction transfers…
Consider a banking application where a transaction transfers $100 from Account A to Account B. The transaction follows these steps: Debit $100 from Account A. Credit $100 to Account B. Commit the transaction. Assume that after 1 (Debit $100 from Account A) and before 2 (Credit $100 to Account B), the system crashes. Which ACID property ensures the changes persist on disk even after a system crash?
A 2Q buffer replacement policy is managing a 3-frame buffer…
A 2Q buffer replacement policy is managing a 3-frame buffer pool. The current state of the queues is: LRU Queue (ordered least recently used first → most recently used last): {1} FIFO Queue (ordered oldest inserted first → newest inserted last): {2} The next page reference is 2. What will be the new state of the queues after this access?
A 2Q buffer replacement policy is managing a 3-frame buffer…
A 2Q buffer replacement policy is managing a 3-frame buffer pool. The current state of the queues is: LRU Queue (ordered least recently used first → most recently used last): {1, 2} FIFO Queue (ordered oldest inserted first → newest inserted last): {} The next page reference is 3. What will be the new state of the queues after this access?
SELECT PostID, UserID, Content, PostDate FROM Posts; Can…
SELECT PostID, UserID, Content, PostDate FROM Posts; Can the output table of this query change across multiple executions?
You are designing a data warehouse application that aggregat…
You are designing a data warehouse application that aggregates financial data by product, time-period, and city. Data is uploaded once per day at midnight. What type of workload does this represent?
What is the correct order of evaluation for relational opera…
What is the correct order of evaluation for relational operators in SQL?