Отправляет email-рассылки с помощью сервиса Sendsay

MS SQL Server

  Все выпуски  

MS SQL Server - дело тонкое...


Информационный Канал Subscribe.Ru

#212<<  #213

СОДЕРЖАНИЕ

1.СЕМИНАР
1.1.Reporting Services & Notification Services & Репликация
2.СОВЕТЫ
2.1.Перемещение статистики SQL Server из одной базы данных в другую
3.ССЫЛКИ НА СТАТЬИ
3.1.Статьи на русском языке
3.2.Англоязычные статьи
4.ФОРУМ SQL.RU
4.1.Самые популярные темы недели
4.2.Вопросы остались без ответа

СЕМИНАР

Reporting Services & Notification Services & Репликация

Санкт-Петербург. 6 сентября 2004 года 18:00 в помещении компании DataArt состоится очередной семинар Russian SQL Server Club (Microsoft & SQL.RU).

Встреча проводится при поддержке компаний DataArt и Digital Design.

Программа встречи:

    1. Обзор репликации MS SQL Server (Александр Гладченко, Rambler)

    2. Notification Services (Антон Смольянинов, Digital Design)

    3. Reporting Services (Андрей Синкин, Microsoft)

Информация о месте проведения: DataArt, Санкт-Петербург, Большой Сампсониевский пр., д. 60 А
т. +7 812 333-4440

Карта проезда

Регистрация не требуется

[В начало]

СОВЕТЫ

Перемещение статистики SQL Server из одной базы данных в другую

По материалам статьи Joe Chang: Transferring SQL Server Statistics From One Database to Another
Перевод Виталия Степаненко

Многие рабочие базы данных в настоящее время имеют объем в десятки и сотни гигабайт. Такой объем не является проблемой для аппаратного обеспечения компаний. Однако разработчики обычно любят работать на своих персональных компьютерах, включая ноутбуки с ограниченным дисковым пространством, поэтому база данных размером в 10-100 гигабайт уже может вызвать трудности. Кроме того, регулярная передача таких больших файлов данных через сеть может не иметь смысла из-за потерь рабочего времени. Поэтому предпочтительнее работать с меньшей по размеру базой данных, но имеющей ту же схему.

Главным отличием между маленькой тестовой базой данных разработчика и полноразмерной рабочей базой данных является распределение данных статистики. Это приводит к разным оценкам затрат ресурсов и потенциально разным планам исполнения запросов. В этих условиях разработчик не сможет увидеть потенциальные проблемы с производительностью, пока план исполнения не будет проверен на полноразмерной базе данных.

Решением проблемы разных планов исполнения может служить передача статистики из рабочей базы данных в меньшую базу данных разработки. В идеале такая возможность должна быть встроена в SQL Server, поэтому было бы хорошо, если бы читатели этой статьи отослали на адрес sqlwish@microsoft.com пожелание иметь такую функциональность. По слухам, такая функциональность уже есть в Sybase Adaptive Server Enterprise, т.е. над этой проблемой кто-то уже определенно задумывался. Как временное решение, предлагается альтернативный метод.

Статистика SQL Server

SQL Server использует оптимизацию на основе оценки затрат ресурсов. Ключевым моментом такой оптимизации является метод оценки количества строк и страниц, вовлеченных в каждый шаг плана исполнения запроса. Это является причиной того, что SQL Server генерирует и поддерживает статистику распределения. Статистика генерируется на основе ключей индексов, но также может быть сгенерирована для неиндексированных столбцов. Таблица sysindexes имеет записи для каждого индекса и каждой коллекции статистики, которая не связана с индексом. Каждая таблица имеет запись в таблице sysobjects с id, уникальным в пределах базы данных. Столбец id в таблице sysindexes - это id таблицы. Столбцы id и indid уникально определяют строку в таблице sysindexes. Столбец name в таблице sysindexes - это имя индекса или имя коллекции статистики. Любая коллекция статистики может быть отображена с помощью следующей команды:

DBCC SHOW_STATISTICS ( table , target )

Target - это имя индекса или имя коллекции статистики. Ниже показан результат выполнения команды DBCC SHOW_STATISTICS для коллекции статистики на основе индекса. Первый набор данных содержит основную информацию, включая дату последнего обновления, общее количество строк, количество строк для сбора статистики (sample), и т.д. Второй набор данных содержит общее среднее значение распределения для каждого ключа в последовательности. В этом примере первым столбцом ключа является столбец eventPlannerID, а вторым (и последним) - ID. Первая строка показывает информацию об общем среднем распределении для каждого отдельного значения первого ключа, а вторая строка показывает распределение для каждого отдельного значения первого ключа, скомбинированного со вторым ключом.

