header image

Sub-Domain Area

Architecture Pattern Name

Design Patterns

Solution Patterns

Related Patterns

Data Integration/SOA

ETL ( Data Extraction Transformation & Loading)

Change Data Capture

Error handling

EAI

 

Near Real-Time ETL

Job scheduling

Master Data Hub

 

Batch ETL

Data validation

Operational Data Store (ODS)

 

Data Discovery

Slowly Changing Dimensions Load

Datamart

 

 

 

Datawarehouse

FTP

 

 

 

EAI/ESB

Publish/subscribe

One-Way

SOA

 

Request/reply

Synchronous Request/Response

 

 

Message Exchange Patterns

Basic Callback

 

 

 

Claim Check

 

 

 

 

 

 

Data Architecture

Transaction Data Stores (TDS/OLTP)

Custom Applications Databases

 

ETL

Master Data Store

Packaged Application Databases

 

EAI

Operational Data Store

 

 

SOA

Datamart

 

 

 

Datawarehouse

 

 

 

 

 

 

 

 

Business Intelligence and Reporting

Transactional Reporting

Transactional Reporting Data Access

Real-Time Dashboards

ETL

Operational Reporting

Operational Reporting Data Access

In-Memory Analytics

EAI

Analytical Reporting

Analytical Reporting Data Access

Statistical Analysis

TDS

 

Analytical Dashboard Data Access

Predictive Analytics

Operational Data Store

 

Operational Dashboard Data Access

 

Datamart

 

Data Mining

 

 

 

 

 

 

 

Master Data Management

Master Data Hub

Master Data Replication

 

Change Data Capture

 

Master Data Services

 

EAI

 

Master Data Synchronization

 

SOA

 

 

 

 

Data Architecture and Modeling

Dimensional Data Modeling

Modeling Standards

 

 

 

At a glance – List of Architecture Patterns, Design Patterns, and Solution Patterns in the Application and Information Architecture Domains nicely presented in WikiPedia

Source: http://en.wikipedia.org/wiki/Architectural_pattern_%28computer_science%29#Examples

under: Uncategorized

Database Trigger

Posted by: | October 15, 2010 | No Comment |

Trigger is a Program Unit generally a SQL statement or a set of SQL statements which executes automatically when an associated event of an object in a database occurs.

This has basically three components

  • Program unit is the automated predefined action item to be executed
  • Object on which the action item will be associated
  • Event is the condition/situation to be fired of an object

Before going into deep, I would like to mention that, the whole concepts of the trigger implementation are product specific. All the features of the trigger might not be available in a particular product; but it is true that the basic things are available in all the major products. Even when I came to know first time about the trigger, in 1995 then only DML type of triggers were available for manipulating transactional data; now it’s scope has been totally redefined by keeping same concept of trigger having three component mentioned above. Next phase, the concept of DDL triggers came into the picture.

Program Unit

This might be a set of related SQL of an object, any functionality implemented by an executable application.

For example: Different scenarios where possible action unit could be implemented.

For maintaining data integrity by cascading the changes to the related object, it could be maintaining some constrain. In this purpose single SQL or set of SQL could be used as a Program Unit.
For notification purpose by sending messages/alerts using email or other way.
For audit purpose by logging into event log, or some files, or into any table
For populating change history or Summarized data value
The object and event depends on the implementation of trigger. The trigger could be broadly categorized into two – DDL and DML Trigger.

DML trigger mainly used for maintaining transactional data where DDL trigger is used for administrative and auditing purpose. In earlier concept we used to see only DML trigger for INSERT/UPDATE/DELETE operations. The DML trigger could be associated to a Table or a View. Later we got the DDL trigger feature which could be associated to Database, Table, Index etc. Here the operation could be CREATE/ALTER/DROP. Same time there is another factor arises, that is, associated Program Unit will be executed BEFORE or AFTER of the triggering statement execution.

Object

DML trigger – Data Manipulation Language Trigger; generally associated with Table or View when data values are inserted/updated/deleted

DDL trigger: Generally for object creation / alteration or deletion that mean the keywords CREATE, ALTER, and DROP associated with Transact SQL. It’s scope as follows:

  • Database level
  • Server level

Event

The events depend on the object. If it a table it could be for each row or as whole of a SQL statement.

 

DML trigger

Table
Statement: This occurs once for executing a SQL statement not depends on the number of rows affected by that statement. It is available in Oracle.
For each row: When a SQL executes, for every row the action will be fired. Again in granular level it could be BEFORE or AFTER
View: Instead of Trigger – Here only we can see only AFTER type operation is available. It has some other limitation too. When any modification or insertion or deletion has been done using instead of trigger, always it checks individuals object’s constrains.

DDL trigger

DDL triggers fire only after the DDL statements whether it’s scope is server level or database level.
DDL statement – CREATE, ALTER, DROP, TRUNCATE, RENAME, ANALYZE, AUDIT, NOAUDIT, COMMENT, ASSOCIATE STATISTICS, DISASSOCIATE STATISTICS, UPDATE STATISTICS, GRANT, REVOKE, DENY statements that can cause the trigger to fire
Apart from above, there are other events related to Database/Server, user logon, server error causes to fire the trigger

