Learn SQL Queries Part1
SQL Queries using MySQL Database Part-1
Understanding an RDBMS Relational Database Management System(RDBMs), stores all information/data in the form of Tables.
Understanding a Relational Database
A single database can contain many tables, and they can be linked together.
When the tables are linked together, it's said to be a relational database.
Understanding Tables, Records and Fields in RDBMS
Table: Collection of rows and columns
Row: Collection of inter related columns.
Field: A piece of information of particular entity.
Table structure/design:
example:
Id Number
First_Name Text
Last_Name Text
Address Text
Understanding Primary and Foreign Keys
Primary key:Identifies each record in table with unique id.
example:
- account_no
- roll_no
- customer_no
- emp_no..etc
Foriegnkey:
A foreign key is a field (or fields) that points to the primary key of another table.
A foreign key is a column, or combination of columns, that contain values that are found in the primary key of some table.
Understanding SQL and SQL Queries
SQL(Structured Query Language):
Used to interact with the Databases. There are plenty of SQL Queries that are used to query the data. Basically they are categorised into 3 groups.
- DDL
- DML
- DCL
- Create
- Alter
- Drop
- Select
- Insert
- Update
- Delete
3. DCL(Data Control Language):These command are used for secuing data.
- Grant
- Revoke
In the next blog we will discuss in detail on the above stated commands. Please follow the Link given below
Comments
Post a Comment