Рис.1. Результат выполнения команды DBCC SHOW_STATISTICS.

Процесс передачи статистики

Процесс передачи статистики из одной базы данных в другую с той же схемой можно описать следующим образом:

1) Обновление статистики полноразмерной базы данных (не обязательно, но рекомендуется).

2) Создание новой базы данных на сервере с полноразмерной версией базы данных.

3) Установка AUTO_CREATE_STATISTICS и AUTO_UPDATE_STATISTICS в off.

4) Создание пользователей, типов данных, таблиц, ограничений, кластерных индексов (включая первичные ключи), и всех остальных объектов, кроме некластерных индексов.

5) Создание таблиц для сохранения связи между именами и id таблиц и пользователей исходной и новой баз данных. Заполнение таблиц связи между именами таблиц и пользователей.

6) Создание и заполнение таблицы с копией таблицы sysindexes из исходной базы данных (необязательно).

7) Выполнение sp_configure для того, чтобы разрешить обновление системных таблиц.

8) Вставка коллекций статистики, не связанных с индексами, в таблицу sysindexes новой базы данных.

9) Создание всех некластерных индексов.

10) Обновление значений, относящихся к статистике, у всех записей по индексам таблицы sysindexes.

Обновление статистики

Этот шаг необязателен, но если мы собираемся сделать все наилучшим образом при передаче статистики, то нам нужно передать точную информацию. Простейший метод обновления статистики - выполнение следующей команды.

exec sp_updatestats

Эта команда выполняет UPDATE STATISTICS по всем пользовательским таблицам в текущей базе данных. Новая статистика унаследует коэффициент сбора статистики (sampling ratio) из старой статистики.

Желательно изменить коэффициент сбора статистики на full scan, для этого выполните следующую команду для генерации скрипта обновления статистики по каждой таблице с полным сканированием. Заметьте, что в SQL Server Enterprise Edition представления также могут иметь индексы. Также предполагается, что вы не собираетесь передавать статистику по таблицам, созданным SQL Server во время инсталляции.

SELECT 'UPDATE STATISTICS ' + o.name + ' WITH FULLSCAN'
FROM sysobjects o
WHERE ( OBJECTPROPERTY(o.id, N'IsUserTable') = 1
OR OBJECTPROPERTY(o.id, N'IsUserView') = 1 )
AND OBJECTPROPERTY(o.id, N'IsMSShipped') = 0
ORDER BY o.name

Также выполните DBCC UPDATEUSAGE, чтобы исправить значения столбцов rows, used, reserved и dpages таблицы sysindexes.

Создание новой базы данных и отключение автоматической статистики

Это пример скрипта создания новой базы данных:

CREATE DATABASE [sut] ON PRIMARY (NAME = N'sut_data',
FILENAME = N'C:\MSSQL\Data\sut_data.mdf' , SIZE = 32)
LOG ON (NAME = N'sut_log',
FILENAME = N'C:\MSSQL\Data\sut_log.ldf' , SIZE = 16)
COLLATE SQL_Latin1_General_CP1_CI_AS

После создания новой базы данных отключите автоматическое управление статистикой, как показано ниже.

ALTER DATABASE [sut] SET AUTO_CREATE_STATISTICS OFF
GO
ALTER DATABASE [sut] SET AUTO_UPDATE_STATISTICS OFF
GO

Создание пользователей, типов данных, таблиц, кроме некластерных индексов

Создайте необходимых пользователей (которые владеют объектами в исходной базе данных), типы данных, кластерные индексы, ограничения и других объекты, кроме некластерных индексов. Возможно, будет проще запустить генерацию скриптов в Enterprise Manager дважды, первый раз с индексами, но без ключей, значений по умолчанию и ограничений, и второй раз без индексов, но с ключами, значениями по умолчанию и ограничениями. Это поможет отделить некластерные индексы от значений по умолчанию. Причина того, что мы не создаем некластерные индексы на этом этапе, в том, что индексы и статистики, не связанные с индексами, могут иметь пересекающиеся значения indid. Если бы некластерные индексы были созданы сейчас, то было бы необходимо изменять связи для значений indid статистики исходной базы данных.