Database Startup, Shutdown , Suspend
Logon, Logoff the session
Server Error

The possible usages of the different types of triggers.

DML trigger

It could be used in the following requirements::

  • For maintaining data integrity by cascading the changes to the related object, it could be maintaining some constrain. In this purpose single SQL or set of SQL could be used as a Program Unit.
  • For maintaining referential integrity  constraint, it is always good to use foreign key between parent and child table. [ Cascade deletion, nullifying foreign key’s data for the deletion of parent row. ]
  • For he case of data integrity, always good to use default constrains / check constraint, rules by using user defined data type.
    For the case of maintaining change history, I will prefer to have the trigger. The OLD/DELETED and NEW/INSERTED value could reference in a easy way using trigger to store change history.
  • For the case of populate summarized data, better to use stored procedure and call it explicitly.
  • For notification purpose by sending messages/alerts using email or other way.
  • Instead of trigger I will suggest to use notification service by developing triggering component. The business logic will be written in these component.

There some points to be keep into mind, where a group of people are responsible/involved to write/maintain the application.

Need to be well documented for each and every triggers; also it’s impacts to the related data, otherwise it will be difficult to know what are the data getting affected as a series of modification. It is always recommended not to use trigger for DML purposed mentioned above.
For the case of nested trigger / recursive trigger, it will very difficult to do the debugging the application. Therefore, I will be recommending to avoid using trigger for data manipulations. 
If we would like to keep change history in very limited and important table, trigger is a good choice.
DDL trigger

For audit purpose by logging into event log, or some files, or into any table DDL trigger. When any objects are creating, modifying, dropping all could be logged which could be auditable.

For auditing purpose logon, database startup/shutdown, server error trigger not a bad good choice. Maintaining these type logging are DBA related job. Generally in an organization there are very very limited number of DBAs are working; where good co-ordination is possible and risk factor is very less.

There are few restriction of trigger. For SELECT statement trigger is not applicable. Trigger fired implicitly not explicitly.

under: Uncategorized

Includes a comprehensive set of technical content including samples, demos, hands-on labs, and presentations for

  • Windows Azure
    Operating system as a service
  • Microsoft SQL Azure
    Fully relational database in the cloud
  • Windows Azure platform AppFabric
    Easy to connect cloud and on-premises applications

The links are…

http://www.microsoft.com/downloads/details.aspx?FamilyID=413E88F8-5966-4A83-B309-53B7B77EDF78&displaylang=en

http://www.microsoft.com/windowsazure/

http://channel9.msdn.com/learn/courses/Azure/

http://www.microsoft.com/events/series/azure.aspx?tab=videos

Follow for the latest update http://twitter.com/azurecloudnet

under: 12606, 12607

ServiceContractAttribute 

  • Name  and Namespace – The name and namespace are the optional attibutes. Default name is same as the contract type and namespace is http://tempuri.org. It is always recommondable to use Namespace to specify proper namespace which remove the conflict of the datatype/contract.
  • CallbackContract – Return contract in a two-way (duplex) conversation.
  • HasProtectionLevel and ProtectionLevel – Specifies whether all messages supporting the contract have a explicit ProtectionLevel value.
    Default ProtectionLevel is ProtectionLevel.None.
  • ConfigurationName – The name of the service element in the configuration file to use.
  • SessionMode – This is to specify whether the contract requires a binding that supports sessions.

OperationContractAttribute

  • Name: The name of an operation is part of a service contract. Default is the method name.
  • Action: The send message dispatches to the method for the operation based on action.
  • ReplyAction: To specify the reply message
  • IsOneWay: Specifies whether the operation is one directional that an does not return a reply message. This is commonly used for notification service.
  • ProtectionLevel
  • IsInitiating: Specifies if the operation is the intial operation in a session. 
  • IsTerminating: Specifies if the session will be terminated after the operation
  • AsyncPattern: To asynchronously using a Begin/End method pair
under: 11143, 9534, 9536

RESTful WCF Service

Posted by: | July 8, 2009 | No Comment |

RESTful WCF Services works by identifing the Resources & Action from Uniform Resource Identifiers (URIs).

A RESTful web service is called by a unique URI to refer a resource and HTTP verb is to define actions to the resource.

HTTP Method – Verb
GET – Fetch
PUT – Update/Insert
DELETE – Delete
POST – Append

webHttpBinding is a new WCF binding in Fx 3.5 to develop RESTful services. This does not use SOAP envelopes HTTP and HTTPS Transports. It supports XML, JSON and Binary (streams).

WebServiceHost is a specialized SerivceHost which automatically configures address, binding, contract.
If no endpoint is defined, WebServiceHost automatically creates a default endpoint. WebServiceHost adds WebHttpBehavior and disables the HTTP Help page and the Web Services Description Language (WSDL) GET functionality.

[WebGet] And [WebInvoke] attribute
Binds a WCF operation to URI space and HTTP method Indicate the HTTP Method for the operation

WebGet – No method is require

WebInvoke – All verbs other than GET (Method parameter takes in the name of the Verb)

