You are on page 1of 5

What is Data?

simply, data can be facts related to any object in consideration. like your name, age, height
are some data related to you. A picture, image, file, pdf can also be considered as data.

What is Database?
A systematic collection of data. Database makes data management easy. A telephone
directory is a database that contain organized data as name, phone number, address.

What is Database Management System?


DBMS: anything which stores data , excel file, .txt .

DBMS was introduced during 1960s. DBMS is used to create and maintain the database.
DBMS doesnt consider relationship between the tables. It takes the approach of manual
navigation. (eg. Microsoft Access, FoxPro, dBase.)

RDBMS and DBMS both are used to store data into the database.

What is Relational Database Management System?


RDBMS: it was introduced during 1970s. RDBMS is a database management system
(DBMS) that is based on the relational model. The relational model has relationship between
tables using primary keys, foreign keys and indexes. Thus the fetching and storing of data
become faster than the old navigational model. So RDBMS is widely used by the enterprises
and developers for storing complex and large amount of data.(eg. Microsoft SQL
server, Oracle)

DBMS vs RDBMS:
DBMS RDBMS
1. DBMS applications store data as file. but RDBMS applications store data in a
tabular form.
in RDBMS, data values are stored in the
form of tables, so
a relationship between these data
values will be stored in the form of a
table as well.

2. Examples of DBMS are file systems, Examples of RDBMS are mysql, oracle ,
MS Access,xml etc.
sqlserver etc.

DBMS example: Requests for information from a database are made in the form of a query, which is a stylized
question. For example, the query

SELECT ALL WHERE NAME = "SMITH" AND AGE > 35

What is SQL?
SQL is a query language for accessing and manipulating the database. Standardized by
American National Standard Institute. It is pronounced as sequel too.

What is SQL Server (Microsoft SQL Server)?


SQL Server is Microsofts relational database management system (RDBMS). It is a full
featured database primarily designed to compete to compete against competitors Oracle
Database (Oracle) and MySQL.

SQL Server supports SQL, it contains T-SQL too. sometime SQL Server is called as
MSSQL(Microsoft SQL Server).

What is MySQL?
MySQL AB was a software company that was founded in 1995. It was acquired by Sun Microsystems in 2008; Sun was in turn
acquired by Oracle Corporation in 2010.

MySQL is a freely available open source Relational Database Management System (RDBMS)
that uses SQL.

What is MySQL Server?


There is nothing called MySQL Server.

SQL vs MySQL:
SQL is a query language while MySQL is RDBMS.

What is Oracle DB (Oracle)?


Oracle DB is also known as Oracle RDBMS and sometimes, just Oracle.
Oracle is also an RDBMS that is combination of SQL and PLSQL. MySQL is also a part of
Oracle company now.

MySQL vs Oracle:

MySQL and Oracle both are owned by Oracle company.


MySQL uses SQL language and Oracle is combination of SQL and PL/SQL.

Microsoft SQL Server vs Oracle :


Oracle Database server is heavily used in Unix environments and Windows servers, but
Microsoft SQL Server is only used in Win environments.
SQL Server uses T-SQL(Transact-SQL) and Oracle uses PL/SQL.

What is T-SQL?
sql and tsql are almost same. TSQL is an extension to SQL.

Short for Transaction-SQL, an extended form of SQL that adds declared variables, transaction control, error and exceptionhandling
and row processing to SQL

The Structured Query Language or SQL is a programming language that focuses on managing relational databases. SQL has its
own limitations which spurred the software giant Microsoft to build on top of SQL with their own extensions to enhance the
functionality of SQL. Microsoft added code to SQL and called it Transact-SQL or T-SQL. Keep in mind that T-SQL is proprietary and
is under the control of Microsoft while SQL, although developed by IBM, is already an open format.

T-SQL adds a number of features that are not available in SQL.

This includes procedural programming elements and a local variable to provide more flexible control of how the application flows. A
number of functions were also added to T-SQL to make it more powerful; functions for mathematical operations, string operations,
date and time processing, and the like. These additions make T-SQL comply with the Turing completeness test, a test that
determines the universality of a computing language. SQL is not Turing complete and is very limited in the scope of what it can do.

Another significant difference between T-SQL and SQL is the changes done to the DELETE and UPDATE commands that are
already available in SQL. With T-SQL, the DELETE and UPDATE commands both allow the inclusion of a FROM clause which
allows the use of JOINs. This simplifies the filtering of records to easily pick out the entries that match a certain criteria unlike with
SQL where it can be a bit more complicated.

Choosing between T-SQL and SQL is all up to the user. Still, using T-SQL is still better when you are dealing with Microsoft SQL
Server installations. This is because T-SQL is also from Microsoft, and using the two together maximizes compatibility. SQL is
preferred by people who have multiple backends.

SQL vs PL/SQL:
SQL PL/SQL
1. SQL is a structured query language PL/SQL is used to write full programs using
used to issue a single query or variables, loops, operators etc. to carry out
execute a single insert/update/delete. multiple selects/inserts/updates/deletes.

2. SQL may be considered as the source PL/SQL can be considered as the application
of data for our reports, web pages language similar to Java or PHP. It might be
and screens. the language used to build, format and
display those reports, web pages and
screens.

3. SQL is a data oriented language used PLSQL is a procedural language used to


to select and manipulate sets of data create applications.
4. SQL is used to write queries, DDL and PLSQL is used to write program blocks,
DML statements functions, procedures, triggers and packages
5. SQL executes one statement at a PLSQL executes as a block of code
time
6. SQL is declarative ie it tells the Whereas PLSQL is procedural ie it tells the
database what to do but not how to database how to do things
do it.
7. SQL can be embedded within a PLSQL This cannot be embedded within an SQL
program statement.

Relationships between Tables

The 'Relationship' in the Database


A relational database expects that tables will be linked to one another, and primary keys are
fundamental to allowing this.
A primary key can be referenced in another table. When this happens, the ID is called a Foreign
Key.

In our example, we created relationships between the subtables and the Operations table, and
used VLOOKUP to create these links.

We are going to create links between tables in Access, and get it to continue these relationships .
Entity-Relationship diagrams
Each of these relationships can be demonstrated in an Entity-Relationship (E-R) diagram as shown
below. Note the crow's feet which indicates the 'many' side of the relationship.

Types of Relationships
There are three types of relationships between tables:

One-to-one;

One-to-many;

Many-to-many.

One-to-One Relationships
In a one-to-one relationship, each record in the first Table can have only one matching record in the
second Table, and vice versa as shown in the diagram below of a husband and wife.

One-to-Many Relationships
Consider the Patients Table and the Operations Table. One patient in the Patients Table can have many
operations but only one operation is exclusively linked to a single patient. This is the most common
type of relationship.
Many-to-Many Relationships
This is necessary when there are many occurrences of one entity relating to many occurrences of
another. To represent a many-to-many relationship, you must create a third Table, often called a
junction Table, that breaks down the many-to-many relationship into two one-to-many relationships.
You insert the primary key from each of the two Tables into the third Table. As a result, the third Table
records each occurrence, or instance, of the relationship.

An example would be students to modules. One student may take many modules. One module will
have many students on it. We have a table of students, a table of modules, and a junction table
inbetween with the student number and the module code both as Foreign Keys.

You might also like