We accept

Transaction Management And Concurrency Control Computer Science Essay

As more networks and databases are connected jointly, the importance of a solid repository management system becomes noticeable. Deal and Concurrency Control, Recovery and Backup, and Security are major functions that needs to be examined when choosing the correct system. Databases that have your company's valuable information must be properly protected, backed up, and secure from data reduction and unauthorized gain access to.

In response to this necessity, both Oracle and Microsoft have applied strong features into their database products. This newspaper compares the offerings of the two databases in conditions of features, efficiency, and simple management.

Table of Contents



a) SQL Server Overview

b) Oracle Overview

Transaction Management and Concurrency Control

a) Overview of Transfer Management and Concurrency Control

b) SQL Server TM and CC

c) Oracle TM and CC

d) Comparison

Backup and Recovery

a) Summary of Backup and Recovery

b) SQL Server B and R

c) Oracle B and R

d) Comparison


a) Overview

b) SQL Server Security

c) Oracle Security

d) Comparison



This paper provides a comparative review of three data source management system functions: deal and concurrency control, recovery and backup, and security, between Microsoft SQL Server and Oracle. The reason is to enhance understanding of repository operation and, through contrast, provide insight into the commonalities and variations between two different systems.

Overview of Databases Management Systems

Microsoft SQL Server is a relational repository server, using its primary dialects being T-SQL and ANSI SQL. ANSI SQL is the North american National Requirements Institute standardized SQL and is used as the base for several different SQL dialects, including T-SQL. T-SQL is a proprietary expansion that uses keywords for the many operations that may be performed, such as creating and altering database schemas, going into and croping and editing data, and managing and monitoring the server. Any program that works through SQL Server will converse via T-SQL statements. T-SQL has some variances/extensions to basic SQL, including local factors, control of move language, changes to erase and update assertions, and support functions for time and string handling, and mathematics.

Version 1. 0 of SQL Server premiered in 1989 and started in Sybase SQL Server. Microsoft later ended the co-licensing arrangement with Sybase and went on to build up their own version of SQL Server. The most recent version is SQL Server 2008, released on August 6, 2008, and includes many advancements to accelerate and functionality, which is mentioned in further detail below.

Sample SQL Server Architecture Diagram


Oracle Data source is a relational database management system made by Oracle Company. Users can make use of the proprietary language extension to SQL, PL/SQL, or the object-oriented language Java to store and do functions and stored procedures.

Oracle V2 was first released in November 1979 and did not support ventures, but possessed basic query and become a member of functionality. The latest version is Oracle Databases 11g, released in 2007, and includes many enhancements to functionality, which is mentioned in further fine detail below.

Sample Oracle 11g Architecture Diagram


Transaction Management and Concurrency Control


A transaction, an individual logical product of work, is an action or group of actions that are performed by the user or program which can gain access to or change the repository contents. A transaction results in data source transformation from one consistent state to another, and can either result in success or failure. A failed transaction is aborted and the databases restores to the prior consistent express. The Databases Management System is accountable for making certain all updates related to the exchange are completed, or that balance is maintained regarding a failed transaction. Orders have four basic properties: Atomicity, Consistency, Independence, and Strength (ACID). Atomicity means that it's a single unit of work. Reliability ensures that data is actually held firmly along in a coherent talk about, even after a failed exchange or crash. Independence ensures that the consequences of an incomplete transaction are comprised and not noticeable to other deals. Durability means that successful transactions lead to long lasting changes to the express of the databases.

Concurrency control is the procedure of controlling and controlling simultaneous database functions. That is required because activities from different users and operations must not hinder operation, or the data source could be left in an inconsistent status. Potential issues that concurrency control can solve are lost revisions, inconsistent analysis, and uncommitted dependencies. The two main concurrency control techniques are locking and timestamping.

SQL Server TM and CC

SQL Server fulfills the ACID requirements by using purchase management, locking, and logging. An explicit transaction is created in SQL Server by using the BEGIN Purchase and COMMIT Business deal commands. ROLLBACK Business deal rolls back a deal to the start or another save point within the transfer. SAVE TRANSACTION sets a savepoint within the transaction by dividing the transfer into logical systems that can be delivered to if part of the transfer is conditionally cancelled.

