Skip to main content

Posts

Showing posts with the label difference between mongodb vs sql server

What is a trigger in SQL Server? Why use triggers?

What is a trigger in SQL?  Why use triggers? A trigger is a special kind of operations that execute automatically when an event occurs in the database (tables and views) when you trying to INSERT , UPDATE OR DELETE operations in the tables and views. All the triggers are directly attached with the tables and views. Each of the tables has their own trigger. Noted Points :- 1.       We can’t create triggers against the system tables and views. 2.       The AFTER triggers can’t be defined on the views. 3.       You try to avoid using nested triggers. 4.       You try to avoid using recursive triggers. What types of trigger in SQL Server ? There are two types of Triggers available in the SQL that is DML Triggers : - i) After Trigger      ii) Instead of Trigger DDL Triggers There are three query actions that are used in S...

Angular 2 async pipe with ngFor loop

According to Angular 2 docs , “ Angular pipes, a way to write display-value transformations that we can declare in our HTML! ” Angular 2 templates use a special Async pipe to be able to render out Observables. Syntax:   *ngFor= "#obj of asyncObject | async | custom-Pipe: 'prop1' : 'prop2'" OR *ngFor= "#obj of (asyncObject | async)? .prop1? .prop2" For more detail, https://angular.io/docs/ts/latest/guide/pipes.html https://egghead.io/lessons/angular-2-rendering-an-observable-with-the-async-pipe

MongoDB vs. SQL Server

The MongoDB  store the data in documents with JSON format but SQL store the data in Table format. The MongoDB provides high performance, high availability, easy scalability etc.  rather than SQL Server. MongoDB mentioned to document-based NoSQL databases but SQL Server mentioned to relational database. MongoDB is a NoSQL  database so there's nothing like a stored procedure. You can create a set of common functionality in a class library. The "fire-and-forget"  is a default option to check query operations but we can use to " getLastError " method to check query operations succeeded or not. In the MongoDB, we can change the structure simply by adding, removing column from the existing documents. For SQL Server to MongoDB mapping chart, go to live link https://docs.mongodb.org/manual/reference/sql-comparison/     For more detail, go to below link. http://stackoverflow.com/questions/13190468/pros-and-cons-of-using-mongodb-inste...