Structured Query Language, popularly known as SQL is a domain specific language used to manage data in relational database management systems (RDBMS).
- It allows the user to perform operations such as create, delete etc. on tables in database
- It also allows operations such as read, insert, update, delete etc. on the data stored in the tables.
- All popular relational database management softwares such as MySQL, PostgreSQL, Oracle, Microsoft Access, IDBM Db2, SQLite etc. use SQL to manage the database.
- SQL is a simple english like language which is used to query the database to perform various operations on the database.
Rules for a Better SQL Schema
- Only use lowercase letters, numbers and underscores for database, schema, column and table name.
- Use simple & meaningful, table and column name. This is because sometimes, we refer the attribute of a table from another table as foreign key.
- SQL is not a case sensitive language, however the keywords used in the SQL query are generally written in uppercase.
- Using SQL queries you can perform various operations on the database.
- When a SQL statement executes, system first performs various checks such as syntax check, semantic check, shared pool check on the SQL query during parsing phase.
- In the second phase, which is also known as hard parsing phase, system performs query optimization and generate various execution plans.
- In the next phase, row source generator software receives the optimal execution plan and generate a iterative plan that is used by the database.
- Last step is execution of the query based on the iterative plan generated in the previous step.
Leave a Reply