Locking ensures transactional integrity and data source uniformity. In SQL Server, locking is automatically put in place, and provides both optimistic and pessimistic concurrency controls. Optimistic concurrency control assumes that tool conflicts are unlikely however, not impossible, and allows orders to perform without locking resources. Pessimistic concurrency control hair resources throughout a transfer. SQL Server can lock the next resources: RIDs, tips, pages, extents, furniture, and directories. It utilizes several lock settings, including shared, revise, exclusive, purpose, and schema hair. Shared locks enable concurrent read functions that do not change or upgrade data, like a SELECT statement. Update locks prevent a standard form of deadlock that occurs when multiple consultations are reading, locking, and potentially updating resources later. Exclusive locks are used for data changes operations, such as Put, Revise, or DELETE, and ensure that multiple improvements can't be made on a single resource at the same time. Intent locks are being used to establish a lock hierarchy, and include intent shared, intent exclusive, and shared with intent exclusive hair. Schema locks are used whenever a schema dependent procedure of a desk is executed, you need to include schema adjustment and schema balance locks.

A deadlock occurs when two transactions have locks on separate things and each end user is looking forward to a lock on the other thing. SQL Server can place deadlock concern by scanning for lessons that are looking forward to a lock question, and the Collection DEADLOCK_PRIORITY command line to customize deadlocking. The SETLOCK_TIMEOUT demand can set the utmost time a statement waits over a blocked source of information, because the timeout period is not enforced by default.

Oracle TM and CC

Oracle Data source offers two isolation levels, providing programmers with operational modes that preserve persistence and provide powerful. Affirmation level read regularity automatically provides read regularity to a query so that all the info the query recognizes comes from a single point in time when the query commenced. The query never perceives any dusty data or changes made during query execution. Purchase level read reliability extends read uniformity to all queries in a deal. Oracle uses rollback sections, containing old prices of data which may have been evolved by uncommitted or just lately committed orders, to provide consistent views and will not expose a query to phantoms.

Oracle Real Application Clusters (RACs) use cache-to-cache block transfer to copy read-consistent images of blocks between instances. It uses broadband, low latency interconnects to answer remote data block requests.

Isolation levels provided by Oracle Databases are read determined, serializable, and read-only. Users can make the appropriate isolation levels for transactions depending on type of program and workload, using these statements: SET Purchase ISOLATION LEVEL READ COMMITTED; Set in place Transfer ISOLATION LEVEL SERIALIZABLE; and SET Business deal READ ONLY. The ALTER Program function can then be used to improve isolation level for different transactions.

Read committed is the default transfer isolation level. Each query carried out by a exchange sees data devoted prior to the query begun. Oracle Database will not prevent other deals from modifying the data read by a query, so that data can be altered by other ventures between two query executions. This can lead to non-repeatable reads and phantoms in cases where the transaction runs the same query twice. This isolation level is good for when few trades will probably conflict, and can provide higher potential throughput.

Serializable ventures see only changes made at the beginning of the exchange, plus changes in the business deal itself through INSERT, UPDATE, and DELETE assertions. These transactions do not experience non-repeatable reads or phantoms. This isolation level is ideal for large databases and short ventures that update few rows, when there's a low chance that two concurrent orders will adjust the same rows, or where long-running orders are primarily read-only. A serializable purchase can alter a data row only if it can determine that previous changes were determined before the current transaction began. Oracle Repository uses control information in the data block to indicate which rows have devoted and uncommitted changes. The amount of record that is retained is determined by the INITRANS parameter of CREATE and ALTER TABLE. To avoid having inadequate recent record information, higher values can be established for INITRANS for furniture that will have many transactions updating the same blocks. When a serializable purchase fails with the CANNOT SERIALIZE ACCESS error, the application form can either commit the task executed to that point, do additional statements with ROLLBACK, or undo the entire transaction.

Read-only transactions see only changes made at the time the transaction began and don't allow INSERT, UPDATE, or DELETE claims.

Oracle Databases uses locks to control simultaneous access to data resources. Low-level serialization mechanisms called latches are used to protect distributed data structures in the System Global Area. Oracle automatically gets the required locks when performing SQL statements, using the lowest applicable degree of restrictiveness to provide the maximum data concurrency and data integrity. The user may also lock data manually. You will find two methods of locking: exclusive and talk about lock methods. Exclusive lock method prevents the associated learning resource from being shared, and is obtained to change data. The first deal to lock the data is the only person which can alter it until the lock is released. Talk about lock setting allows the associated learning resource to be shared, depending on the procedures. Users reading data can hold share locks to avoid a writer gain access to. Multiple ventures can have show locks on the same resource. All hair created by claims within a transaction last until the transfer is completed or undone.

