List out the Data Context Functions. Where do we use "SubmitChanges()"?
Following are the list of Data Context functions:1. Create Database () / Delete Database ()
2. Database Exist ()
3. Create Query()
4. Log
5. SubmitChanges()
1. Create Database () / Delete Database ():
CREATE DATABASE():We can use following command for creating table:
CREATE DATABASE new_database_name;
DELETE DATABASE:We can use the following command for deleting a table in MySQL.
DROP DATABASE database_name;
2. DATABASE Exist():
- If the table is already exists and we don't know about it, to avoid this error we can use the following command:
CREATE DATABASE IF NOT EXISTS new_database_name;
3. Log:
- It is used to record all the transactions and the database modifications made by each transaction.
- It is a critical component of the database.
- It supports in transactional replication and high availability.
- It helps in disaster recovery solutions.
4. SubmitChanges():
- It is used to submit any update to the actual database.
- It computes the set of modified objects to be inserted, updated or deleted.
- It executes the appropriate commands to implement the changes to the database.