Lesson 10
SQL Columns Rows
How do relational databases store information?
To use SQL effectively, you must understand how relational databases store information.
In the next module, you will learn about the building blocks of databases, including columns and rows.
In the context of a relational database table, a column is a set of data values of a particular simple type, one for each row of the table.
The columns provide the structure according to which the rows are composed.
The term field is often used interchangeably with column, although many consider it more correct to use field (or field value) to refer specifically to the single item that exists at the intersection between one row and one column.
A relational database is a database that conforms to the relational model, and refers to a database's data and schema
(the database's structure of how that data is arranged). Common usage of the term Relational Database Management System technically refers to the software used to create a relational database, but sometimes mistakenly refers to a relational database. The term relational database was originally defined and coined by E.F. Codd.
Implicit locking occurs for all SQL statements so that a user never needs to lock any resource explicitly, although Oracle does provide a mechanism to allow the user to acquire locks manually or to alter the default locking behavior.
The default locking mechanisms lock data at the lowest level of restrictiveness to guarantee integrity while allowing the highest degree of concurrency. Whereas many DBMSs store information on row locks as a list in memory, Oracle stores row-locking information within the actual data block where the row is stored.
Some DBMSs also allow lock escalation.
For example, if an SQL statement requires a high percentage of the rows within a table to be locked, some DBMSs will escalate the individual row locks into a table lock.
Although this reduces the number of locks the DBMS has to manage, it results in unchanged rows being locked, thereby potentially reducing concurrency and increasing the likelihood of deadlock.
Because Oracle stores row locks within the data blocks, Oracle never needs to escalate locks.