| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > СУБД, общие вопросы > SQL , создание базы данных |
| Автор: Berliner 27.3.2006, 15:50 | ||||
| Вот подкинули задание есть база маленькая собирает погоду для регионов(стран). Вот хранимые процедуры которые надо реализовать. sp_fetch_within_day(процедура которую нужно сделать) data_within_day(таблица с данными) -Returns data for a specified data item (temperature, sunlight etc), falling between the start date/time and end/time and at the specified resolution. sp_fetch_daily_summary (процедура нужно сделать) data_daily_summary(таблица с данными) Returns data for a specified data item (temperature, sunlight etc), falling between the start date/time and end/time and at the specified resolution. sp_create_daily_summary(процедура которую нужно сделать) data_within_day(таблица в данными) Reads a list of the available regions from table regions, and then processes each of the tables containing data collected during the day, calculates summaries, and stores the summarised data in the respective data_daily_summary_* table. Одна из сложностей в том, для каждого региона (страны)данные храняться в ствоей талице дело в том что для каждой старны есть своя таблица data_within_day_usa(для USA) или data_withing_day-russia data_daily_summary_USA data_daily_summary_russia (любые другие страны) есть таблица regions_def где храняться все дрегионы и вот что написано в таске The stored procedure sp_create_daily_summary will read the list of regions available in the database, (from table regions_def) and then process all of the data collected during the day, for each of these regions. эт тпипа такие запрсы будут Fetch all data available on atmospheric pressure recorded during the day in the region of Russia, starting from 10-Sep-1984 to 25-Sept-2000, and return the data aggregated in 15-day intervals. This query is of the generic form: Select all data on <data item type> that is available as daily summary data for region <region> during [start date] and [end date] and aggregate the data using a resolution period of <N> days я написал такую процедуру
а мне прислали такой шаблон:
|
| Автор: Berliner 27.3.2006, 16:24 | ||||
подскажи плиз что нужно писать почему такая разница в моей схеме и этой sp которую другой человек написал, чтобы я от нее отталкивался
заказчик
|
| Автор: Berliner 27.3.2006, 17:02 |
| может кто нибудь знает? |