Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Nakul Vachhrajani is a Technical Specialist & Systems development professional with iGATE. He holds a MCTS (SQL Server 2008: Implementation & Maintenance)
Browse by Tags · View All
#SQLServer 242
SQL Server 241
Administration 208
DBA 197
Tips 186
Development 186
T-SQL 181
#TSQL 179
Guidance 123
Tools and Utilities 112

Archive · View All
April 2011 14
March 2012 11
December 2011 11
March 2011 11
December 2012 10
October 2011 10
January 2011 10
January 2013 9
November 2012 9
October 2012 9

#0184-SQL Server-Quiz-Which database does not follow one of the ACID properties? Prize: Two (2) Pluralsight training codes!

Aug 6 2012 12:00AM by Nakul Vachhrajani   

Any RDBMS system follows a certain set of general principles that are geared towards ensuring the integrity of the data residing within the database. These fundamental principles are collectively known as ACID properties, which every database within an RDBMS system should confirm to.

  • Atomicity:
    • At a transaction level, this is the all-or-nothing approach, i.e. either all changes are committed or none – one cannot have a partially committed transaction
    • Example: A parallel can be established with the banking industry – when transferring funds from one bank account to another, it is imperative that the amount of money deducted from the source account are credited to the destination account. It is not acceptable to have a deduction from one account, but no credit to another account (that would be a scam!). If something goes wrong during the transaction, the rollback needs to be triggered in both systems – source and destination
    • Similarly, all RDBMS systems need to ensure that if something goes wrong within any transaction, an “undo” or “rollback” happens for the non-committed transaction
  • Consistency:
    • Whenever any transaction is “committed”, the effect of the transaction should leave the database in a logically consistent state
    • Example: When adding sales data into a database, it would be logically inconsistent to enter a sales order without having a corresponding customer record. Through the use of foreign keys, the RDBMS ensures that one cannot leave the database in a logically inconsistent state when committing a transaction
  • Isolation
    • Each transaction should be isolated (or protected) from the effects of other concurrently running transactions
    • This means that although multiple transactions are running in parallel, the net effect of the execution of the execution should be identical to that of executing all transactions in series (i.e. one after another in some serial order)
    • Example: Taking our banking example further, let’s assume that John wants to transfer $100 to Jack’s account. Jack wants to transfer $75 to Steve’s account. Both are separate transactions, but the net effect of these transactions is that Jack will end up with $25 more than his base balance ($x). Here’s how: [($x + $100) – ($75)] = $x + $25. If this is not the end result, the system is no good
  • Durability
    • Durability simply means that once a transaction has been completed, it’s effect must be persisted within the database irrespective of the state of the system (i.e. even in case of a system crash, the data must be permanently committed to disk upon recovery)
    • Example: Continuing our example of the banking system, if the system goes down in the middle of the banking transaction, Atomicity would ensure that uncommitted transactions are rolled back. However, if the system goes down after completion of the transaction, then changes made to all accounts involved must remain as-is when the system comes back online

The Question – Which SQL Server database does not follow one of the ACID properties?

Every user database within Microsoft SQL Server follows these ACID properties. However, there is one special case – one database which does not support one of the ACID properties. The question today is:

Which SQL Server database does not follow one of the ACID properties?

Bonus Questions!!!

Here are two (2) bonus questions which you can answer – the bonus questions also contribute to the prize-winning questions!

  1. Based on the answer to the basic question, name the ACID property which the database does not follow
  2. Explain, in your own words, the reason why you believe the database does not follow the said ACID property

Rules

The rules are very simple:

  1. You can answer these questions till Wednesday 22:00hrs (IST)/Wednesday 12:30hrs (US-EDT) – August 08, 2012
  2. Answers will be shared and winners declared in my post on Thursday, August 09, 2012
  3. You can answer multiple times – however, at the end of the day, only one entry would be considered
  4. Follow the following on Twitter!
  5. Winners will be chosen randomly

Remember: Participation is always more important! Make sure you reply to the quiz even if it's just a guess! 

Until we meet next time,

Be courteous. Drive responsibly.

Tags: #SQLServer, SQL Server, Administration, Development, DBA, T-SQL, #TSQL, Community


Nakul Vachhrajani
4 · 33% · 10690
7
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