Because row hair are obtained at the highest amount of restrictiveness, no lock alteration is necessary or performed. Oracle automatically converts table lock restrictiveness from lower to raised as appropriate. Lock escalation is when multiple hair are organised at one degree of granularity, and a database raises the hair to a higher level of granularity. An example is changing many row locks into one table lock. Oracle Database never escalates locks, because this escalates the chances of deadlocks. A deadlock occurs when several users are hanging around on data locked by each other. This can prevent ventures from continuing to work. Oracle automatically picks up deadlocks and solves them by moving back one of the assertions. User made deadlocks can be prevented by locking desks in the same order for trades accessing the same data.

Oracle Data source locks fall under three basic categories: DML hair (data locks), DDL locks (dictionary locks), and Internal hair and latches.

DML locks protect data (i. e. tables, rows). The purpose is to ensure the integrity of data accessed by multiple users. Row locking is the finest granularity and has the greatest concurrency and throughput. A transfer always acquires an exclusive row lock for each and every individual row altered by INSERT, Revise, DELETE, and SELECT with the FOR UPDATE clause. In case a transaction runs on the row lock, it also runs on the table lock for the equivalent table. Table locking is mainly used for concurrency control with DDL procedures. Table locks are being used when a desk is revised by the Put, Revise, DELETE, SELECT with FOR Upgrade, and LOCK Stand DML claims. These assertions require table hair to reserve DML access to the stand for the transfer and also to prevent conflicting DDL businesses. Table hair can be used at both stand and subpartition level for partitioned furniture. A stand lock can be held in the following methods, from least to many restrictive: row show (RS), row exclusive (RX), talk about (S), share row exclusive (SRX), and exclusive (X).

A row talk about desk lock is minimal restrictive, and has the highest degree of concurrency for a desk. It indicates the deal has locked rows in the desk and intends to update them. It is specified by the statement LOCK Stand "" IN ROW Show MODE. A row exclusive desk lock is somewhat more restrictive, and suggests the transaction retaining the lock has made a number of updates to rows in the desk or granted a SELECT FOR Upgrade statement. It really is given by LOCK Desk "" IN ROW EXCLUSIVE Function;. A share table lock is manufactured automatically for a desk given by the declaration LOCK Stand "" IN Talk about MODE;. A show row exclusive lock is more restrictive and is made for a table specified by the affirmation LOCK TABLE "" IN SHARE ROW EXCLUSIVE Function;. Exclusive table hair are the most restrictive and are given by the statement LOCK Desk "" IN EXCLUSIVE Function;.

DDL locks protect the framework of schema objects (i. e. stand explanations). Internal locks and latches are programmed and protect interior data buildings such as documents. Only individual schema items that are modified or referenced are locked during DDL businesses. The entire data dictionary is never locked. DDL hair have three categories: exclusive DDL locks, talk about DDL locks, and breakable parse locks. Exclusive and share DDL locks previous until DDL statement execution and automatic commit is complete.

Most DDL businesses require exclusive DDL hair for a learning resource to prevent disturbance with other DDL operations that might reference the same object. If another DDL lock has already been held, then the operation must hold out until the other lock is released to proceed. DDL procedures also create DML locks on the improved schema object.

Some DDL operations require talk about DDL locks to allow data concurrency for similar DDL businesses. A share DDL lock is created for the following statements: AUDIT, NOAUDIT, COMMENT, CREATE (OR REPLACE) VIEW/ Technique/ PACKAGE/ Offer BODY/ FUNCTION/ Cause, CREATE SYNONYM, and CREATE Stand (if CLUSTER is not used).

Breakable parse locks are acquired is established for a SQL statement and each schema object it references. A parse lock will not limit any DDL operation and can be damaged to allow conflicting DDL businesses. It really is created in the parse period of SQL assertion execution and presented as long as the distributed SQL area for the affirmation is in the distributed pool.

Latches and internal locks protect inside database and recollection buildings. Users cannot gain access to them. Latches are simple, low-level serialization mechanisms to safeguard shared data structures in the system global area. The usage of latches is dependent on the operating-system. Internal locks are higher-level, more technical mechanisms and include dictionary cache locks, record and log management hair, and tablespace and rollback portion locks. Dictionary cache locks are very short and are on dictionary caches as the entries are being changed or used. They make sure that parsed statements don't have inconsistent object definitions. They can be shared or exclusive; shared last until the parse is finished and exclusive previous until the DDL operation is completed.

File and log management locks protect different files. They are organised for some time because they reveal the status of data files.

Tablespace and rollback segment documents protect tablespaces and rollback segments. All instances must agree with the fact whether a tablespace is online or offline. Rollback segments are locked to make sure that only one instance can write to a segment.


Microsoft SQL Server is allowed to lock smaller amounts of data at a time, which is a major improvement. There exists row-level locking, so now SQL Server locks only the rows that are in reality being altered. However, SQL Server has no multi-version reliability model, meaning reads and writes can block one another to ensure data integrity. The difference with Oracle is usually that the database retains a snapshot of the info, which prevents queries from clinging without carrying out "dirty reads. "

Backup and Recovery


Database back up and restoration mechanisms ensure that organizations have well prepared a copy of these data, or have the various tools necessary to recover from a failure. Failing is circumstances where inconsistency prevents transactions from reaching the desired results. Some types of failures are deal failure, system failure, media failure, and communications failure. Transaction inability may be caused by deadlocks, time-outs, safety violations, or system problems. Purchase failures can be solved with the partial or total rollback, with respect to the magnitude of the failure. System failures can be recovered with a restart, or rollback to the last consistent state. Repair/roll frontward functions improve restoring the databases after a multimedia failure.

SQL Server B and R

SQL Server databases contain two physical hard drive files, the MDF and LDF documents. MDF files contain all the data being stored. LDF documents contain a record of each data change. Logging data changes make undo businesses and backups possible. The log record is cleared, or truncated, after a degree of time, which depends upon the database restoration model. SQL Server can maintain multiple databases, with different restoration model adjustments. The restoration model can be either simple, full, or bulk-logged.

With simple restoration, log files aren't kept completely, so when this setting up is activated, a full backup must be achieved. Full backups bring back all of the data and cannot be set to a particular time.

The full recovery setting refers to a database with a business deal log file record. The log documents keep track of every data change operation. The database will stop working if the log document runs out of space, therefore the automobile grow function can be empowered.

When running completely recovery, differential and transfer log backups become available. Differential backups duplicate all data changes because the last full back-up. Whenever a full back-up is run, the differential backup is reset. Purchase log backups duplicate all data changes since the previous full or business deal log backup. They're usually really small and fast. The disadvantage is the amount of restoration; if any log back-up is ruined or unusable, the data is not recoverable past the last good backup.

Oracle B and R

Oracle databases can be backed up using export/import, frosty or off-line backups, hot or on-line backups, or RMAN backups. Exports remove logical explanations and data from the repository to a document. Cold or off-line backups turn off the repository and back-up all data, log, and control files. Hot or on-line backups place the tablespaces into backup function and backup the files. The control data files and archived redo log documents must also be supported. RMAN backups use the "rman" power to backup the databases. More than one of these methods can and should be utilized and tested to be sure the databases is securely supported.

On-line backups can only be done when the system is open and the repository is in ARCHIVELOG method. Off-line backups are performed when the system is off-line; the databases does not have to be in ARCHIVELOG mode. It is easier to rebuild from off-line backups because no recovery is required, but on-line backups aren't as disruptive and don't require database downtime. Point-in-time recovery is available in ARCHIVELOG method only.


Starting with version 10g, Oracle Databases adopted the Automatic Storage space Management (ASM) feature, which automates safe-keeping management after having a certain point. The DBA allocates safe-keeping devices to a repository case and it automates the placement and storage space of the data. SQL Server safe-keeping management must be achieved physically, using the Talk about and Store Management System in SQL Server 2008, or must purchase a individual tool. Oracle's Display Recovery feature automates the management of most backup files. The Flash Restoration area is a unified safe-keeping location for those recovery related documents in the Oracle repository. The DBA can also change the safe-keeping configuration without having to take the repository offline. SQL Server also supplies the ability to control backup files, utilizing a backup wizard to control the relevant files, but does not undertake it automatically. SQL Server 2008 launched improvements in backup compression. With compression, less drive I/O and storage area is required to keep backups online, resulting in increased speed. Tradeoffs seem to be to be between SQL Server's quickness and Oracle's increased functionality.

