0% found this document useful (0 votes)
4 views17 pages

Managing Database Systems.pptx

Uploaded by

jjqgarcia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
4 views17 pages

Managing Database Systems.pptx

Uploaded by

jjqgarcia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 17

MANAGING DATABASE

SYSTEMS
ICSC0413 – DATABASE MANAGEMENT SYSTEM
A.Y. 2024 – 2025
INSTRUCTOR: KHRIS VILLEGAS
OBJECTIVES
At the end of this course packet, you will be able to:

• Perform data warehousing techniques using SQL statements


INTRODUCTION

• This course packet includes discussion about the different techniques


of data warehousing and data mining, explain the features and
strategies for the design of distributed database systems and
demonstrate the significance of data warehousing in managing
database systems.
DATABASE ADMINISTRATION

• It involves discussion about data mining, data warehousing and the


different techniques in using set operators and enhancement by clause
which will help you to better manage a database system.
MANAGING DATABASE SYSTEMS

Data Warehousing and Data Mining.

• Data warehouse refers to the process of collecting and consolidating data into one
common database. This is where the data can be stored for valuable data mining.

• Data mining refers to the process of extracting valuable data from the databases.
The advantage of using data mining will depend on the data collected and
consolidated in the data warehouse.
MANAGING DATABASE SYSTEMS

Online Analytical Processing

• It is a computing method that is used as a business intelligence that


allows users to effortlessly and selectively extract and query data in
order to analyze it from diverse points of view. It is very useful in
extracting and processing of information for different planning
purposes such as trends analysis, financial reporting, and sales
forecasting.
MANAGING DATABASE SYSTEMS

Distributed Database Systems

• It is an integrated collection of databases that is distributed to two or


more physical databases.
MANAGING DATABASE SYSTEMS

Set Operators

• These are used to combine the results of multiple queries into one
result set. Queries with SET operators are referred to as compound
queries. In these kind of queries, database users can combine multiple
queries by adding, subtracting or intersecting their results.
MANAGING DATABASE SYSTEMS

The Union Operator

• It returns all distinct records selected by either queries. It is mainly used to


eliminate any duplicate record from multiple tables. The result of UNION
query is sorted in ascending order by default.

• The query can be issued to display the current and previous job titles with
the corresponding department number of all employees.
Example:
SELECT employee_id, department_id FROM Employees
UNION
SELECT employee_id, department_id FROM JobHistory;
MANAGING DATABASE SYSTEMS

The Union ALL Operator

• Unlike UNION, the UNION ALL records from both queries including
duplicates. Since the output is not sorted by default, an ORDER by CLAUSE
can be included in the query to sort the records according to the desired
arrangement.
Example:
SELECT employee_id, department_id FROM Employees
UNION ALL
SELECT employee_id, department_id FROM JobHistory
ORDER BY employee_id;
MANAGING DATABASE SYSTEMS

Enhancement to the Group by Clause


• The GROUP BY clause is used in a SELECT statement to gather the records
together and group the results based on a specified column. It is usually
used in conjunction with aggregate or group functions to generate a more
summarizing result.
Recall the syntax for the GROUP BY clause:
SELECT [column,] group_function (column)…
FROM table
[WHERE condition]
[GROUP BY group_by_expression]
[ORDER BY column];
MANAGING DATABASE SYSTEMS

GROUP BY with ROLLUP and CUBE Operators

• The CUBE and ROLLUP operators are specified in the GROUP BY clause of
a SELECT statement. These operators are extensions of the GROUP BY
clause that are used to generate super aggregate rows by cross-referencing
columns.
• ROLL UP. It is used to produce a set of results containing the regular
grouped rows and subtotal rows.
• CUBE. It is used to generate results containing the records from ROLL UP
and cross-tabulation records. It groups selected records based on the values of
all possible combinations of expressions and returns a single record of
summary information for each group.
MANAGING DATABASE SYSTEMS

SYNTAX;
SELECT [column,] group_function (column)…
FROM table
[WHERE condition]
[GROUP BY [ROLL UP | CUBE] group_by_expression]
[HAVING having_expression]
[ORDER BY column];
MANAGING DATABASE SYSTEMS

GROUPING FUNCTION:

• It can be used in conjunction with the ROLL UP or CUBE operators. It


uses a single column as its argument and it helps database users to
understand how a summary value from a GROUP BY has been
obtained.
MANAGING DATABASE SYSTEMS

Example

• For department_id less than 20, display the total salaries for every job_id
within a department and get the total of all the salaries within each
department. Include a column to show how the summary values are
computed.
SELECT department_id, SUM (monthly_salary)
GROUPING (department_id) GRT_DEPT
FROM employees
WHERE department_id<20
GROUP BY ROLLUP (department_id);
QUESTIONS ?
THANK YOU ☺

You might also like