The document discusses multiple database concepts including different types of joins, set operators, subqueries, views, sequences, synonyms, indexes, and security. It provides syntax examples for performing joins, subqueries, creating views, sequences, and indexes. It also describes controlling access and privileges at the system and database level.
SQL provides powerful but reasonably simple tools for data analysis and handling. Mike McClellan, the Senior Product Manager for Paddle8, took beginners through the basics of SQL. He talked about the SQL queries needed to collect data from a database, even if it lives in different places and analyze it to find the answers you’re looking for.
He taught the understanding of essential SQL skills that allow developers to write queries against single and multiple tables, manipulate data in tables, and create database objects.
Types Of Join In Sql Server - Join With Example In Sql Serverprogrammings guru
Do you know How many types of Joins in SQL. In this ppt presentation we are discussion about types of joins in sql server eg: INNER JOIN , SELF JOIN ,OUTER JOIN ,Right outer Join,Left outer Join,Full Outer Join,CROSS JOIN .
Data Definition Language (DDL), Data Definition Language (DDL), Data Manipulation Language (DML) , Transaction Control Language (TCL) , Data Control Language (DCL) - , SQL Constraints
SQL provides powerful but reasonably simple tools for data analysis and handling. Mike McClellan, the Senior Product Manager for Paddle8, took beginners through the basics of SQL. He talked about the SQL queries needed to collect data from a database, even if it lives in different places and analyze it to find the answers you’re looking for.
He taught the understanding of essential SQL skills that allow developers to write queries against single and multiple tables, manipulate data in tables, and create database objects.
Types Of Join In Sql Server - Join With Example In Sql Serverprogrammings guru
Do you know How many types of Joins in SQL. In this ppt presentation we are discussion about types of joins in sql server eg: INNER JOIN , SELF JOIN ,OUTER JOIN ,Right outer Join,Left outer Join,Full Outer Join,CROSS JOIN .
Data Definition Language (DDL), Data Definition Language (DDL), Data Manipulation Language (DML) , Transaction Control Language (TCL) , Data Control Language (DCL) - , SQL Constraints
Its about a sql topic for basic structured query languageIMsKanchanaI
this is containning about structured query language and database concepts , commands, queries and queries to create and database and inserting values and rows. rows cannot be inserted at a time. only one row can be inserted at a time.
Its about a sql topic for basic structured query languageIMsKanchanaI
this is containning about structured query language and database concepts , commands, queries and queries to create and database and inserting values and rows. rows cannot be inserted at a time. only one row can be inserted at a time.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
2. The required data are in more than one
table , related tables are using a join
condition.
The join condition combines a row in one
table with a row in another table based on
the same values in the common columns.
Different types of joins based on the join
condition used.
JOIN
4.
The equijoin is a join with a
join condition involving common
columns from two tables.
Syntax:
SELECT column names
FROM table names
WHERE join condition(s);
1.EQUIJOIN
5.
There is no matching column in
the EMPLEVEL tables for the salary
column in the EMPLOYEE table.
The join condition for these tables
can be written using any operator
other than the =operator that is why it
is called non-equijoin.
2.NONEQUIJOIN
6.
If a row in one table does not have
a matching value in the other table it is not
joined.
you would change your query’s
join condition and create a join known as an
outer join.
The outer join uses the(+)operator
in the join condition on the deficient side.
3.OUTER JOIN
8.
A Self join is joining a table to
itself. one join that is not so easy to
understand.
a tables is joined to itself two
copies of the same table are loaded or
used.
they are treated like any two
different tables and a join is produced
from those two copies.
4.SELF JOIN
9.
In set operators learned about union,
intersection and difference operations if you
recall these operations are possible on
“union-compatible” tables.
The implementation of these operations
is through the use of set operators.
SET OPERATORS
11. UNION - It returns all rows from
both queries but duplicate rows are not
repeated.
UNION ALL – It returns all from both
queries and it displays all duplicate rows.
INTERSECT – It returns all rows that
appear in both queries results.
MINUS – It returns rows that are
returned by the first query minus rows
that are returned by the second query.
SET OPERATOR AND USE
12.
sub query are also known as nested
query .a sub query is usually a
SELECT query within one of the
clauses in another SELECT query.
1. Single –row query
2. multiple –row query.
SUBQUERY
13. A sub query that returns only one row of data
it is also known as a scalar sub query. The sub
query must be enclosed within a pair of
parentheses .The ORDER BY clause cannot be
used in a sub query.
SYNTEX
SELECT column list
FROM table name
WHERE column operator
(SELECT column names
FROM table name
WHERE condition
SINGLE ROW SUBQUERY
14.
You can create a table by using a nested
SELECT query .the query will create a new
table and populate it with the rows selected
from the other table .
syntax :
CREATE TABLE table name
AS
SELECT query;
CREATING A TABLE USING A
SUBQUERY
15.
An existing table can be populated
with a sub query .the table must already
exist to insert rows into it .
syntax
INSERT INTO
table name [(column list)]
SELECT columns
names FROM table name WHERE
conditions;
INSERT USING A SUBQUERY
16.
In most cases you uses the
INSERT statement to add a row into
a table .
1. INSERT ALL(conditional
&unconditional)
2. INSERT FIRST
INSERTING INTO MULTIPLE
TABLES
17.
The rows are selected from the EMPLOYEE table
and inserted into two existing tables ,
EMPLOYEE_SALARY and EMPLOYEE _DEPT.
syntax
INSERT ALL
INTO employee _salary
VALUES(Employee id ,L
name , F name salary commission
UNCONDITIONAL INSERT
ALL
18.
INTO employee _dept
VALUES(Employee id ,L name , F name, Dept id,
supervisor)
SELECT Employee id ,L name , F name, salary,
commission , dept id , supervisor
FROM employee WHERE salary > 50000 OR
dept id <>40;
19.
The rows are inserted into tables based on their individual conditions .
The WHEN…..THEN clause is used with different conditions for
inserting rows into different tables.
SYNTAX
INSERT ALL
WHEN Salary >50000
THEN INTO employee _salary
VALUES (employee id, L name ,F name
, salary ,commission )
WHEN dept id<>40 THEN
INTO employee _dept
VALUES(employee id ,L name , F
name , Dept id ,supervisor)
SELECT employee id , L name , F name , salary ,
CONDITIONAL INSERT
ALL
20.
A row or rows from a table can be deleted
based on a value returned by a sub query.
SYNTAX :
DELETE FROM table name
WHERE column name =
( SELECT sub query) ;
DELETE USING A
SUBQUERY
21.
A multiple –row sub query
returns more than one row . the
operator used in single row sub
queries (=,<>,>,>=,< and <=)
cannot be used with multiple –
row sub query.
MULTIPLE ROW
SUBQUERY
22.
MERGE STATEMENT
You can use the MERGE statement to perform
INSERT and UPDATE operations together . This operation
is very useful in data warehousing .
CORRELATED SUBQUERY
In a Correlated sub query the inner (nested )query
can reference columns from the outer query .The inner query
is executed once for each row in the outer query . In other
sub quries the inner query was excueted only once.
23.
The EXISTS and NOT EXISTS
operators are used with
correlated queries . The EXISTS
operator checks if the inner
query returns at least one row.
EXISTS AND NOT EXISTS
OPERATORS
24.
A view is an oracle object
that gives the user a logical view of
data from an underlying table or
tables. When a view is created from
than one tables ,the user can view data
from the without using join condition
and complex conditions.
VIEW
25.
A view is created with a SELECT sub
query. The sub query cannot use an
ORDER by clause but a view can.
syntax:
CREATE [OR REPLACE] VIEW
view name [column aliases]
AS SELECT – sub query
[WITH CHECK OPTION
[CONSTRAINT constraint name]]
[WITH READ ONLY];
CREATING VIEW
26.
A user who owns a view or who
has the privilege to remove it – can
remove a view. The removal of a view
does not affect data in the underlying
table.
when a view is removed a “view
dropped” message is displayed.
DROP VIEW view name;
REMOVING A VIEW
27.
When you alter an underlying table
the view becomes invalid. You need to
recompile that view to make it valid
again.
the ALTER VIEW statement is
used for the re –compilation of a view.
ALTER VIEW deptsalvu COMPILE;
ALTERTING A VIEW
28.
A sequence is an oracle object that is
used to generate a sequence of
number sequencing is a perfect
solution for generating values for such
numeric columns. A sequence is a not
primary key columns but can be used
on any numeric column.
SEQUENCES
29.
CREATE SEQUENCE sequencename
[INCREMENT BY n]
[START WITH s]
[MAXVALUE x NOMAXVALUE]
[MINVALUE m NOMINVALUE]
[CYCLE NOCYCLE]
[CACHE cNOCACHE]
[ORDERNOORDER]
syntax
30.
Modify a sequence if you own it or
have ALTER SEQUENCE .
Modify sequence does not affect past
numbers only generated in the future.
Modification of a sequence does not
allow you to change the starting value.
The maximum value cannot be set to a
number less than the current number.
MODIFYING A
SEQUENCE
32.
You can drop a sequence with the
DROP SEQUENCE statement. A
removed sequence cannot be used
anymore.
DROPSEQUENCE major
Majorid seq;
DROPPING A SEQUENCE
33.
synonyms are oracle objects that are used to create
alternative names for tables ,views , sequnces and
other objects.
you can create a synonyms for username .table
name
a synonym name must be different than all than
the other objects owned by the user.
A synonym can be removed by using the DROP
SYNONYM statement.
A user can get information about synonyms and
their table names by using oracle data dictionary
table , USER SYNONYMS
SYNONYMS
34.
An index is another oracle object
that is used for faster retrieval of
rows from a table. an index can be
created explicitly by using the
CREATE INDEX statement or
implicitly by oracle.
INDEX
35.
An index based on a combined of column is called
composite index or CONCATENATED INDEX.
The general syntax is :
CREATE INDEX index name
ON
tablename(columnname1,[columnname2],…);
The TABLESPACE and STORAGE clause can be
used
with the CREATE INDEX statement.
36. When a table goes through many changes
(insertions, delections,and updates), it is
advisable to rebuild indexes based on that table.
You can drop an index and recreate it, but it is
faster to just rebuild an existing index.
Rebuild compacts index data and improves
performance.
For example,
ALTER INDEX student_ index REBUILD;
REBUILDING AN INDEX
37. A user’s access needs to be controlled in
a shared, multiuser oracle environment.
A user’s access to the database can be
restricted, and a user may or may not be
allowed to use certain objects in the
database.
Security is classified into two types:
SYSTEM SECURITY
DATABASE SECURITY
CONTROLLING ACCESSS
38.
Defines access to the database at the
system level.
It is implemented by assigning a
username and password, allocating
disk space, and providing a user
with the ability to perform system
operations.
SYSTEM SECURITY
39. Defines a user’s access to various
objects' and the tasks a user can
perform on them.
The database administrator[DBA]is
the most trusted user ,and a DBA is
the most trusted user, and a DBA has
all the privileges. A DBA can create
users, assign them.
Database security
40.
An object privileges specifies what a
user can do with a database object,
such as a table, sequence, or a view.
There are 11 basic object privileges,
and each object has a set of privileges
out of the total of 11 privileges.
OBJECT PRIVILEGES