Other attributes can mentioed
BodyStyle – Indicates whether the Request/ Response are wrapped or not
RequestFormat – Json or Xml
ResponseFormat – Json or Xml

UriTemplate – Rich binding to URI UriTemplate String that allows define the structure/pattern of the URI

under: 9531, 9532, 9534

The evolution of programming languages have been categorized as 1GL, 2GL, 3GL, 4GL….E.g. Machine Language -> Assembly Language -> C / Fortran -> SQL / Focus 4GL. The evolution of these languages are towards Low level language to High Level language.

In 1995, I stated learning computer languages. First I learned C, just after going through Fundamentals of Computer. In my first Academic project using C, I spent lots of time only for writing thousands lines of code. During this period I have gone through System Analysis and Design – where I learned about how to translate / transform the business application into computer systems [application]. Then I learned C++ and OOP, it was too nice experience, where I could compare the whole thing to real life cases. But it was amazing when I came to know SQL – real 4GL… Writing SQL Statement is  about “WHAT” not “HOW” [With few exceptions – Query Hints etc.]. Using SQL generally few lines code computes the values from a set of collections as the resultset/output. Then I started my career with one of the biggest giant – Petroleum Company in India using Sybase and Power Builder. Here I got opportunity to work with all my favourite technologies.

About the future or coming technologies, termed as NEXT GEN Application, I expressed very early in one of my post published on September 15,  2005 Real Challenge to the architect for architecting and designing for FUTURE application development’s method.

That time I was thinking that DSL, ORM, Modeling language were dream and will be goals for the language developer.

Now Microsoft comes up to this with a fantastic way!!!

In last version – .NET Framework 3.5, we got LINQ, LINQ to SQL, LINQ to XML, LING to Object…. Here we focused more on the Entities, Visual Studio writes the code for data manipulation using SQL/XPath all underlying technologies… we stopped thinking about implementation to map the data source to object classes for .NET to some extents. Here we got LINQ to SQL, LINQ to XML and so on so…

This is not the “Full Stop” (“.”). Along with more advancement, Microsoft came up with “M”. It is “Oslo” Modeling Language which is a declarative language for working with data in more readable way for Structuring the the data as well as for querying too. It’s not about how data is stored or accessed, even not by implementation of specific technology.

M builds on three basic concepts: values, types, and extents.

  • A value is the data which follows the rule
  • A type describes a set of values.
  • An extent provides dynamic storage for values.

M has been designed to map the relational model too. Using “Intellipad” tool of “Oslo”, model the data and the corresponding T-SQL statements generated by the compiler. Here “M”->SQL translates “M” “modules” to SQL “schemas.”

More on..

http://msdn.microsoft.com/en-us/library/dd285271.aspx

http://msdn.microsoft.com/en-us/library/dd159725.aspx

under: 9536, 9539, 9541

ServiceContractAttribute 

  • Name  and Namespace – The name and namespace of the contract in the WSDL <portType> element we can modify by specifying this two attribute. Default name is same as the contract type and http://tempuri.org. It is always recommondable to use Namespace to specify proper namespace which remove the conflict of the datatype/contract.
  • CallbackContract – It is used to mention the return contract in a two-way (duplex) conversation.
  • HasProtectionLevel and ProtectionLevel – Specifies whether all messages supporting the contract have a explicit ProtectionLevel value.
    Default ProtectionLevel is ProtectionLevel.None.
  • ConfigurationName – The name of the service element in the configuration file to use.
  • SessionMode – This is to specify whether the contract requires a binding that supports sessions.

Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.servicecontractattribute.aspx

OperationContractAttribute
Name: The name of an operation is part of a service contract. Default is the method name.
Action
ReplyAction
IsOneWay
ProtectionLevel
IsInitiating
IsTerminating
AsyncPattern: To asynchronously using a Begin/End method pair
Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontractattribute.aspx

DataContractAttribute 
http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractattribute.aspx

DataMemberAttribute 
http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datamemberattribute.aspx

MessageContractAttribute
IsWrapped
ProtectionLevel
WrapperName
WrapperNamespace
Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.messagecontractattribute.aspx

MessageHeaderAttribute
Name
Namespace
ProtectionLevel
Actor
MustUnderstand
Relay
Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.messageheaderattribute.aspx

MessageBodyMemberAttribute
Name
Namespace
ProtectionLevel
Order
Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.messagebodymemberattribute.aspx

FaultContract
Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.faultcontractattribute.aspx

under: 9534, 9536, 9541

WCF Links

Posted by: | January 14, 2009 | No Comment |

http://joeon.net/post/Windows-Communication-Foundation—65-Links-to-make-you-an-expert!.aspx

under: Uncategorized

Oslo – Microsoft Official Site

Posted by: | January 14, 2009 | No Comment |

Microsoft’s forthcoming modeling platform is OSLO. More on http://www.microsoft.com/soa/products/oslo.aspx

“Oslo” realted Downloads are available here http://msdn.microsoft.com/en-us/oslo/cc748654.aspx

“Oslo” SDK download – Download the “Oslo” SDK October 2008 CTP

under: 9539

Download – The Service and Client Application

under: 9534

« Newer Posts - Older Posts »

Categories