How to Insert Data in Magento

Inserting records in database is very common operation of any website. Magento has in-built class to automatically connect to its database and provide two separate resources which you can use to read and access data. core_read and core_write is two resource which is used to read and write data into magento database.
Checkout other tutorial of Magento CRUD Features,

As like name , core_read is for reading from the database while core_write is for writing to the database. Its ensure you are using correct resource if You want read the record then you will need Read, write resource you will use for write data into database.

How to connect the Read /Write resource :

When you are saving the order it will take a lot of time because its process taking a lot of time of operation for update all relation Table.

First we create the model instance, where we want the update the data and defined the array which takes all the attribute and its value.

Defined data array:

How to select the data from database:

Magento has EAV feature, which is make the unique to other E-commerce CMS. Its using simple two step query to get all the data of a particular module or table.

How to get particular field or attribute from collection: