<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Learn Software Development &#187; Databases</title>
	<atom:link href="http://learnsoftwareprocesses.com/category/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://learnsoftwareprocesses.com</link>
	<description>All about the processes involved in software development</description>
	<lastBuildDate>Sat, 04 Sep 2010 20:03:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Object Query Language (OQL)</title>
		<link>http://learnsoftwareprocesses.com/2009/09/14/object-query-language-oql/</link>
		<comments>http://learnsoftwareprocesses.com/2009/09/14/object-query-language-oql/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 11:26:17 +0000</pubDate>
		<dc:creator>ashish</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Object Oriented Databases]]></category>
		<category><![CDATA[Object Query Language]]></category>
		<category><![CDATA[OQL]]></category>

		<guid isPermaLink="false">http://learnsoftwareprocesses.com/?p=355</guid>
		<description><![CDATA[Object Query Language (OQL) is a query language standard for object-oriented databases modelled after SQL. OQL was developed by the Object Data Management Group (ODMG). Because of its overall complexity no vendor has ever fully implemented the complete OQL. OQL has influenced the design of some of the newer query languages like JDOQL and EJB [...]]]></description>
			<content:encoded><![CDATA[<p>Object Query Language (OQL) is a query language standard for object-oriented databases modelled after SQL. OQL was developed by the Object Data Management Group (ODMG). Because of its overall complexity no vendor has ever fully implemented the complete OQL. OQL has influenced the design of some of the newer query languages like JDOQL and EJB QL, but they can&#8217;t be considered as different flavours of OQL, and should be treated separately.</p>
<p>The key Differences Between OQL and SQL :<br />
- OQL supports object referencing within tables. Objects can be nested within objects.<br />
- Not all SQL keywords are supported within OQL. Keywords that are not relevant to Netcool/Precision IP have been removed from the syntax.<br />
- OQL can perform mathematical computations within OQL statements.</p>
<p>General Rules of OQL :<br />
- All complete statements must be terminated by a semi-colon.<br />
- A list of entries in OQL is usually separated by commas but not terminated by a comma.<br />
- Strings of text are enclosed by matching quotation marks.</p>
<p>OQL was designed to be object-oriented. Queries are specified using objects and their attributes (data-members). Similarly, queries return sets of objects. The complex relationships in an object model can be easily navigated, using the same class-member paradigm, used by object-oriented programming languages. This can often lead to increased performance over SQL, where resource-consuming join processes are necessary to capture relationships. Another big advantage is, that table names and column names are not necessary in the query strings, because queries are formulated using class names and attribute names and no mapping knowledge is necessary in the application.<br />
OQL may be used as an embedded language or as a standalone query language. Both of these are supported by OpenAccess. As an embedded language, OQL queries can be used directly in your application programs. Programs can embed OQL queries, and receive results in the native data types of the programming language being used. OQL statements are simply text strings, which means that the standard string representation of your programming language is used to express the query.</p>
<p>Simple query :<br />
The following example illustrates how one might retrieve the CPU-speed of all PCs with more than 64MB of RAM from a fictional PC database:<br />
SELECT pc.cpuspeed<br />
FROM PCs pc<br />
WHERE pc.ram > 64</p>
<p>Query with grouping and aggregation :<br />
The following example illustrates how one might retrieve the average amount of RAM on a PC, grouped by manufacturer:<br />
SELECT manufacturer, AVG(SELECT part.pc.ram FROM partition part)<br />
FROM PCs pc<br />
GROUP BY manufacturer: pc.manufacturer<br />
Note the use of the keyword partition, as opposed to aggregation in traditional SQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://learnsoftwareprocesses.com/2009/09/14/object-query-language-oql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Data Binding</title>
		<link>http://learnsoftwareprocesses.com/2009/09/12/introduction-to-data-binding/</link>
		<comments>http://learnsoftwareprocesses.com/2009/09/12/introduction-to-data-binding/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 06:52:18 +0000</pubDate>
		<dc:creator>ashish</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Data Model]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Concepts]]></category>
		<category><![CDATA[Data Binding]]></category>
		<category><![CDATA[Objects]]></category>

		<guid isPermaLink="false">http://learnsoftwareprocesses.com/?p=351</guid>
		<description><![CDATA[Data binding is the process that establishes a connection between the application UI and business logic. If the binding has the correct settings and the data provides the proper notifications, then, when the data changes its value, the elements that are bound to the data reflect changes automatically. Data binding can also mean that if [...]]]></description>
			<content:encoded><![CDATA[<p>Data binding is the process that establishes a connection between the application UI and business logic. If the binding has the correct settings and the data provides the proper notifications, then, when the data changes its value, the elements that are bound to the data reflect changes automatically. Data binding can also mean that if an outer representation of the data in an element changes, then the underlying data can be automatically updated to reflect the change. A typical use of data binding is to place server or local configuration data into forms or other UI controls.</p>
<p>Basic Data Binding Concepts :<br />
Data binding is based on a component architecture that consists of four major pieces : the data source object (DSO), data consumers, the binding agent, and the table repetition agent. Data source objects provide the data to a page, data-consuming HTML elements display the data, and the agents ensure that both the provider and the consumer are synchronized.</p>
<p>Direction of the Data Flow :<br />
The data flow of a binding can go from the binding target to the binding source and/or from the binding source to the binding target.<br />
- One Way binding causes changes to the source property to automatically update the target property, but changes to the target property are not propagated back to the source property. This type of binding is appropriate if the control being bound is implicitly read-only.<br />
- Two Way binding causes changes to either the source property or the target property to automatically update the other. This type of binding is appropriate for editable forms or other fully-interactive UI scenarios. Most properties default to  One Way binding, but some dependency properties default to Two Way binding.<br />
- OneWayToSource is the reverse of  OneWay binding; it updates the source property when the target property changes. One example scenario is if you only need to re-evaluate the source value from the UI.</p>
<p>Data Source Objects<br />
To bind data to the elements of an HTML page in Windows Internet Explorer, a DSO must be present on that page. DSOs implement an open specification that leaves it up to the DSO developer to determine the following:<br />
- How the data is transmitted to the page. A DSO can use any transport protocol it chooses. This might be a standard Internet protocol, such as HTTP or simple file I/O. A DSO also determines whether the transmission occurs synchronously or asynchronously. Asynchronous transmission is preferred, because it provides the most immediate interactivity to the user.<br />
- How the data set is specified. A DSO might require an Open Database Connectivity (ODBC) connection string and an Structured Query Language (SQL) statement, or it might accept a simple URL.<br />
- How the data is manipulated through scripts. Since the DSO maintains the data on the client, it also manages how the data is sorted and filtered.<br />
- Whether updates are allowed.</p>
<p>Data Consumers<br />
Data consumers are elements on the HTML page that are capable of rendering the data supplied by a DSO. Elements include many of those intrinsic to HTML, as well as custom objects implemented as Java applets or Microsoft ActiveX Controls.<br />
A DSO typically exposes this functionality through an object model that is accessible to scripts.</p>
<p>Binding Agents<br />
The binding and repetition agents are implemented by MSHTML.dll, the HTML viewer for Internet Explorer, and they work completely behind the scenes. When a page is first loaded, the binding agent finds the DSOs and the data consumers among those elements on the page. Once the binding agent recognizes all DSOs and data consumers, it maintains the synchronization of the data that flows between them. </p>
]]></content:encoded>
			<wfw:commentRss>http://learnsoftwareprocesses.com/2009/09/12/introduction-to-data-binding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Database Concurrency</title>
		<link>http://learnsoftwareprocesses.com/2009/09/12/introduction-to-database-concurrency/</link>
		<comments>http://learnsoftwareprocesses.com/2009/09/12/introduction-to-database-concurrency/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 06:48:19 +0000</pubDate>
		<dc:creator>ashish</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Database Concurrency]]></category>
		<category><![CDATA[Multiple Access]]></category>
		<category><![CDATA[Optimistic]]></category>
		<category><![CDATA[program]]></category>

		<guid isPermaLink="false">http://learnsoftwareprocesses.com/?p=349</guid>
		<description><![CDATA[DATABASE CONCURRENCY: &#8211; Database concurrency is the particular situation when a single database is being accessed by multiple programs. Databases, by design in most cases are shared resources, but in this case, they are shared across multiple applications. Database concurrency controls ensure that transactions occur in an ordered fashion. The main job of these controls [...]]]></description>
			<content:encoded><![CDATA[<p>DATABASE CONCURRENCY: &#8211; Database concurrency is the particular situation when a single database is being accessed by multiple programs. Databases, by design in most cases are shared resources, but in this case, they are shared across multiple applications.<br />
Database concurrency controls ensure that transactions occur in an ordered fashion. The main job of these controls is to protect transactions issued by different users/applications from the effects of each other. They must preserve the four characteristics of database transactions: atomicity, isolation, consistency and durability. Concurrency control is one of the main issues in the study of real time database systems. In addition to satisfying consistency requirements as in traditional database systems, a real time transaction processing system must also satisfy timing constraints.</p>
<p>Conflicts between transactions can be detected in two ways.<br />
Pessimistic method detects conflicts before making access to the data object. When a transaction requests access to some data item, the concurrency control manager will examine this request and will determine whether to grant the request or not.<br />
Optimistic schemes are designed to get rid of the locking overhead. They are optimistic in the sense that they take into account the explicit assumption that conflicts among transactions are rare events. The task of concurrency control is deferred until the end of transaction when some checking for potential conflicts has to take place and will be resolved accordingly, taking into consideration the amount of progress that has been done and the nature of conflict with transactions.<br />
When concurrency control detects a conflict among some concurrent transactions accessing the same object, a conflict resolution mechanism needs to be put on. Concurrency control manager decides which transaction (victim) to penalize (the lock holder or the requester) and chooses an appropriate action and suitable timing. Two possible actions are most used: Blocking (wait) and abort (restart). In pessimistic concurrency control either blocking or abort can be used to resolve the conflict. However, in optimistic concurrency control only aborting is appropriate since conflict has been detected after the transaction has accessed the data object and performed some computation.</p>
<p>OPTIMISTIC CONCURRENCY CONTROL : The basic idea of an optimistic concurrency control mechanism is that the execution of a transaction consists of three phases: read, validation and write phases. For all optimistic concurrency control (OCC) schemes a conflict is detected after the data object has been accessed. In the OCC, conflict detection and resolution are both done at the certification time when a transaction completes its execution; it requests the concurrency control manager to validate all its accessed data objects. If it has not yet been marked for abort, it enters the commit phase where it writes all its updates to the database.</p>
]]></content:encoded>
			<wfw:commentRss>http://learnsoftwareprocesses.com/2009/09/12/introduction-to-database-concurrency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Database Encryption</title>
		<link>http://learnsoftwareprocesses.com/2009/09/12/introduction-to-database-encryption/</link>
		<comments>http://learnsoftwareprocesses.com/2009/09/12/introduction-to-database-encryption/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 06:42:34 +0000</pubDate>
		<dc:creator>ashish</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Database Encryption]]></category>

		<guid isPermaLink="false">http://learnsoftwareprocesses.com/?p=347</guid>
		<description><![CDATA[Encryption can provide strong security for data, but is that enough ? Data in a database can be accessed by many systems, but developing a database encryption strategy must take many factors into consideration. Where should the encryption be performed, for example — in the database, or in the application where the data originates? Who [...]]]></description>
			<content:encoded><![CDATA[<p>Encryption can provide strong security for data, but is that enough ? Data in a database can be accessed by many systems, but developing a database encryption strategy must take many factors into consideration. Where should the encryption be performed, for example — in the database, or in the application where the data originates? Who should have access to the encryption keys? How much data must be encrypted to provide security? What’s an acceptable trade-off between data security and application performance?<br />
Data encryption is a process of converting stored or transmitted data to a coded form in order to prevent it from being read by unauthorized person. It is an application of a specific algorithm to alter the appearance of data, making it incomprehensible to those who are not authorized to see the information.<br />
There are 2 types of encryption algorithm: -<br />
- Secret key or Symmetric key algorithm: -In this encryption algorithm, a single secret or private key is shared between the sender and receiver. The sender encrypts this using this key and receiver decrypts it using the same key. It is highly assumed that no one else knows the key.<br />
- Public key or Asymmetric key algorithm: &#8211; In this algorithm, every sender and receiver has a pair of keys. One is made public to the network and called public key and the other is kept private to that node called private key. The pair is such made that if the data is encrypted with one of the keys in the pair, it can only be decrypted with other key in the pair. When a sender has to send, it encrypts the data with receiver’s public key &#038; the receiver decrypts it with its private key.</p>
<p>Advice on how to overcome some of the challenges in database encryption:<br />
- Regulatory drivers : Advanced security through database encryption is required across many different sectors, and increasingly to comply with regulatory mandates.<br />
One approach that can help companies address the encryption challenges associated with regulation is the defense-in-depth principle which advocates many layers to strong security – ranging from physical security and access controls to rights assignment and network security, including firewalls and, crucially, encryption of both data at rest and in transit.<br />
- Overcoming key management issues<br />
It is important that database encryption be accompanied by key management; however, statistics show that this is also the main barrier to database encryption. It is well-recognized that key use should be restricted and that key backup is extremely important. An additional best practice rule of encryption is that the encrypted key should never be stored alongside the data it was used to encrypt. Placing encryption keys within the HSM enforces this policy.<br />
- Separation of duties and dual control<br />
Many organizations pay close attention to separation of duties and dual control, which is required to pass audits to show that there are internal controls protecting against rogue administrators or unauthorized employees and is often required by the various regulatory requirements discussed above. </p>
]]></content:encoded>
			<wfw:commentRss>http://learnsoftwareprocesses.com/2009/09/12/introduction-to-database-encryption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database Locking &#8211; Control concurrent access of the database</title>
		<link>http://learnsoftwareprocesses.com/2009/09/11/database-locking-control-concurrent-access-of-the-database/</link>
		<comments>http://learnsoftwareprocesses.com/2009/09/11/database-locking-control-concurrent-access-of-the-database/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 09:51:02 +0000</pubDate>
		<dc:creator>ashish</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Locking]]></category>
		<category><![CDATA[Database Locking]]></category>
		<category><![CDATA[Locks]]></category>

		<guid isPermaLink="false">http://learnsoftwareprocesses.com/?p=345</guid>
		<description><![CDATA[Locking is a procedure used to control concurrent access of the data. A lock may deny access to other transaction in order to prevent incorrect results (if multiple people are updating the same data). Locks can be of two types: - • Exclusive lock or Write lock • Shared lock or Read lock - Exclusive [...]]]></description>
			<content:encoded><![CDATA[<p>Locking is a procedure used to control concurrent access of the data. A lock may deny access to other transaction in order to prevent incorrect results (if multiple people are updating the same data).</p>
<p>Locks can be of two types: -<br />
• Exclusive lock or Write lock<br />
• Shared lock or Read lock</p>
<p>- Exclusive lock: Provides exclusive use of a data item to one transaction. Transaction has to be made exclusive to modify the value of data in a table. If the transaction has obtained an exclusive lock, then no other transaction can access the data item until the lock is released, including being able to read the data.</p>
<p>- Shared locks: Provides a read permission to the transaction. Any number of transactions can make shared lock &#038; read the data item. This helps when the database is being read for multiple transactions, and putting a shared lock can be bad for business logic.</p>
<p>Basic rules for locking: -<br />
• If a transaction has a read lock on the data item, it can read the item but cannot update it.<br />
• If a transaction has a read lock, other transaction can obtain a read lock on the data item, but no write lock.<br />
• If a transaction has a write lock, it can both read and update the data item.<br />
• If a transaction has a write lock, then others can’t obtain either a read lock or a write lock on the data item.</p>
<p>TWO PHASE LOCKING (2PL):-One way to handle the concurrency control is 2PL mechanism.<br />
Every transaction is divided into two phases: -<br />
• A growing phase<br />
• A shrinking phase or Contracting phase<br />
In the growing phase, the transaction acquires all locks needed but can’t release any locks. The number of locks increases from zero to maximum for a transaction.<br />
In the contracting phase, the number of locks held decreases from maximum to zero.<br />
The transaction can acquire the locks, proceed with the execution &#038; during the course of execution acquire additional locks as needed. But it never releases any lock until it has reached a stage where no new locks are required anymore.</p>
<p>2PL are of the following types: -<br />
• Basic two-phase locking<br />
• Conservative two-phase locking<br />
• Strict two-phase locking<br />
• Rigorous two-phase locking.</p>
<p>Lock Time-out :<br />
Locks are held for the length of time needed to protect the resource at the level requested. If a connection attempts to acquire a lock that conflicts with a lock held by another connection, the connection attempting to acquire the lock is blocked until:<br />
· The conflicting lock is freed and the connection acquires the lock it requested.<br />
· The time-out interval for the connection expires.  </p>
]]></content:encoded>
			<wfw:commentRss>http://learnsoftwareprocesses.com/2009/09/11/database-locking-control-concurrent-access-of-the-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
