Wednesday, April 5, 2017

What is impedance mismatch?

The misalignment of application layer objects to tables and rows is called impedance mismatch. Developers usually want a database which is easy to use. Relational databases save data in tables and rows, but our application hardly ever does.

class A{int x,string[] tags

--------------------------------------------------------------------------------------















In the above example we have an object that contains a field x and tags, which contains a bunch of strings, or tags .If we want to save this data in a database we would need three tables one for main object, another for tags, and another to map tags to main object. This forces the developer to write a mapping layer or use an ORM to translate between object in our memory and what is saved in the database.


Tell about MongoDB?

MongoDB is a document-oriented database, not a relational one. Non relational means it does not store data in tables but in the form of JSON document.  Here in MongoDB row is replaced with document and table is replaced with collection. Collection can be considered as a group of documents.

Document is the basic unit of data for MongoDB, roughly equivalent to a row. It is a data structure composed of field and value pairs. MongoDB documents are similar to JSON objects. The values maybe documents, arrays, and arrays of documents.

Tell about RethinkDb ?

RethinkDb is a NoSQL, distributed document based database. It is free and open sourced, we write queries in ReQL query language. The interface also looks amazing, and we can view our results in a tree , a table, or a JSONView. RethinkDb is fast, its very scalable and easy to administer as it ships with a web based interface that comes online immediately. Using this we can do many things, from creating databases and tables to sharding, or replicating a selected table.

RethinkDb is considered as MongoDb done right. RethinkDb uses all the best features of MongoDb and corrects the things gone wrong. RethinkDb stands between Riak,Cassandra and CouchDb, MongoDb. RethinkDb supports "joins" which is not there in many document based databases.


Monday, April 3, 2017

What is Linq ?

LINQ stands for Language Integrated Query. We can use Linq to query various types of data stores like SQL Server, XML etc. With use of Linq we can work with different data sources using similar coding style and there is no need to learn syntax of the data store. Linq also provides intellisense support and compile time error checking.

Linq was introduced in 2008 with .net framework 3.5. LINQ offers a compact, expressive, and intelligible syntax for manipulating data.

Sunday, April 2, 2017

Explain about SqlConnection object

SqlConnection object is used to establish a connection with the database using database connection string. The database connection string consists of the location of database and type of authentication like windows or SQL server.

Saturday, April 1, 2017

Explain about SqlCommand object

SqlCommand object is used along with Sqlconnection object to send or receive data from database.
The SqlCommand object carries the SQL statement we need to execute on the database.

Call a function in child component from parent component in React

Consider the following parent component class Parent extends React.Component { constructor(props) { super(props);         thi...