SQL Server Trainers online

What is PL/SQL?

What is PL/SQL?

PL/SQL stands for Procedural Language extension of SQL.

PL/SQL is a combination of SQL along with the procedural features of programming languages.

It was developed by Oracle Corporation in the early 90’s to enhance the capabilities of SQL.

The PL/SQL Engine:

Oracle uses a PL/SQL engine to processes the PL/SQL statements. A PL/SQL language code can be stored in the client system (client-side) or in the database (server-side).

SQL GRANT REVOKE Commands

SQL GRANT REVOKE Commands

DCL commands are used to enforce database security in a multiple user database environment. Two types of DCL commands are GRANT and REVOKE. Only Database Administrator’s or owner’s of the database object can provide/remove privileges on a database object.

SQL GRANT Command

SQL GRANT is a command used to provide access or privileges on the database objects to the users.

The Syntax for the GRANT command is:

GRANT privilege_name
ON object_name
TO {user_name |PUBLIC |role_name}
[WITH GRANT OPTION];

  • privilege_name is the access right or privilege granted to the user. Some of the access rights are ALL, EXECUTE, and SELECT.
  • object_name is the name of an database object like TABLE, VIEW, STORED PROC and SEQUENCE.
  • user_name is the name of the user to whom an access right is being granted.
  • user_name is the name of the user to whom an access right is being granted.
  • PUBLIC is used to grant access rights to all users.
  • ROLES are a set of privileges grouped together.
  • WITH GRANT OPTION – allows a user to grant access rights to other users.

For Example:

GRANT SELECT ON employee TO user1;

This command grants a SELECT permission on employee table to user1.

You should use the WITH GRANT option carefully because for example if you GRANT SELECT privilege on employee table to user1 using the WITH GRANT option, then user1 can GRANT SELECT privilege on employee table to another user, such as user2 etc.

Later, if you REVOKE the SELECT privilege on employee from user1, still user2 will have SELECT privilege on employee table.

What is a NULL Value?

A field with a NULL value is a field with no value.

If a field in a table is optional, it is possible to insert a new record or update a record without adding a value to this field. Then, the field will be saved with a NULL value.

Note: It is very important to understand that a NULL value is different from a zero value or a field that contains spaces. A field with a NULL value is one that has been left blank during record creation!

Using of Where Clause in SQL Server

Using of Where Clause in SQL Server

This SQL Server tutorial explains how to use the WHERE clause in SQL Server (Transact-SQL) with syntax and examples.

Description

The SQL Server (Transact-SQL) WHERE clause is used to filter the results from a SELECT, INSERT, UPDATE, or DELETE statement.

Syntax

WHERE conditions;

Parameters or Arguments

conditions : The conditions that must be met for records to be selected.

For example:

SELECT * FROM employees WHERE first_name = ‘Jane’;

In this SQL Server WHERE clause example, we’ve used the WHERE clause to filter our results from the employees table. The SELECT statement above would return all rows from the employees table where the first_name is ‘Jane’. Because the * is used in the SELECT, all fields from the employees table would appear in the result set.

SSIS School of Training

3rd Normal Form (3NF)

Third normal form:

In second normal form, all columns in the table rely on the primary key and the table has a singular purpose

There could be relationships between the columns… dependencies could lurk within these columns called transitive dependence.

Transitive dependence means that a value of a column/field within a table relies on a another column in that same table, but this is facilitated through another column between them.

A table is in third normal form when the following conditions are met:

  • It is in second normal form.
  • All nonprimary fields are dependent on the primary key.

Again, transitive dependence means dependence between columns of the same table. Think of ArtistNationality, Artist, and Artwork. The values for ArtistNationality and Artist depend on the Artwork; once you figure out the Artwork, you know the Artist/ArtistNationality. But ArtistNationality depends on the value from Artist: This is a transitive dependence.

In order to get to third normal form, we need to make sure all columns are only dependent upon the primary key. That means we have to get the country code out of the artist table. In the following example, we’ve added country name to the table to further highlight the issue with normalizing

It’s fine that the country code exists in the artist table, but having the country name breaks the 3rd normal form rule, since we can’t get the country name without the code; we can’t get the code without the artist ID. This is by nature the definition of transitive dependence.

Let’s look at some examples that will use the fictional music database as a subject.

we’ll create another table called countries, move the country code and country name to this table. Country code becomes the primary key in the countries table, but is retained in the artist table as a foreign key.

What is Normalization? 

What is Normalization? 

Normalization is a database design technique which organizes tables in a manner that reduces redundancy and dependency of data.

It divides larger tables to smaller tables and link them using relationships.

In this tutorial, you will learn-

The inventor of the relational model Edgar Codd proposed the theory of normalization with the introduction of First Normal Form and he continued to extend theory with Second and Third Normal Form. Later he joined with Raymond F. Boyce  to develop the theory of Boyce-Codd Normal Form.

Theory of Data Normalization in Sql is still being developed further. For example there are discussions even on 6th Normal Form. But in most practical applications normalization achieves its best in 3rd Normal Form. The evolution of Normalization theories is illustrated below

1st Normal Form >> 2nd Normal Form >> 3rd Normal Form >>4th Normal Form >>  5th Normal Form >>6th Normal Form

Database Normalization Examples –

Assume a video library maintains a database of movies rented out. Without any normalization all information is stored in one table as shown below.

Further We shall discuss on different normal forms in detailed:

 

 

 

 

 

 

SQL Server next version CTP 1.4

Microsoft is excited to announce a new preview for the next version of SQL Server (SQL Server v.Next). Community Technology Preview (CTP) 1.4 is available on both Windows and Linux. In this preview, they added the ability to schedule jobs using SQL Server Agent on Linux. We can try the preview in your choice of development and test environments now: www.sqlserveronlinux.com.

Key CTP 1.4 enhancements
The primary enhancement to SQL Server v.Next on Linux in this release is the ability to schedule jobs using SQL Server Agent. This functionality helps administrators automate maintenance jobs and other tasks, or run them in response to an event. Some SQL Server Agent functionality is not yet enabled for SQL Server on Linux. To learn more and see sample SQL Server Agent jobs, you can read detailed blog titled “SQL Server on Linux: Running scheduled jobs with SQL Server Agent” or attend an Engineering Town Hall about “SQL Server Agent and Full Text Search in SQL Server on Linux.”

The mssql-server-linux container image on Docker Hub now includes the sqlcmd and bcp command line utilities to make it easier to create and attach databases and automate other actions when working with containers. For additional detail on CTP 1.4, please visit What’s New in SQL Server v.Next, Release Notes and Linux
documentation.

In addition, SQL Server Analysis Services and SQL Server Reporting Services developer tools now support Visual Studio 2017. They are available for installation from the Visual Studio Marketplace providing the option for automatic updates going forward.

 

Get SQL Server v.Next CTP 1.4 today!
Try the preview of the next release of SQL Server today! Get started with the preview of SQL Server with our developer tutorials that show you how to install and use SQL Server v.Next on macOS, Docker, Windows, and Linux and quickly build an app in a programming language of your choice.

SQL DBA LIVE Online Training with Real-time Project

SQL DBA LIVE Online Training with Real-time Project

All Training sessions are completely practical, real-time.

One Real-time Project included in the course.

Free demo today @ June 16th 7 PM India Time.

Register Now.

 

Microsoft SQL Server Training from SQL School

Mail: contact@sqlschool.com
Skype: SQL School
Address/Map
USA: +1 (510) 400 – 4845
India: +91 (040) 64577244 / 66343536 (Off)
India: +91 09666440801 (Mob)

 

 

SQL DBA LIVE Online Training with Real-time Project

 

One Real-time Project included in the course.

Free demo today @ June 16th 7 PM India Time.

Register Now.

 

SQL DBA LIVE Online Training with Real-time Project

 

http://sqlschool.com/Register.html

Register today for free demo!!

Call us on +91 9666440801 (INDIA)
Call us on +1 (510) 400-4845 (USA/CANADA)

Mail us on contact@sqlschool.com
Website: http://www.sqlschool.com

SQL Server T-SQL & SQL DBA Training cum Certification

Please register for SQL Server / T-SQL & SQL DBA Free Demo onApr 13, 2016 11:00 AM IST at:

https://attendee.gotowebinar.com/register/1524505130912828676

Why Choose Us?

** Instructor Led LIVE Online Training
** Completely Practical and Real-time
** Advance Theory Material
** Weekly Revision Classes
** Highly Interactive and Real-time

After registering, you will receive a confirmation email containing information about joining the webinar.

SQL School Training School

SQL School Trainers – Online

Register at htttp://www.sqlschool.com/Register.html

Details at http://sqlschool.com/SQLDBA-Online-Training.html

Call us on +91 9666440801 (INDIA)
Call us on +1 (510) 400-4845 (USA/CANADA)

Mail us on contact@sqlschool.com
Website: http://www.sqlschool.com