9  Comments  

  • 1.Tempdb does not Follow all ACID rules.

    Answer of Bonus Question

    1.Tempdb Does not follow property Durability.

    2.Tempdb is created whenever sql server is restarted so all changes in tempdb are gone.what if system is crash and starts again we will have news tempdb.

    commented on Aug 6 2012 1:01AM
    Gaurang Patel
    238 · 1% · 189
  • It's tempdb database and it doesn't follow Durability property of ACID. The reason is this database is cleared on every SQL server start, so there is no need to recover data in it

    commented on Aug 6 2012 1:17AM
    Olga Medvedeva
    66 · 3% · 878
  • Nice question Nakul.

    My answer is: TempDB (Does not follow: Durability)

    Reason: SQL Server build/create 'TempDB' whenever we restart the server/service. If you are doing some calculation using TempDB (you are in middle of something) and suddenly SQL Server crashes and you have to restart the server/service then all your temporary data stored in TempDB is no longer available. You have to start your process once again.

    It is correct behavior (logicall as well) as TempDB is created for temporary purpose only. So, whenever connection has been closed, local temp tables are also dropped automatically.

    commented on Aug 6 2012 1:23AM
    Hardik Doshi
    20 · 9% · 2839
  • All user databases in SQL Server must and do support ACID. All that's left are the system databases, which are:

    • master - the repository for system stored procedures, schema views, functions, DM views, and so on.
    • model - an empty, basic database that new databases are copied from.
    • msdb - the location where backup data, jobs, SSIS packages, and other server-level data is stored.
    • tempdb - a frequently-used data storage location that holds metadata about temporary object such as temp tables and table variables, as well as their data if not kept in memory. Also, when the server needs work tables, it stores them in tempdb. For example, if a query needs a hash plan and exceeds its memory grant, it will "spill" to tempdb. Tempdb is also used to maintain cursors, and it holds versions of table rows generated by snapshot isolation & row versioning isolation levels, online index operations, Multiple Active Result Sets (MARS), and AFTER triggers.

    Only one of these databases has any reason for or allowance of not supporting all the properties of ACID: tempdb.

    1. The ACID property it does not support is durability.
    2. The reason it does not maintain durability is that in tempdb, data is temporary by nature, and upon certain conditions this data will be abandoned and not persisted/permanently committed to disk:

      • When the session that created a temp table disconnects, the temp table is destroyed. Note: this includes temporary stored procedures, as well as all normally-named objects that are created while using the tempdb database, e.g. USE tempdb; CREATE TABLE a (b int); actually creates a temporary table which is destroyed upon disconnect.
      • When the session that created a global temp table disconnects, and all the sessions referring to it disconnect, the global temp table is destroyed.
      • When all the other uses for tempdb mentioned above are no longer needed, the associated data is abandoned:
        • a work table is no longer needed
        • row versions no longer need to be maintained
        • a cursor is closed
        • MARS are closed
        • an AFTER trigger completes, and so on.

    Note that when data in tempdb is "destroyed" this does not mean that all the data is immediately overwritten, but that the metadata about the data is deleted. This is true in any database, not just tempdb. When a table is dropped, only the minimum I/O is done necessary to "deallocate."

    commented on Aug 6 2012 1:52AM
    ErikEckhardt
    65 · 3% · 891
  • Answer is :TempDB Database.

    because when the SQl Server restarted We will get new TempDb ,all changes are gone.

    and tempDb does not follow "Durability" property of ACID.

    commented on Aug 6 2012 1:52AM
    Nirav Gandhi
    38 · 5% · 1517
  • The answer is TempDB. TempDB does not meet the Durability property. TempDB is created at SQL Server startup from a copy of Model database.

    commented on Aug 6 2012 6:18AM
    jlnoll
    2904 · 0% · 2
  • Answer is TempDB Database.

    commented on Aug 7 2012 4:17AM
    sk2000
    506 · 0% · 73
  • I agree with comments. Because answer is same in all the comments.

    commented on Aug 7 2012 5:15AM
    Ramkoti
    415 · 0% · 95
  • sk2000, first of all the question was:

    Which SQL Server database does not follow one of the ACID properties?

    SQL Server is RDBMS, not NoSQL DBMS. And one more thing: NoSQL is a movement and the BASE (Basically Available, Soft state, Eventual consistency) claimed to be the opposite of ACID. But there are some NoSQL databases that have ACID transactions (for example, Berkeley DB; GT.M. and others).

    commented on Aug 7 2012 11:52PM
    Olga Medvedeva
    66 · 3% · 878

Your Comment


Sign Up or Login to post a comment.

"#0184-SQL Server-Quiz-Which database does not follow one of the ACID properties? Prize: Two (2) Pluralsight training codes!" rated 5 out of 5 by 7 readers
#0184-SQL Server-Quiz-Which database does not follow one of the ACID properties? Prize: Two (2) Pluralsight training codes! , 5.0 out of 5 based on 7 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]