Создание и заполнение таблицы связи

Когда объекты, такие, как таблицы, создаются в новой базе данных, новый объект скорее всего имеет id, отличный от id исходного объекта. Т.к. таблица sysindexes использует столбец id для определения таблицы, необходимо создать таблицу связи для хранения id исходного и нового объектов для каждой таблицы. В скрипте столбец name не является необходимым, он включен для удобства.

Это скорее всего не важно, но этот набор скриптов не тестировался на базах данных, в которых владельцами таблиц являются не dbo.

CREATE TABLE [tobjects] ( name sysname , oid int , ouid int , id int , uid int
Switch back to the original database, and use the following script to populate the
object id mapping table.
INSERT [sut]..[tobjects] (name, oid, ouid, id, uid)
SELECT o.name, o.id, o.uid, n.id, n.uid
FROM sysobjects o
INNER JOIN [sut]..sysobjects n ON n.name = o.name
WHERE ( OBJECTPROPERTY(o.id, N'IsUserTable') = 1
OR OBJECTPROPERTY(o.id, N'IsUserView') = 1 )
AND OBJECTPROPERTY(o.id, N'IsMSShipped') = 0
ORDER BY o.name

Создание копии исходной таблицы sysindexes

Этот шаг также необязателен, но он помогает создать постоянную копию таблицы sysindexes исходной базы данных в новой базе данных. Показанный ниже скрипт создает таблицу с теми же столбцами, что содержатся в таблице sysindexes.

CREATE TABLE tindexes (
id int , status int , first binary (6) , indid smallint , root binary(6) , minlen smallint ,
keycnt smallint , groupid smallint , dpages int , reserved int , used int , rowcnt bigint ,
rowmodctr int , reserved3 tinyint , reserved4 tinyint , xmaxlen smallint ,
maxirow smallint , OrigFillFactor tinyint , StatVersion tinyint , reserved2 int ,
FirstIAM binary (6), impid smallint , lockflags smallint , pgmodctr int ,
keys varbinary (1088), name sysname , statblob image , maxlen int )
GO

Вернитесь в исходную базу данных и заполните созданную таблицу данными из таблицы sysindexes исходной базы данных.

INSERT [sut]..tindexes
(id,status,first,indid,root,minlen,keycnt,groupid,dpages,reserved,used,rowcnt,
rowmodctr,reserved3,reserved4,xmaxlen,maxirow,OrigFillFactor,StatVersion,
reserved2,FirstIAM,impid,lockflags,pgmodctr,keys,name,statblob,maxlen,rows)
SELECT
i.id,status,first,indid,root,minlen,keycnt,groupid,dpages,reserved,used,rowcnt,
rowmodctr,reserved3,reserved4,xmaxlen,maxirow,OrigFillFactor,StatVersion,
reserved2,FirstIAM,impid,lockflags,pgmodctr,keys,i.name,statblob,maxlen,rows
FROM sysindexes i
INNER JOIN [sut]..[tobjects] t ON t.oid = i.id

Внутреннее объединение с таблицей [tobjects] оставляет для копирования в новую таблицу только строки с верной информацией о связи. Связь между id объекта и id объекта новой базы данных пока в соответствие не ставится. Для этого нет особых причин.

Изменение конфигурации, чтобы разрешить обновления системных таблиц

По умолчанию, прямые обновления системных таблиц не разрешены по очевидным причинам. Следующая команда изменяет эту настройку (обычно не рекомендуется выполнять прямые обновления в системных таблицах, но это особый случай).

Exec sp_configure 'allow updates', 1
RECONFIGURE WITH OVERRIDE
GO

Заметьте, что любая хранимая процедура, созданная, когда установка 'разрешить обновления' была активна, будет иметь возможность обновлять системные таблицы, даже если эта установка будет отключена. Рекомендуется немедленно отключать установку 'разрешить обновления' и не создавать хранимые процедуры в то время, когда эта установка активна.

Вставка статистики

Вставьте коллекции статистики, не связанные с индексами, в таблицу sysindexes новой базы данных. Столбец status с битовой маской 64 обозначает статистики, не связанные с индексами. Этот шаг должен быть выполнен до создания некластерных индексов. Когда в новой базе данных существуют только кластерные индексы, значение столбца indid в таблице sysindexes может быть равно или 0 (для неупорядоченных таблиц, куч), или 1 (для кластерных индексов). И статистики, не связанные с индексами, и некластерные индексы имеют значения столбца indid от 2 до 254. Значение indid, равное 255, обозначает данные типа text или image. Это позволяет строки таблицы sysindexes исходной базы данных просто копировать в таблицу sysindexes новой базы данных с новым id объекта и исходным indid. Заметьте, что последний столбец таблицы sysindexes, rows, не вставляется, т.к. это вычисляемый столбец.

INSERT sysindexes(
id,status,first,indid,root,minlen,keycnt,groupid,dpages,reserved,used,rowcnt,
rowmodctr,reserved3,reserved4,xmaxlen,maxirow,OrigFillFactor,StatVersion,
reserved2,FirstIAM,impid,lockflags,pgmodctr,keys,name,statblob)
SELECT o.id, status,first,indid,root,minlen,keycnt,groupid,dpages,reserved,used,rowcnt,
rowmodctr,reserved3, reserved4,xmaxlen,maxirow,OrigFillFactor,StatVersion,
reserved2,FirstIAM,impid,lockflags,pgmodctr,keys,s.name,statblob
FROM [tindexes] s
INNER JOIN [tobjects] o ON o.oid = s.id
WHERE (s.status & 64) = 64
GO

Создание некластерных индексов и обновление таблицы sysindexes

После вставки в таблицу sysindexes статистик, не связанных с индексами, могут быть созданы некластерные индексы. Неважно, совпадает ли значение indid некластерных индексов с исходным значением indid. Команда, показанная ниже, обновляет новую таблицу sysindexes нужными данными по статистикам из копии исходной таблицы sysindexes.

UPDATE i SET dpages = s.dpages, reserved = s.reserved, used = s.used,
rowcnt = s.rowcnt, rowmodctr = s.rowmodctr, statblob = s.statblob
FROM sysindexes i
INNER JOIN [tobjects] t ON t.id = i.id
INNER JOIN [tindexes] s ON s.id = t.oid AND s.name = i.name
WHERE (s.status & 64) = 0
GO

Теперь выполните команду sp_configure, чтобы запретить обновления системных таблиц. Новая база данных может быть теперь сохранена (backup) или отсоединена (detach) для передачи в другую систему. Все необходимые данные для новой маленькой базы данных могут быть переданы в любое время с помощью этого процесса.

Заключение

В статье было представлено описание шагов передачи статистики из одной базы данных в другую. Наверное, это является наиболее полезным, когда необходимо отобразить в маленькой базе данных такой же план исполнения, который будет и в большой рабочей базе данных. Разработчики могут работать со сгенерированной скриптами базой данных и при этом видеть рабочий план исполнения, за исключением параллельно исполняемых планов, если компьютер разработчика однопроцессорный.

Другие потенциальные возможности использования этого метода включают в себя возможность устранять проблемы с производительностью, используя планы исполнения, которые могут строиться только на данных статистики рабочей базы данных. Скрипты для необходимых таблиц и индексов могут быть переданы в новую базу данных вместе со статистикой. Это небольшое количество данных может быть переслано по электронной почте для удаленного устранения проблем.

[В начало]

ССЫЛКИ НА СТАТЬИ

Статьи на русском языке

Введение в SQL - 2
Dimka
MSSQLServer: Всю эту статью мы посвятим различным действиям с небольшой базой данных. Для понимания значений употребляемых объектов базы данных, а также типов данных отсылаю читателя к первой статье цикла. Также будем полагать, что читающий эту статью умеет разбирать схемы данных и имеет представления о нормализации отношений в процессе проектирования (например, см. статьи Alf'а в этом же разделе статей)...
Как найти объект в базе данных SQL Server
Ashish Kaushal
MSSQLServer: Насколько часто мы - разработчики и администраторы SQL Server - вынуждены перебирать объекты в Enterprise Manager или открывать панель объектов в Query Analyzer, пытаясь найти таблицу или представление и не имея практически никакой информации, кроме почти правильного имени, и единственный путь убедиться, что это именно нужный нам объект - взглянуть на его структуру или текст. Конечно, такие вещи могут происходить не каждый день, но время от времени случаются (возможно, такого не происходит в идеальной ситуации, когда все базы данных хорошо документированы и все имена объектов соответствуют четким соглашениям по наименованию без каких-либо исключений, и более того, когда сотрудники никогда не увольняются)...

[В начало]

Англоязычные статьи

Disaster in the Real World - Hurricane
Andy Warren
As you may have read in the newsletter, I'm lucky enough to live in the Orlando area, right in the middle of the path Hurricane Charley followed. What follows are some of the problems I've experienced both personally and professionally over the last few days. Hindsight is 20-20 they say, but I'll throw some of those comments in too
MDX in Analysis Services: Mastering Time: Introduction to Moving Averages
William Pearson
In this article, we resume the focus of a group of articles that began with Mastering Time: Change across Periods. In that article, as well as its immediate successor, Mastering Time: Period - to - Date Aggregations, we concentrated upon the Time dimension from the perspective of our MDX queries. Our intent, in these and occasional subsequent articles, is to explore ways to effectively report change over time, as well as to accumulate those changes to present snapshots, trends and other time-based metrics in a precise manner to meet typical business requirements. As most of us realize, time is the most pervasive dimension. A cube that has no time dimension is rare, indeed. Consequently, this group of articles holds information that is of interest to virtually anyone involved with MSAS cube design, development and use
Restoring a SQL Database
Muthusamy Anantha Kumar
When we create a backup maintenance plan with one Full backup and transaction log backups for every 15 minutes, it is sometimes necessary to restore the FULL backup and all the corresponding transactional backups sequentially. This may happen if the production box goes down or if you want to have the same database restored to another Server, etc. It is tiresome to locate all the transaction log backups and restore them one by one
Calculating Baseline Metrics for Business Intelligence
Mark Frawley
At first glance, calculating a baseline metric—an average of some measure over a specific period of time—appears to be a simple task. In reality, baseline metrics are slippery beasts, and not at all as simple as they appear
SQL Server: Recovering a database with just the .ldf and .mdf files
Greg Robidoux and Jeremy Kadlec
The PC running SQL Server 7.0 crashed. The .mdf and .ldf files of some databases were backed up to another hard disk. I don't know if they did a sp_detach_db because I'm trying to run sp_attach_db to put the databases in the new SQL Server 7.0, but it doesn't work. Is there any way to recover something having just those files (.mdf and .ldf)?
SQL Server Log Shipping
Baya Pavliashvili
Log shipping? Why are we talking about lumber? Actually, log shipping is a powerful yet simple way to ensure failover capability in the Enterprise edition of SQL Server. Baya Pavliashvili gets you started by discussing the advantages and drawbacks of log shipping, and then shows you how to set up log shipping and how to fail your database over to the standby server
NULL Column Analysis
Leo Peysakhovich
As usually, most of my articles started with a specific task for my company. I am not looking for the article but the articles are finding me. Ones upon a time (starts like all those magic stories) I placed a question to myself – “How many columns in the corporate database are not used at all?”. Not used means the value for the column is NULL for every row and wasn’t ever inserted/updated for all rows in a table. For example, column special_note in a table CLIENT never was used and probably never will be used because database has the table notes where all notes are stored
Yukon: What's Really Important
Brian Connolly
Data warehousing enhancements and analysis improvements round out a complete BI offering
Optimize Oracle-.NET Data Access
Alex Keh
Make the most out of Oracle Data Provider for .NET. Alex Keh is presenting "Optimizing the Oracle Database for .NET Applications" at VSLive! San Francisco on Thursday, March 25. These tips focus on using the Oracle Data Provider for .NET
Incident Response - The Framework
Steve Jones
Disaster Recovery is something that's on my mind lately. With hurricane Charlie rolling through Florida recently (it's August 2004 as I write this), and my partner Andy without power for nearly a week in central Florida, we've had some discussions about how to prepare for a disaster and the value of doing so. I'm not big on getting too detailed in a recovery plan, but I do agree that there are some good reasons for setting up a framework under which to work. This article looks at some ideas for such a framework based on my experiences
Data restriction using CHECK constraints
Barrie Sosinsky
You can use one or more CHECK constraints to limit the data that can be entered into your tables or column. A CHECK evaluates a Boolean equation and determines if the data either matches or doesn't match the condition. While a CHECK constraint doesn't provide the programming logic and functionality of either triggers or stored procedures, it's easy to write and it runs quickly
Performing incremental inserts/updates to reduce lock conditions
Serdar Yegulalp
Inserts and updates are two of the most common operations in SQL Server that cause locking. Updates usually cause row-level locking, while inserts can cause a whole table to be locked, especially if the table has an explicitly-defined primary key. If your database routinely involves mass updates or inserts, it's hard to keep the locks from stopping everything cold—especially if the table in question is used often
SQL Server: Backing up the master, model, and msdb databases
Greg Robidoux and Jeremy Kadlec
What are the best practices for backing up the master, model, and msdb databases?
SQL Server 2000 Useful Undocumented Stored Procedures
Alexander Chigrik
In this article, I want to tell you about some useful undocumented stored procedures shipped with SQL Server 2000
Extracting Maximum Value from Warehoused Data
by Doug Newell
Examine the benefits of predictive intelligence using genetic algorithms. To paraphrase a prominent politician: "A terabyte here, a terabyte there, pretty soon this stuff adds up..." Large and medium-size organizations have invested heavily in data warehousing, customer relationship management (CRM) and enterprise resource planning (ERP) platforms over the last few years. Senior marketing, sales and risk management executives at financial services and telecommunications companies, in particular, are beginning to take a closer look at the effectiveness of their organizations and how they are migrating from gathering and storing data in these systems and converting it into useful intelligence that can drive additional revenue and profit growth. The dirty little secret I have found in many organizations is that the enormous volume of data stored in these systems is often languishing as firms struggle to process, analyze and capture the full value of hidden intelligence within these repositories
NAS, DAS or SAN: Choosing the Right Storage Technology for Your Organization
Duran Alabi
With such a wide variety of information storage technologies available, what is the best way to determine which one is right for your organization? Consider the nature of your data and applications. How critical and processing-intensive are they? What are your minimum acceptable levels of performance and availability? Is your information-sharing environment localized or must data be distributed across the enterprise? IT professionals must make a comprehensive assessment of current requirements while also keeping long-term business goals in mind
Data Migration Strategies, Part 1
Soumendra Mohanty
This two-part article defines a highly coordinated and quantifiable approach as a guideline for data migration projects. Part 1 focuses on the phases of data migration. Business focus and strategies driving business change over a span of time. Inevitably the core business processes captured in numerous information systems applications get retired and replaced with newer, more functional systems
Data Migration Strategies, Part 2
Soumendra Mohanty
Part 2 of this two-part article focuses on data migration approaches. In Part 1, we discussed what could be the phases in a typical data migration project. The same questions will keep on coming back to the project managers again and again
Relational Database Basics
Ro King and Todd Sato
Relational databases are introduced as well as basic database components including tables, records, fields and keys; normalization concepts; and database activities such as reading an entity relationship diagram and joining tables to access data effectively. In the early 1980s companies began to replace flat file databases and hierarchical databases with relational databases. Relational databases were developed to provide easier access to data, allowing users to approach data from a variety of viewpoints. In a hierarchical database, users must define business questions in a distinct order, starting with the root of the database. In a relational database, users can ask business questions from many points of view
Real-Time Data Warehousing 101
Simon Terr
Fundamental topics such as data warehouse basics, real-time definitions and real-time data warehouse building blocks are discussed. I recently assisted in the hiring process of an ETL developer for a client's data warehousing group. Each of the people I've interviewed had strong knowledge in one area or another of data warehousing but none had a strong overall grasp. Therefore, this article will paint the bigger picture so readers will have an overall grasp of data warehousing and in particular real-time data warehousing. I am going to address several fundamental topics that include data warehousing basics, definition of real-time data warehousing, real time versus near real time, real time in online transaction processing (OLTP), the case for real time and real-time data warehousing building blocks
Operational Risk
N. Raja Venkateswar and Raghu Ganapathy
Barings, Daiwa, Natwest, Sumitomo suffered catastrophic losses in the area of operational risk, causing regulators and banks world over to refocus on the topic
Right Time for Real Time?
Eric Kavanagh
The Data Warehouse Institute's study gets real on real-time business intelligence. "It was so real. It was really... it was real; it was realistic." - Otto, in Michael Nesmith's "Repo Man". Is real-time business intelligence really all that real? Is it indeed the right time for real time? A recent report by The Data Warehousing Institute (TDWI), entitled "Building the Real-Time Enterprise," provides ample evidence that yes, real-time BI really is for real. Among the report's findings
A Tutorial on Basic Normalization, Part 1
Tom Johnston
This is a nine-part series that will review the basic normal forms in depth. The last article in the series will provide a management-level summary of all the material presented. Nearly everyone who has heard of relational databases has heard of normalization and knows that a principal objective of relational data modeling is to produce a “fully normalized” data model. The value of a fully normalized model is that it minimizes redundancy in a database, and thereby makes it less likely that inconsistencies can appear in that database. There are thus specific benefits to be gained from an understanding of the process of normalization and of how it applies in the IT environment
A Tutorial on Basic Normalization, Part 2
Tom Johnston
This article will review two ways of representing a data structure, both of which will be used extensively in the remaining articles in this series. In Part 1, I introduced some of the fundamental concepts of data modeling, including primary and foreign keys, and normalization. I also identified five different “paradigms” that contain terminology used to refer to data structures and aligned that terminology to indicate the parallels across those paradigms. This article will review two ways of representing a data structure, both of which will be used extensively in the remaining articles in this series
A Tutorial on Basic Normalization, Part 3
Tom Johnston
Part 3 is a discussion on first normal form. The method of normalization practiced by IT professionals is known as "vertical normalization." It corrects normalization problems by removing columns from a table and putting them into one or more other tables. In doing so, it replaces the original table with two or more other tables which represent a "projection" of the original table. This process vertically "splits" a table, leaving the original table but with fewer columns, and creating one or more additional tables, to which those original columns are moved
A Tutorial on Basic Normalization, Part 4
Tom Johnston
Part 4 considers violations of 1NF based on repeating groups. In Part 3, we defined first normal form (1NF). That definition is based on the notion of an "atomic" attribute, one whose values do not consist of two or more meaningful components. But what we saw was that there is no absolute sense in which an attribute is or is not atomic. For example, if a single attribute consisting of city, state and ZIP code is to be used simply as a line of text to be printed on a mailing label, then that attribute is atomic, relative to that use. But if addresses will be sorted, grouped or counted by city, state or ZIP code, then their combination into one attribute is not atomic, relative to those uses. In that case, their combination into a single attribute is a violation of 1NF
The Fundamentals of Data Warehousing: What is a Data Warehouse?
David R. Fuller
If you are new to data warehousing or an end user who would like to be more involved with the implementation and development of a data warehouse, this column provides definitions to help understand the concept, states reasons for the existence of data war. The data warehouse is an outgrowth of the continuing development of data processing technology from the 1960s through the late 1980s. In the early years of data processing, the focus was on automating the transaction processing requirements of organizations. Often starting with the major accounting functions such as general ledger, accounts payable, fixed assets, etc., applications were built to enable the collection of increasingly large numbers of transactions and the processing of those transactions to produce certain basic financial reports. As ever-increasing computing power and data storage became available for ever-decreasing prices, more and more applications were automated: manufacturing planning, inventory control, distribution, and the list goes on and on. With each new function, organizations found themselves with more and more data
A Tutorial on Basic Normalization, Part 5
Tom Johnston
Part 5 discusses second normal form. Normalization is a process by which certain kinds of redundancies are removed from a relational database. These are redundancies involving attributes which are all contained in the same table. Other redundancies are possible, such as redundancies involving relationships and redundancies among attributes in different tables. Normalization does not deal with these kinds of redundancies
A Tutorial on Basic Normalization, Part 6
Tom Johnston
Part 6 discusses third normal form. Normalization is a process by which redundancies involving attributes in the same table are removed from a relational database. Other redundancies are possible, such as those involving relationships and those among attributes which belong to different tables, and the basic normal forms do not deal with these kinds of redundancies
A Tutorial on Basic Normalization, Part 7
Tom Johnston
Part 7 discusses Boyce-Codd normal form which is a stronger version of 3NF. It identifies redundancies that do appear in real-world databases and that will be overlooked if modelers check only for first, second and third normal form violations. In Part 6, we discussed third normal form. In this installment, we will discuss Boyce-Codd normal form (BCNF). BCNF is a stronger version of 3NF. It identifies redundancies that do appear in real-world databases and that will be overlooked if modelers check only for first, second and third normal form violations
High Availability Data Warehouse Design
Hisham Alam
It is a good idea to understand the architecture and system relationships that exist in your organization before designing a high availability data warehouse environment. In today’s global world, large data warehouses are being accessed around the clock. As a result, the data warehouse system needs to be highly available. Ensuring high availability is complicated by the need to process very large amounts of data. Data must be transformed, loaded, validated and backed up in a very short time frame to provide near around-the-clock access. This requires that traditional approaches to provide high availability be optimized to accommodate the data warehouse environment
The Infrastructural Data Warehouse
Massimo Cenci
One of the community members of the dataWarehouse.com Web site shares his thoughts on data warehouse design. Editor’s note: We would like to publish some of your thoughts in the form of articles. If you as a community member would like to send in a 2,500 word vendor-neutral article on a trend, strategy or solution to a problem, we would love to share it with the community. Send the submissions in Word format to MaryJo@dataWarehouse.com. This article is written by an implementor in the field who is a member of the dataWarehouse.com community. We are always interested in your feedback, please send your comments to me at MaryJo@dataWarehouse.com
A Tutorial on Basic Normalization, Part 8
Tom Johnston
Part 8 looks at two more attempts to put the Product Assignment database into BCNF. In Part 7, we began a discussion of Boyce-Codd normal form (BCNF). We saw that a table could be in 3NF even though it contained redundancies based on functional dependencies (FDs). We also saw how each FD expresses a business rule, and that each instance of a business rule is a single fact. In these terms, basic normalization is a process by which we express business rules in a data model in such a way that no fact can be recorded more than once
The Fundamentals of Data Warehousing: Introducing Data Marts
David R. Fuller
A data mart is a subject-specific collection of organizational data which can be used for analytical purposes relating to specific business questions or functions. A data mart contains only that data which is needed to respond to the specified business qu. In the early years of data warehousing, most projects were oriented toward designing and building the corporate data warehouse in one massive effort. These projects took a long time to reach a point where the product was usable and able to provide value to the company. In the time that was required to build such warehouses, the requirements often changed radically, making the data warehouse even less useful when it was finally released to the business analysts. Many projects were abandoned; and others, though completed, were considered failures by many in the companies which had expended millions of dollars on their construction
A Tutorial on Basic Normalization, Part 9
Tom Johnston
Part 9 is the final segment of this series and summarizes what each normal form is and why normalization is important. In the first eight articles in this series, we reviewed the basics of data normalization, a process by which certain forms of redundancy are removed from a database. This involved putting the tables of a data model into first, second, third and Boyce- Codd normal forms (1NF, 2NF, 3NF and BCNF, respectively). Two other normal forms – 4NF and 5NF – are based on the more generalized notion of a multi-valued dependency and were not discussed in this series
Stored Procedure vs Triggers
G Vijayakumar
Last time, I wrote an article and focussed on Using SELECT, Views and Stored Procedures in SQL Server.= I was quite glad to differentiate the three and its Pros & Cons.= I was not even given much importance of Trigger not because of NO TIME.= To be honest, I was just a beginner in use of Triggers.= In this article I decided to write about Triggers and its difference with Stored Procedure.= We had a team meeting to incorporate the audit information in our organization
FAQ: How Windows XP Service Pack 2 (SP2) Affects SQL Server and MSDE
©2004 Microsoft Corporation
Review this FAQ to find answers to common questions about how Microsoft Windows XP Service Pack 2 (SP2) affects installations of SQL Server 2000 and SQL Server Desktop Engine (MSDE)

[В начало]

ФОРУМ SQL.RU

Самые популярные темы недели

Кто на чем пишет клиентов под SQL Server?
Новые упражнения на http://sql.ipps.ru
Tool Вы знаете что твориться на ваших 10-30+ серверах ?
ПОМОГИТЕ девушке установить SQL!!! PLEASE...
Помогите с DTS советом!
Индексы и Where
Рыба есть! О контроле пересоздания объектов
Настройка MS SQL
не могу выполнить DTS-пакет
шифрование и расшифровывание пароля
расширенная хранимая процедура
Журнал транзакций
При инсерте серевер медленнее чем обычный комп?
Поддержка дополнительной таблицы для деревьев
помогите написать запрос (работа с датами)
Как выбрать из двух минимальных значений одно?
ошибка
Перенос данных между базами
Linked servers performance
Что такое транзакция?

[В начало]

Вопросы остались без ответа

Установка беты Юкона.
почему не работает полнотекстовый поиск, что не так?
и опять Excel as Linked Server
Книга по Sql Server 6.5
Почемув ЕМ не видны SQL Server Logs

[В начало]

#212<<  #213


Вопросы, предложения, коментарии, замечания, критику и т.п. присылайте Виталию Степаненко на адрес: stvitaly@sql.ru

sql.ru Описание рассылки

СЕМИНАРЫ
КОНФЕРЕНЦИИ

МИНИФОРМА
ПОДПИСКИ



ПУБЛИКАЦИИ
АРХИВ


http://subscribe.ru/
http://subscribe.ru/feedback/
Адрес подписки
Отписаться

В избранное