In Oracle, backups are completely self-contained, however in SQL Server the DBA must manually recreate the machine databases using the install CD. Oracle also uses the Data Recovery Consultant (DRA) tool to automatically diagnose data failures, show repair options, and execute maintenance at the user's get. Oracle's Flashback technology permits instant recovery of dropped dining tables and logical data corruptions. SQL Server offers data restoration by rebuilding the business deal log, jogging repair to fix any corruptions, and ensure the reasonable integrity of data is not cracked.



Security is an important part of any organization's repository management system. Relating to Dr. Osei-Bryson's lecture records, security breaches are typically grouped as unauthorized data observation, inappropriate data modification, or data unavailability. Unauthorized data observation discloses confidential information to users without the correct permissions. Inappropriate data adjustment can be either intentional or unintentional, but can be devastating to database steadiness and can lead to unreliable data. Unavailable data can be very costly to an organization, depending on how the data is used.

Three requirements for a data security plan include secrecy and confidentiality, integrity, and supply. Secrecy and confidentiality helps to protect data from being reached by unauthorized celebrations. Repository integrity is important to protect the data from wrong or improper changes. Availability means stopping and reducing the damage from unavailable data.

Database management systems include some type of access control mechanism to make sure each consumer has access to only the data they require to perform their jobs. Users are granted certain authorizations with a security administrator to find out which actions can be carried out on each subject. The database administrator is responsible for consideration creation, assigning security levels, and granting/revoking privileges.

SQL Server Security

Security can be an essential part of SQL Server's package, according to a recent White Newspaper commissioned by Microsoft. Security features for Microsoft SQL Server 2008 include policy-based management to use insurance policies to database objects. These policies contain a collection of conditions you can use to enforce business and security guidelines.

Oracle Security

Oracle 11g uses facilitates strong authentication through KPI, Kerberos, and Radius for those cable connections to the data source except contacts made as SYSDBA or SYSOPER. Tablespace encryption has an alternative to clear data encryption column encryption by enabling the encryption of the complete tablespace. That is best used in combination with large amounts of data. The transparent data encryption master key can be stored within an exterior hardware security module for more robust security. 11g also provides increased password protection, secure file permissions, optional default audit options, and adjustments on the network callouts from the databases.


In SQL Server, clear data encryption encrypts and decrypts data in the databases engine motor and doesn't require more program programming. The efficiency is roofed in SQL Server 2008, but requires a $10, 000 per cpu additional fee with Oracle Databases 11g. SQL Server 2008 allows Extensible Key Management and Hardware Security Module vendors to join up in SQL Server and offer management that is segregated from the repository. This parting of secrets from the info has an additional level of security. SQL Server 2008 also offers auditing support through an Auditing object, which allows administrators to fully capture and log all database server activity.

The National Vulnerability Repository, provided by the Country wide Institute of Knowledge and Technology, reported over 250 security vulnerabilities with Oracle products more than a four year period, and none of them with SQL Server. The statement didn't list the type and severity of the vulnerabilities, or which specific products were affected, but there seems to be a trend toward vulnerability.

Microsoft Revise is a reasonably straightforward and simple to operate patching solution for SQL Server. Computerworld called Oracle's patch management system included "excruciating pain" and "two-thirds of Oracle DBAs don't apply security areas. " Oracle appears to be behind in patch management at this time.

SQL Server can also prevent highly privileged users from accessing hypersensitive data through use of the auditing subject, assigning individual permissions, module signing, Policy-based management, and extra efficiency. Oracle uses Databases Vault to control privileged gain access to, but costs 20k per cpu.


The comparative review of Exchange Management and Concurrency, Restoration and Backup, and Security functions on Microsoft SQL Server and Oracle 11g repository has shown that we now have many similarities in the features between the two companies, but also key variations in repository management beliefs. I found that SQL Server seems to have the advantage on acceleration and better security, but Oracle is making many advances in advanced functionality and is also starting to automate many features than in earlier years. I used to be also in a position to improve my knowledge of the DBMS functions by examining their practical application in split systems.

Examples of completed orders
More than 7 000 students trust us to do their work
90% of customers place more than 5 orders with us
Special price $5 /page
Check the price
for your assignment