Posts

Showing posts from November, 2020

What are the main differences between INNODB and MYISAM?

Here are a few of the major differences between InnoDB and MyISAM: InnoDB has row-level locking. MyISAM only has full table-level locking. InnoDB has what is called referential integrity which involves supporting foreign keys (RDBMS) and relationship constraints, MyISAM does not (DMBS). InnoDB supports transactions, which means you can commit and roll back. MyISAM does not. InnoDB is more reliable as it uses transactional logs for auto recovery. MyISAM does not.

Why we use innodb as Engine in MySQL?

InnoDB is a storage engine in MySQL. InnoDB's greatest strengths are: Its design follows the ACID model, with transactions featuring commit, rollback, and crash recovery capabilities to protect user data. Row-level locking (without escalation to coarser granularity locks) and Oracle-style consistent reads increase multi-user concurrency and performance. Foreign key constraints. Allowing you to let the database ensure the integrity of the state of the database, and the relationships between tables. InnoDB tables arrange your data on disk to optimize common queries based on primary keys. Each InnoDB table has a primary key index called the clustered index that organizes the data to minimize I/O for primary key lookups. You can freely mix InnoDB tables with tables from other MySQL storage engines, even within the same statement. For example, you can use a join operation to combine data from InnoDB and MEMORY tables in a single query. InnoDB Limitations : No full-text indexing (Below-

How does request life cycle work in Laravel?

The entry point for all requests to a Laravel application is the public/index.php file. All requests are directed to this file by your web server (Apache / Nginx) configuration. The index.php file doesn't contain much code it's just starting point for loading the rest of the framework. The index.php file loads the Composer generated autoloader definition and then retrieves an instance of the Laravel application from bootstrap/app.php script. The first action taken by Laravel itself is to create an instance of the application/service container. HTTP / Console Kernels Next, the incoming request is sent to either the HTTP kernel or the console kernel, depending on the type of request that is entering the application. These two kernels serve as the central location that all requests flow through. For now, let's just focus on the HTTP kernel, which is located in the app/Http/Kernel.php. The HTTP kernel extends the Illuminate\Foundation\Http\ Kernel class, which defines an array

What is normalization in DBMS?

 Normalization is the technique of organizing the data into multiple tables to minimize data redundancy. Data redundancy means the reputation of data at multiple places. Different issues can be observed while insertion, Updation, Deletion. Unnecessary data reputation will increase the size of the database and leads to more issues. Normalization will break the table into two different tables.

How can we optimize database query?

MySQL is one of the most popular open-source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). Useful tips to improve MySQL Query for speed and performance. 1. Optimize Your Database You need to know how to design schemas to support efficient queries. Well-designed queries and schema are crucial for your application to work properly. Optimizing your MySQL queries alone will not bring excellent database performance. A well-structured database is crucial along with an optimized query. The following steps will help you to optimize your database. a. Normalize Tables b. Use Optimal Data Types c. Avoid Null Values d. Avoid Too Many Columns 2. Optimize Joins 3. Index All Columns Used in ‘where’, ‘order by’, and ‘group by’ Clauses 4. Use Full-Text Searches - MySQL full-text search (FTS) is far faster than queries using wildcard characters. To add a full-text search index to the students’ sample table, we can use the below MySQL command: mysql>Alter tab