Добавить в избранное   Сделать стартовой   Главная   E-mail   Форум   Мой блог 
   
Cертификации

Errors

ETL

FAQ (по темам)

GIS

Web

wiki

Администрирование

Безопасность

Книги
Oracle, ...

Новости

ОС

Программирование

Проектирование БД

Производительность

Скачать

Советы

Тестирование

Установка

FAQ - по базам данных
FAQ - по базам данных
Установка СУБД
Oracle
Sybase
MySQL
PostgreSQL
MS SQL Server
Interbase, Firebird
Другие DB
Администрирование
Oracle
MySQL
Sybase
PostgreSQL
MS SQL Server
Interbase, Firebird
IBM DB2
Другие DB
Проектирование БД
Статьи
ETL
Теория БД
ErWin
Designer 2000
PowerDesigner
Хранилища данных
CASE средства
OLAP
Бизнес - анализ (BI)
Производительность
Oracle
MSSQL
Interbase, Firebird
IBM DB2
MySQL
PostgreSQL
SYBASE
Безопасность БД
Oracle
MS SQL Server
Инъекция SQL
Программирование
Transact-SQL
PL/SQL
C++
XML
SQL
PostgreSQL
MDX
Java
VBA Excel
Книги по базам
Oracle
Заказ книг
ОС
Установка и настройка
UBUNTU
ОС
Установка и настройка
UBUNTU
FAQ
FAQ - по базам данных
Главная arrow SQL
Structured Query Language — язык структурированных запросов

Using ORACLE Analytic Functions in Reports

Печать E-mail

What is so cool in analytic functions?

Analytic functions give you possibility to look at previous and following rows in a row set without expensive and often impossible joins because there are times you don’t know how many joins you’ll need. With analytics you can simply look for a value (or compute it using) either foregone or calculated rows forward or backwards. That means Oracle can scan source data once and then sort it (if necessary more than once) in memory or temp. My experience shows that sorting even several times is much faster than scanning source data more than once. In next four cases I’ll try to show four different real world reports that exploited analytic functions a lot.

Case one: persons and their citizenships

Report basically counted people and their citizenships. Mostly people have only one citizenship, but those who are agile enough get more than one. Respectively report stated following algorithm:

1) If person has citizenship X (most of the people has it) then is counted it and only it regardless of all other his citizenships;

2) If person hasn’t citizenship X then are counted all his citizenships.

Table PERSONS contains each person along with its name and surname. Table CITIZENSHIPS is joined to PERSONS and each person’s citizenship has one row in CITIZENSHIPS. So how to get the report using algorithm defined above?

Traditional approach would be something like count all distinct people with citizenship X (scan table CITIZENSHIPS via full scan, because X is very common citizenship) and then count all citizenships whose people haven’t X (scan source data second time most probably again via full scan and perform some index scan to check if the current person has X or not). Query is shown in Code listing 1:
Подробнее...
 

How To Use Oracle SQL: Learning SQL

Печать E-mail

SQL is shorthand for Structured Query Language. Oracle SQL is a language and not an application. It is a language that can be used to communicate with databases. Oracle SQL can be used to query databases and analyze data.

how to use oracle

Before you use Oracle SQL, you need to understand what a database is. What is a database? It’s a collection of data stored in an organized fashion. The data is stored as Tables inside of a database. Data within tables are stored as rows. All data within a database is either a column or a row. Vertical data is called a column, and horizontal data is called a row.

Подробнее...
 

Merge enhancements in 10g

Печать E-mail
The MERGE statement was introduced in Oracle 9i as part of Oracle's ETL-enabling technology. It enables us to conditionally update or insert data into a target table and in many cases is more flexible and efficient than previous hand-coded "UPSERT" solutions. With the release of 10g, Oracle has added many enhancements to MERGE, making it a considerably more flexible and powerful statement than its 9i predecessor. For example, MERGE can now UPDATE, DELETE and INSERT with separate conditions for each. It also supports UPDATE-only or INSERT-only operations. We'll examine such improvements in this article.
Подробнее...
 

Partition outer join in oracle 10g

Печать E-mail
Partition outer join is a new mechanism in 10g to "invent" data to fill the gaps in non-contiguous results. In 10g there are many methods to deal with such a problem (including the awe-inspiring, but equally terrifying, MODEL clause). In older versions of Oracle, "data-densification" was not as simple and certainly less efficient than it has now become.
Подробнее...
 

SQLite и полноценный UNICODE

Печать E-mail
Наверно многим известна embed база данных SQLite. SQLite полностью поддерживает кодировки UTF-8 и UTF-16. Но есть один нюанс, для строковых и текстовых полей, символы которых выходят за пределы ASCII таблицы, не работает нечувствительный к регистру LIKE и ORDER BY.
Например:
sqlite> SELECT "ы" LIKE "Ы";
0
в то время как
sqlite> SELECT "s" LIKE "S";
1
Давайте разберемся как же это исправить.

Продолжительное гугленье наводит нас на ICU экстеншн для SQLite. Как видно из readme, ICU расширение подменяет функции upper() и lower(), которые и отвечают за преобразование регистра символов. Помимо этого, данный экстеншн добавляет реализацию оператора REGEXP, для выборки текстовых полей по регулярному выражению(SQLite на уровне языка поддерживает REGEXP оператор, но функция, его реализующая поставляется без реализации, с расчетом на пользовательскую реализацию).
Подробнее...
 
<< [Первая] < [Предыдущая] 1 2 3 4 [Следующая] > [Последняя] >>

Результаты 1 - 9 из 33
Взаимосвязанные статьи
     

Последние добавленные статьи
Поиск
Ссылки
Главная
Скачать
Курсы
Роль АБД (SYSDBA)
Карта сайта
Автостекла
Контакты
Войти на сайт
Популярные статьи
Online - тесты
1Z0-042
Rambler's Top100 МЕТА - Украина. Рейтинг сайтов хостинг от freehost.com.ua

Все права защищены.SYSDBA 2010 | Если у Вас есть хороший материал пришлите его нам.