Posts

Showing posts with the label mysql tutorial for beginners

How to create foreign key in MySQL?

Image
A foreign key in MySQL is basically a column or group of columns in a table that does the work of linking to a column or group of columns in another table. This key generally places constraints on the data in the related table that usually allows MySQL to maintain referential integrity. The relationship that exists between the customer's table and the Orders table is basically one-to-many. And this is the relationship that has been established by the foreign key in the orders table that has been specified by the customer number column. The customer's table is also known as the parent table or referenced table, and the orders table is generally called as the child table or referencing table. How to create Foreign Key? In order to create this, the user has to use the basic syntax of defining a foreign key constraint in the CREATE TABLE or ALTER TABLE statement that is as depicted below: [CONSTRAINT constraint_name] FOREIGN KEY [foreig...

MySQL Tutorial

Image
MySQL Tutorial for Beginners MySQL tutorial MySQL was developed by MySQL AB, a Swedish company formed in 1995. In 2008, MySQL AB announced that Sun Microsystems had agreed to purchase it for around $1 billion. MySQL is RDMS(Relational Database Management System).  It's a free open source SQL database management system and storing information for your website and directly use PHP to access that material and it's very easy for beginners to learn MySQL for MySql Tutorial for Beginners. It is fast, reliable and user-friendly. MySQL is a cross-platform that operates on a computer. There are different Types Of Keys that are used in Database Candidate Key - The candidate keys in a table are specified as the minimum set of keys, and can identify any data row in the table uniquely. Primary Key - It is chosen from one of the candidate keys and becomes a table's identifying key. Super Key - It is the main key Superset. It includes a set of attributes...