MyISAM vs Innodb – both are commonly used engines on MySQL servers and they both have their unique advantages and disadvantages against each other. MyISAM is the default storage engine type for MySQL 5.0 but the Cloud Sites environment defaults the storage engine to Innodb. MyISAM vs Innodb: MyISAM: Table level locking.Innodb: Row level locking. […]
Search: “data”
We found 1,491 results for your search.
MySQL CREATE TABLE
Using CREATE TABLE statement in MySQL you can create a table into the database. The following example shows the statement in the simple form: CREATE TABLE Format: CREATE TABLE IF NOT EXISTS `tbl` ( tbl_id int(11) NOT NULL AUTO_INCREMENT, tbl_title varchar(100) DEFAULT NULL, post_date DATE DEFAULT NULL, update_date DATE DEFAULT NULL, PRIMARY KEY (tbl_id) ) […]
Intro: MySQL Stored Procedures
A segment of declarative SQL statements which is stored inside the database catalog is called stored procedures, invoked by a triggers. Advantages: When stored procedures are created it is compiled and stored in the database so that when it is called multiple times then the compiled version is used. It is very secure. It is […]
MySQL temporary table
To store a temporary result set you can use a special type of table i.e. called MySQL temporary table. To keep temporary data, the temporary tables could be very useful in some cases. When the current client session terminates, the temporary tables is deleted. This is useful for stored procedures, join query etc. Temporary tables […]
Sometimes we need to add demo text in a website for checking whether it working fine or somewhere we test website with demo text. So on this case unwanted text inserted into database and you need to remove it. So, we can update fields with random sentence in this case. For example the fields value […]
MySQL ALTER TABLE, DROP TABLE
To change the structure of a table you use ALTER TABLE statement. This allows you to add or drop column, change data type, rename table etc. Example of ALTER TABLE: ALTER TABLE table_name CHANGE COLUMN table_id table_id INT(11) NOT NULL AUTO_INCREMENT; To remove existing table you need to use DROP TABLE statement as below: Example […]
MySQL Views
A database view is a virtual table which is defined as a SQL select query with JOIN statement. Same as database table it consists of rows and columns. When any data of a tables changes, the corresponding view reflects that changes as well. Advantages: A database view allows you to simplify complex queries. You do […]
In a table there may be data available i.e. duplicate. Each time you querying and get all the duplicate data. Use DISTINCT to avoid it. Suppose in a coountry table there are two same country name the using DISTINCT you will get the only one name for each country. SELECT DISTINCT country_name FROM table_country;
AngularJS Forms & Validation
Using AngularJS Forms you can collect number of inputs. Form can also validate input data. For any type of invalid input it can throw error for notify user. But note to remember that this is just a client side validation. You need to validate from server side also. Here is a sample code for AngularJS […]
Referential integrity
It is relational database concept in which multiple tables shares consistent relationship based on the data stored on tables. For example, a school X has 2 tables, a student table, and a student fee table. In the student table we have 2 columns – the student ID and the student name. In the student fee […]
