Relational Databases

Relational databases is the relationship between the different kinds of data which allows users ask questions and answer the query through software.

Entity

Entity is anything that can be identified by a fixed number of characteristics, called attributes, e.g. names and values. Attributes are columns of tables, attribute names and values and etc.

Entity Instance is a specific set of values which is assigned to attributes of an entity (content of the row). So for example Isabel is an entity instance of "name" entity. Table Instances is a table which contains specific rows. In addition, attribution has a data type, such as number, text, image, and etc.

Properties of entity

Instances are unordered. Each distinct table is a different table instance. So for example if two table instances will have same rows, but reordered are the same table instance. Therefore order of the rows doesn’t matter in database.

Uniqueness

In a database table no two rows can be the same. So if even there are same attributes, one of them will have a unique feature which will be different from the other.

Keys

Those give an entity the prime attribute which will stand out and is going to be of a big importance. For example Student_ID is a primary key of that entity.

Atomic Data

This property helps to split the data which is needed to be split. For example address 1234 Sesame Street can be written in line, because ASCII will not treat it as a one data. Thus there are separate fields for "house number" and "street".

Database Schemes

The scheme is a collection of table definitions that gives the name of the table, lists the attributes and their data types, and identifies the primary key.

XML trees and Entities

Relational database tables and XML trees are not the same. The reason is that relational databases are more restrictive than XML trees.

Operation on Table

Database Operation is a process of allowing users ask the queries and software to process the answer to us.

Select Operation

The select operation takes rows from one tables to create a new table. Syntax is Select Test From Table. This will help to take the required data into new table, e.g. if you need to take name of the student and his/her ID you type Select Name and StudentID From School_Records.

Project Operation

The project operation builds a new table new table from the columns of an existing table. The syntax for it is Project Field_List From Table. For example if you need to pull up students name and subject from table, it will be Project Name, Subject From Student_Records. Select and Project could be combined together.

Union Operation

This operation helps to bring data from 2 or more tables. The syntax is
Table1 + Table2
For example if you need to bring up the information from School_records and Stuff_Records to find out who is assigned to whom tutor you could simply do:
TutorGroup1 = School_Records + Stuff_Records

Difference Operation

Difference operation is basically opposite of union. You can take data from the other table to bring new table:
Table1 – Table2
Product Operation
Table1 X Table2
This brings all columns from both tables .

Content created by Kirill Krasnoperov
References

• Snyder, A (2011). Fluency with Information Technology. 4th ed. Boston: Pearson Education, Inc.. p499-511.

Join operation

One operation used in the creation of a database is the join operation, which can be defined from the five primitive operations of Difference, product, union, project and select.

The Join operation is used when connecting two tables together with relation to the product operation, but it however does not produce all the joins. If there is a case where the two tables have a common attribute then the join operation will enable the two tables to only contain rows that match from both tables. The Join operation is seen as followed:

(Table1 = Table 2 on Match)

In this case the equal sign proposes the form of Product, where the two tables match up, and the term ‘Match’ is a comparison test where it involves fields from each table. When referring to set attributes in a table, the notation used is ‘Table. Field’, as in the example, ‘Master. Name’.

Structure of a database

As mentioned earlier tables inside a database are usually created using the five operations but can be used in different way. When organising the information for a database, it usually needs to be organised in a way where the user sees the information in relevant and to their needs way so they can use it progressively. With most databases, there is two forms of tables, one being the physical database where it’s stored on disk drive of the computer used where the repository of the database is. The second form is the logical database also being known as the ‘the view of the database’ where it’s customised to the user’s needs.

Physical and logical databases

The Physical database is created by database administrators to enable data to be accessed quickly. However an important reason is to avoid data redundancy where being the duplication of information. When information is stored in multiple places, there is a increased chance that where one set of information is changed this information in other places will not be changed to match up to this, therefore being inconsistent.

When storing information administrators often keep just one set of information on one database and a backup of this on another which avoids it being deleted or losing it as a result of a database crash. However only having one set of information restricts user usage and therefore can only be accessible to one user at any one time which raises the issue of how do they get their information, the solution is logical databases

Logical Databases

a Logical database allows its users to view the information they want and require, where the information is created for them each time they want it. This information is created from the sole set of information stored on the database. When the information is created from an original , it automatically generates a second set of information, this one being for the chosen user on their computer when requested by the user on their address.

Queries

One thing which is useful in making an database work is queries, when query are used for users, a query is a specification using the five operations mentioned earlier as well as the join one, that defines the table from other tables which is written in Structured query language.

Relationships

The term relationships in regard to databases, is that it’s a link between rows of one table and others of another table. As it’s also part of the metadata which makes a database, they are given names and characteristics.

Content created by Oliver Callaghan
References

• Snyder, A (2011). Fluency with Information Technology. 4th ed. Boston: Pearson Education, Inc.. p511-525.