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.

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.

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.

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.

Explain connected and disconnected architecture in ADO.NET

The ADO.net architecture, in which connection must be kept open till the end to retrieve and access data from database is called as connected architecture. Connected architecture is built on the these types – connectioncommanddata reader
The ADO.net architecture, in which connection will be kept open only till the data retrieved from database, and later can be accessed even when connection to database is closed is called as disconnected architecture. Disconnected architecture of ADO.net is built on these types – connectiondata adaptercommand builder and dataset and data view.

Tell about abstract class

Abstract classes are defined as classes using the modifier “abstract”. When we want a class to be base class and we don’t want to instantiate we use abstract classes. Many a times abstract classes are either partially implemented or not at all implemented.

An abstract class can contain either abstract methods or non abstract methods. Abstract members do not have any implementation in the abstract class, but the same has to be provided in its derived class.

An abstract class cannot be sealed class. We can have abstract methods only in abstract classes. We should use same access modifier for an abstract method in both base class and derived class to avoid compilation errors.

An abstract method cannot have virtual as it is implicitly virtual.