A List of the Major Database Objects in the Simple Calendar Database
10/20/2010 14:24:20 | |||
Tables Count = 3; Total Column Count = 23; Views Count = 0 | |||
UDF Count = 0; Constraint Count = 11; Stored Procedure Count = 0 |
Tables |
Views |
Functions (UDFs) |
Constraints |
Stored Procedures |
Schema.TableName | Count of Records | Table Description | |
1. | dbo.Calendar | 8192 Records | A calendar listing contiguous dates and properties of the days. |
2. | dbo.DayOfWeek | 7 Records | The names of days of the week in numeric order. |
3. | dbo.MonthOfYear | 12 Records | The names of Months of the Year in numeric order. |
1. dbo.Calendar, 16 Columns, 8192 Records Back to Top
Column Name | Data Type | Is Primary | Identity or Default | Is Nullable | Column Description |
CalendarDate | date | Primary Key | The actual date. | ||
DayID | int | Identity(1,1) | The number of days since the begining of the calendar. | ||
DayOfYearID | smallint | Number of the day in the current year. | |||
WeekOfYearID | smallint | Nullable | Number of the week in the current year. | ||
MonthOfYearID | smallint | Number of the month in the current year. | |||
QuarterOfYearID | smallint | Number of the quarter in the current year. | |||
Year | int | The year part of the date. | |||
DayOfWeekID | smallint | Order of day in week. Sunday = 1. | |||
DayOfMonthID | smallint | The day of month part of the date. | |||
WeekOfMonthID | smallint | Number of the week in the current month. | |||
isBusinessDay | bit | ((0)) | True (1) if this is a Business Date. | ||
isHoliday | bit | ((0)) | True (1) if this is a Holiday Date. | ||
IsLegalHoliday | bit | ((0)) | True (1) if this is a US National Holiday. | ||
HolidayName | nvarchar(200) | Nullable | The name of the holiday. | ||
HolidayNote | nvarchar(500) | Nullable | A brief description of the holiday. | ||
CreatedDate | datetime | (getdate()) | Date and time the entry was created. |
2. dbo.DayOfWeek, 3 Columns, 7 Records Back to Top
Column Name | Data Type | Is Primary | Identity or Default | Is Nullable | Column Description |
DayOfWeekID | smallint | Primary Key | A unique identifier for this day of the week. | ||
DayOfWeekName | nvarchar(50) | The common name of this day of the week. | |||
CreatedDate | datetime | (getdate()) | Date and time the entry was created. |
3. dbo.MonthOfYear, 3 Columns, 12 Records Back to Top
Column Name | Data Type | Is Primary | Identity or Default | Is Nullable | Column Description |
MonthOfYearID | smallint | Primary Key | A unique identifier for this Month of the Year. | ||
MonthOfYearName | nvarchar(50) | The common name of this Month of the Year. | |||
CreatedDate | datetime | (getdate()) | Date and time the entry was created. |
Tables |
Views |
Functions (UDFs) |
Constraints |
Stored Procedures |
Schema.ViewName | View Description | ||
Tables |
Views |
Functions (UDFs) |
Constraints |
Stored Procedures |
User Defined Functions Back to Top | |||
Object Name | Object Type | Description |
Constraints and Triggers Back to Top | |||
Object Name | Object Type | Description | |
1 | DF_Calendar_BusinessDate | DEFAULT_CONSTRAINT | |
2 | DF_Calendar_CreatedDate | DEFAULT_CONSTRAINT | |
3 | DF_Calendar_HolidayDate | DEFAULT_CONSTRAINT | |
4 | DF_Calendar_IsLegalHoliday | DEFAULT_CONSTRAINT | |
5 | DF_DayOfWeek_CreatedDate | DEFAULT_CONSTRAINT | |
6 | DF_MonthOfYear_CreatedDate | DEFAULT_CONSTRAINT | |
7 | Calendar_DayOfWeek_FK1 | FOREIGN_KEY_CONSTRAINT | |
8 | Calendar_MonthOfYear_FK1 | FOREIGN_KEY_CONSTRAINT | |
9 | PK_Calendar_1 | PRIMARY_KEY_CONSTRAINT | |
10 | PK_DayOfWeek | PRIMARY_KEY_CONSTRAINT | |
11 | PK_MonthOfYear | PRIMARY_KEY_CONSTRAINT |
Tables |
Views |
Functions (UDFs) |
Constraints |
Stored Procedures |
Stored Procedures Back to Top | |||
Object Name | Object Type | Description |