A relational database consists of a collection of tables that store particular sets of data wherein data is organized into two-dimensional tables of rows and columns and from which all the data can be access, modify, manage or reassemble in many different ways without even having the database tables to change. It is a database that is perceived by its users as a collection of relation variables or the tables also called as relation. Like in algebra, the concept of a relational database derives from the principles of relational algebra. In of relational database, all the data are being matched by using the common features contained by the data set and with the use of it, the resulting set of data are systematize and are much easier for many people to understand and allows you to easily find specific information. It also allows you to sort based on any field and generate reports that contain only certain fields from each record. For example, a data set containing all the information about the students in a university can be grouped by the course they take, year, and so on. The informations can be easily accessed, manage and use in the transactions of the university. Relational databases are currently the predominant choice in storing financial records, medical records, manufacturing and logistical information, personnel data and much more.
The relational database model takes advantage of this uniformity to build completely new tables out of required information from existing tables. In other words, it uses the relationship of similar data to increase the speed and versatility of the database. A relational database then allows Data Base Administrators to define relationships between these tables and with these relationships, it enable Data Base Administrators to combine data from several tables for querying and reporting. Relational database theory may well be the first example of a refactorization technique taken to merciless extremes: in a relational database, in each type of data, the items are identified by the key, the whole key, and nothing but the key.
A relational database is a set of relations. The relation, which is a two-dimensional table, is the primary unit of storage in a relational database. A relational database can contain one or more of these tables, with each table consisting of a unique set of rows and columns. Other items are frequently considered part of the database, as they help to organize and structure the data, in addition to forcing the database to conform to a set of requirements. A single record is stored in a table as a row, also known as a tuple, while attributes of the data are defined in columns, or fields, in the table. The characteristics of the data, or the column, relates one record to another. Each column has a unique name and the content within it must be of the same type. In addition, all its data can be easily accessed through the use of keys which are database fields used to uniquely identify specific records in a table. There are four properties of a relation. First, it must have no duplicate tuples. Second, the tuples in the relation are unordered. Third, the attributes of the relation are also unordered. And lastly, each tuple contains exactly one value for each attribute. A relation is consists of tuples and attributes. The number of tuples in a relation is called the cardinality and degree is the term used for the number of attributes present in a relation. Applications access data by specifying queries, which use operations such as select to identify tuples, project to identify attributes, and join to combine relations. Relations can be modified using the insert, delete, and update operators. New tuples can supply explicit values or be derived from a query. Similarly, queries identify tuples for updating or deleting.
Relational database is very important. It supports relational algebra, consequently supporting the relational operations of the set theory. It also supports an important concept of dynamic views. In a relational database, a view is not a part of the physical schema, it is dynamic. And so changing the data in a table alters the data depicted by the view. Views can subset data, join and simplify multiple relations, dynamically hide the complexity in the data and reduce the data storage requirements. Relational databases use SQL, which is an easy and human-readable language. SQL instructions are in the form of plain instructions, which can be put to the database for implementation. Most of the database vendors support the SQL standard. A competitive technology of flat files supports a sequential storage of data and fails to provide the users with search and query options. On the other hand, relational databases provide the users with simple operations to manipulate data in the databases and retrieve it. Moreover relational databases establish defined relationships between the tables, thus giving their users a complete picture of the data stored. Relational databases have an excellent security. A relational database supports access permissions, which allow the database administrator to implement need-based permissions to the access of the data in database tables. Relational databases support the concept of users and user rights, thus meeting the security needs of databases. Relations are associated with privileges like create privilege, grant privilege, select, insert and delete privileges, which authorize different users for corresponding operations on the database. The other important advantages of relational databases include their performance, power, and support to new hardware technologies as also flexibility and a capacity to meet all types of data needs. Relational databases are scalable and provide support for the implementation of distributed systems.
Integrity rule describes the accuracy, validity and consistency of data. It is a necessary part of any relational database and are called as the general rule since they can be apply in all databases. It refers to the process of ensuring that a database remains an accurate reflection of the data it is modeling or representing. These rules are followed in order to maintain the accuracy and accessibility of your database. These rules manage which operations can be performed on the data and on the structure of the database. There are two types of integrity rule, the entity and referential integrity rule. The first type is the entity integrity rule wherein a base relation, no attribute of a primary key can be null. This rule says that 'null' is special value in a relational database and it doesn't mean blank or zero. It means the unavailability of data and hence a 'null' primary key would not be a complete identifier. The reason for this rule is simple. You can't uniquely identify or reference a row in a table, if the primary key of that table can be null. All entities must be distinguishable. That is, they must have a unique identification of some kind. Primary keys perform unique identification function in a relational database. An identifier that was wholly null would be a contradiction in terms. It would be like there was some entity that did not have any unique identification. That is, it was not distinguishable from other entities. If two entities are not distinguishable from each other, then by definition there are not two entities but only one. The referential integrity rule is the second rule. The rule states that the database must not contain any unmatched foreign key values. This simply implies that a row may not be added to a table with a foreign key unless the referenced value exists in the referenced table and if the value in a table that's referenced by a foreign key is changed (or the entire row is deleted), the rows in the table with the foreign key must not be "orphaned." If foreign key exists in a relation, either foreign key value must match a candidate key value of some tuple in its home relation or foreign key value must be entirely null. The referential integrity constraint states that, a tuple in one relation that refers to another relation must refer to the existing tuple in that relation. This means that the referential integrity is a constraint specified on more than one relation. This ensures that the consistency is maintained across the relations. The data that is stored in tables are organized logically based on a particular purpose that minimizes duplication, reduces data anomalies, and reinforces data integrity. The process by which data is organized logically is called normalization. Normalization simplifies the way data is defined and regulates its structure.
Keys are simply consists of one or more attributes that determine other attributes. The key may be a single column, or it may consist of a group of columns that uniquely identifies a record. A primary key or which is also known as a unique key is considered as a candidate key that is used for the identification of the row in each row and table. A primary key includes a single column or set of columns. There is only one primary keep but there can be many unique keys. Within a given relation, there can be one attribute with values that are unique within the relation that can be used to identify the tuples of that relation. There are 3 rules that apply to primary keys: it must exist, must be unique and must not change over time (unique sustained existence). Every table must have a primary key, an attribute or combination of attributes that are guaranteed to be unique and not null. The entity integrity rule states that for every instance of an entity, the value of the primary key must exist, be unique, and cannot be null.However, the candidate key has to be unique within its domain; it does not hold null values and this key should never change. In a relation, there can be more than one attribute combination possessing the unique identification property. The candidate keys are combinations, which can act as primary key. A candidate key is a combination of attributes that can be uniquely used to identify a database record without any extraneous data. Each table may have one or more candidate keys. One of these candidate keys is selected as the table primary key. Candidate key can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys. Candidate key must fulfill two rules. First, at all times it holds in the relation assigned to that variable that there are no two distinct tuples (rows) with the same values for these attributes and second, there is not a proper subset of this set of attributes for which it holds.
While a foreign key in one table is a primary key in another; the foreign keys generally define parent-to-child relationships between tables. It is an attribute or combination, in one table whose values must either match the primary key in another table or be null. A foreign key exists in a table to identify a primary key in another. The join of two relation is made at the foreign key and with the referential integrity rule applied creates a reliable navigation of relations and data integrity. The referential integrity rule states that every foreign key value must match a primary key value in an associated table. On the other hand, an alternate key (or secondary key) is a candidate key that is not a primary key.
Relational databases are created using a special computer language, structured query language (SQL), which is the standard for database interoperability. SQL is the foundation for all of the popular database applications available today, from Access to Oracle. SQL have been and continue to be valuable, useful and easy to modify and maintain, processing large volumes of "related" information in an organized, accessible form and require little to no programming experience to begin to use productively. Queries made against the relational database, and the derived relvars in the database are expressed in a relational calculus or a relational algebra.
![]() |
| EXAMPLE |

0 comments:
Post a Comment