Администрирование
HyperSQL, IBM DB2, IBM DB2, Interbase, Firebird, Yaffil , MSSQL, MySQL, ORACLE, PostgreSQL, SYBASE, Другие, Курсы, ... |
Безопасность
HyperSQL, MSSQL, Oracle, Phpmyadmin, Инъекция SQL, Книги, Патчи, Программы, Скрипты, СУБД, ... |
Проектирование БД
Business intelligence, Data Warehouse, Designer 2000 (Oracle), ErWin, ETL, OLAP, Sybase PowerDesigner , Другие CASE средства, Статьи, Теория БД, ... |
Производительность
DB2, HyperSQL, IBM DB2, Interbase, Firebird, Yaffil, MSSQL, MySQL, ORACLE, PostgreSQL, SQL, SYBASE, Другие, ... |
Установка
HyperSQL, IBM DB2, Interbase, Firebird, Yaffil , MSSQL, MySQL, ORACLE, PostgreSQL, SYBASE, Другие, ... |
|
|
Главная SQL
Structured Query Language — язык структурированных запросов
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: |
|
Подробнее...
|
|
|
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.  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. |
|
Подробнее...
|
|
|
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 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. |
|
Подробнее...
|
|
Наверно многим известна 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 |
|
Последние добавленные статьи |
|
|
|
|