This introductory article will help you understand the basics of Database and SQL and lay foundation to the concepts discussed in the follow up articles on advanced concepts.
DBMS
Database management system is a collection of programs that enables user to store, retrieve, update and delete information from a database.
RDBMS
SQL
Structured Query Language(SQL) is a language designed specifically for communicating with databases. SQL is an ANSI (American National Standards Institute) standard.
Also Read Database Interview Questions for frequently asked questions on SQL.
Advantages of SQL
- SQL is not a proprietary language used by specific database vendors. Almost every major DBMS supports SQL, so learning this one language will enable programmers to interact with any database like ORACLE, SQL Server, MySQL, DB2, Postgresql etc.
- Learning SQL is very easy. We can make SQL statements using a predefined set of English words. Since there aren't many SQL keywords, it is very easy to remember them.
- Very complex and precision oriented database operations can be performed using SQL statements.
Database Definition
A DATABASE is a collection of logically related tables which are stored in a file or set of files. A database is a structured object that consists of data and metadata (Table definitions).
Employee_ID | Employee_Name |
---|---|
1 | John |
2 | Alex |
3 | James |
4 | Roy |
5 | Kay |
Database Field
A database field can be described as a part of a record which is reserved for a specific type of data. Example of a database field are Employee Name, Employee Salary etc.
Fields are defined by:
- Field name (ex. Employee_ID)
- Data type (ex. Int, Long, Double, Varchar, Blob )
- Field size ( ex. Varchar (100) )
We had also provided Advanced SQL Queries Interview Questions and Answers on SQL Server, MySQL and Oracle.
Database Record
A record is the collection of fields where each field contains specific information: i.e. an Employee Name, Salary etc.
Database Table
A database table is a collection of records of a specific type. For example, employee table, salary table etc.