loading..
Русский    English
13:00

Recycled firm

The firm has a few outlets that receive items for recycling. Each of the outlets receives funds to be paid to deliverers.

Схема данных

Information on received funds is registered in a table:

  1. Income_o (point, date, inc)

The primary key is {point, date}, thus receiption of money (inc) takes place not more than once a day (date column does not include time component of the date). Information on payments to deliverers is registered in the table:

  1. Outcome_o (point, date, out)

In this table the primary key {point, date} also ensures bookkeeping of the funds distribution at each point not more than once a day.

In case incomes and expenses may occur more than once a day, another database schema is used. Corresponding tables include code column as primary key:

  1. Income (code, point, date, inc)
  2. Outcome (code, point, date, out)

In this schema date column does not also include the day time.

Read in more detail...

Bookmark and Share
Tags
aggregate functions Airport ALL AND AS keyword ASCII AVG Battles Bezhaev Bismarck C.J.Date calculated columns Cartesian product CASE cast CHAR CHARINDEX Chebykin check constraint classes COALESCE common table expressions comparison predicates Computer firm CONVERT correlated subqueries COUNT CROSS APPLY CTE data type conversion data types database schema date/time functions DATEADD DATEDIFF DATENAME DATEPART DATETIME DDL DEFAULT DEFAULT VALUES DELETE DISTINCT DML duplicates EXCEPT exercise (-2) exercise 19 exercise 23 exercise 32 More tags
The book was updated
month ago
©SQL-EX,2008 [Evolution] [Feedback] [About] [Links] [Team]
All right reserved.
Rambler's Top100