MySQL vs MongoDB: Comparison Between RDBMS and Document Oriented DB

MySQL vs MongoDB (NoSQL) database MongoDB vs MySQL: Comparison Between Relational and Document Oriented Database   Both are used for storing the data and free to use that is both comes under open-sources software. MongoDB might be unfamiliar at least to some of us as it is a relatively new compared to other established databases such as MySQL, PostgreSQL or Oracle.   The main and most important difference between these two are MySQL comes under RDBMS(relational database management system) whereas MongoDB not i.e relations between data in different tables is not possible using MongoDB.   Let's discuss one by one both of these in terms of differences and

How to import an SQL file using command line in MySQL?

Import MySQL database using command line   If you have a very large SQL dump file to import and you know very well that it is not very easy to import using phpMyAdmin, even if you split it in many pieces, it is also be hard using PHP script as it will time out after a particular time.   In this case there is only one acceptable and easy solution is import the file directly from MySQL command line. As command Line will always be the most efficient, though not the most user-friendly way to accomplish a database export and import.   Follow the below easy steps

MySQL Interview Questions & Answers

MySQL interview questions for experienced MySQL query for finding max and second max and nth max salary for a employee table using MySQL Suppose you have a table 'employee' given as below ------------------------------ | EmpId        |    Salary      | | 2                  |    2000        | | 3                  |    5000        | | 5                  |    2000        | | 8                  |    3000        | | 9                  |    4564         | | 12                |    3000        | | 13                |    2000      

CDN: Content Delivery Network Overview

Content Delivery Networks (CDN)   Hi Everybody, I think you all aware about the CDN (Content Delivery Networks).   If not, don't worry I am going to explain you what is CDN and how it works and how to know whether you site need CDN or not.   In Short: A content delivery network (CDN) places files in different locations so that the person using your webpage can receive the nearest copy.   Let's discuss more about CDN? A CDN (content delivery network) is a system of distributed servers (network) located in different parts of the globe that stores files to be used by your website visitors, It deliver

Automatic session timeout/logout using PHP after X Minutes of Inactivity/Idle time

PHP Automatic Session Expire after X Minutes of Inactivity/Idle time  Automatic session timeout/logout using php   Session timeout is a notion and the only way you make you sure that no session ever will survive after X minutes of inactivity. Session timeout or Session expire depends on the server configuration or the relevant directives (session.gc_maxlifetime) in php.ini.   Typically the default is 1440 seconds(24 minutes), but you can alter the default to something else. Below are some Session configurations.   http://php.net/manual/en/session.configuration.php   You can update this easily and without writing custom logic.   If your sessions are implemented with cookies (which they probably are), and if the clients are not malicious,

PHP Traits

One of the problem of PHP as a OOP language is, the fact that you can only have single inheritance. This means your class can only inherit from one other class.   PHP Traits (new feature was added in PHP 5.4) is kind of like a Mixin, allows you to mix Trait classes into an existing class. This means you can reduce code duplication and get the benefits whilst avoiding the problems of multiple inheritance.   As per the PHP Documentation, a Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several

Top