All DBMS like MySQL, Oracle, MS Access, Sybase, Informix, Postgres and SQL Server use SQL as standard database language.
The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP. These commands can be classified into the following groups based on their nature −
Sr.No. | Command & Description |
---|---|
1 | CREATE Creates a new table, a view of a table, or other object in the database. |
2 | ALTER Modifies an existing database object, such as a table. |
3 | DROP Deletes an entire table, a view of a table or other objects in the database. |
Sr.No. | Command & Description |
---|---|
1 | SELECT Retrieves certain records from one or more tables. |
2 | INSERT Creates a record. |
3 | UPDATE Modifies records. |
4 | DELETE Deletes records. |
Sr.No. | Command & Description |
---|---|
1 | GRANT Gives a privilege to user. |
2 | REVOKE Takes back privileges granted from user. |
RDBMS stands for Relational Database Management System.
RDBMS is the basis for SQL, and for all modern database systems such as MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.
The data in RDBMS is stored in database objects called tables. A table is a collection of related data entries and it consists of columns and rows.
Look at the "Customers" table:
See this example:
Every table is broken up into smaller entities called fields. The fields in the Customers table consist of CustomerID, CustomerName, ContactName, Address, City and PostalCode. A field is a column in a table that is designed to maintain specific information about every record in the table.
A record, also called a row, is each individual entry that exists in a table. For example, there are 91 records in the above Customers table. A record is a horizontal entity in a table.
A column is a vertical entity in a table that contains all information associated with a specific field in a table.