Русский    English


Database schema consists of 3 tables:

  1. utQ (Q_ID, Q_NAME)
  2. utV (V_ID, V_NAME, V_COLOR)
  3. utB (B_Q_ID, B_V_ID, B_VOL, B_DATETIME)

Схема данных Окраска

The utQ table includes square identifier, square name. Note that non-painted square is black.

The table utV includes balloon (the can) identifier, balloon name, and paint color.

The table utB shows information on painting square with paint balloon and includes the square identifier, the balloon identifier, the paint quantity, and time of painting.

It should be noted that

  • balloon may be of one from three colors: red (V_COLOR='R'), green (V_COLOR='G'), or blue (V_COLOR='B');
  • any balloon is originally full with volume of 255;
  • square color is defined in accordance with RGB rule, i.e. R=0, G=0, B=0 is black, whereas R=255, G=255, B=255 is white;
  • any record in the table utB decreases paint quantity in the balloon by B_VOL and increase paint quantity in the square by the same value;
  • B_VOL must be more than 0 and less or equal 255;
  • paint quantity of the same color in one square may not be over 255;
  • paint quantity in a balloon may not be less than 0.
Bookmark and Share
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 CONSTRAINT CONVERT correlated subqueries COUNT CROSS APPLY CTE data type conversion data types database schema DATEADD DATEDIFF DATENAME DATEPART DATETIME date_time functions DDL DEFAULT DEFAULT VALUES DELETE DISTINCT DML duplicates edge equi-join EXCEPT exercise (-2) More tags
The book was updated
several days ago
©SQL-EX,2008 [Evolution] [Feedback] [About] [Links] [Team]
All right reserved.