Demystifying SQL: A Beginner's Guide to SQL Basics - Part 1

Demystifying SQL: A Beginner's Guide to SQL Basics - Part 1

?SQL is a standard language for accessing and manipulating databases.?

  • SQL – Structured Query Language
  • SQL lets you access and manipulate databases.
  • SQL is an ANSI (American National Standards Institute) standard.

Why is SQL used for??

  • SQL can execute queries against a database
  • SQL can retrieve data from a database
  • SQL can insert records in a database
  • SQL can update records in a database
  • SQL can delete records from a database
  • SQL can create new databases
  • SQL can create new tables in database
  • SQL can create stored procedures in a database

?What is DBMS?

A database management system (DBMS) is a software used to store and manage data. It guarantees the quality, durability, and confidentiality of information.

The most popular type of DBMS is Relational Database Management Systems, or RDBMSs. Here, the database consists of a structured set of tables and each row of a table is a record.

?What is SQL??

Structured Query Language (SQL) is the standard language for data manipulation in a DBMS. In in simple words its used to talk to the data in a DBMS. Following are types of SQL Statements:?

1.?? Data Definition Language (DDL) allows you to create objects like Schemas, Tables in the database.

2.?? Data Control Language (DCL) allows you to manipulate and manage access rights on database objects.?

3.?? Data Manipulation Language (DML) is used for searching, inserting, updating, and deleting data, which will be partially covered in this SQL tutorial.

What is a Query??

A Query is a set of instruction given to the database management system.

It tells any database what information you would like to get from the database.

?For example, to fetch the student's name from the database table STUDENT, you can write the SQL Query like this:

What is Data?

In simple words, data can be facts related to any object in consideration.

For example, your name, age, height, weight, etc. are some data related to you.?

A picture, image, file, pdf, etc. can also be considered data.

What is Database?

A database is a structured collection of data organized and stored in a way that allows for efficient data retrieval, manipulation, and management. It is designed to store, manage, and retrieve vast amounts of information in a structured and organized manner.?

Databases are essential components in various applications, software systems, and websites, as they provide a centralized and reliable way to store and access data.

What is a Schema?

A SQL schema is essentially a collection of database objects that belong together and share a common namespace.?

It acts as a blueprint for the structure of the database and defines the relationship between different objects.?

Different database management systems (DBMS) may have slight variations in how they handle schemas, but the concept remains consistent.

What is a Primary Key?

A primary is a single column value used to identify a database record uniquely. It has following attributes

? A primary key cannot be NULL

? A primary key value must be unique

? The primary key values should rarely be changed

? The primary key must be given a value when a new record is inserted.

What is Foreign Key?

Foreign Key references the primary key of another Table!

It helps connect your Tables.

? A foreign key can have a different name from its primary key

? It ensures rows in one table have corresponding rows in another

? Unlike the Primary key, they do not have to be unique. Most often they aren’t.

? Foreign keys can be null even though primary keys can not

Example:


?

?



要查看或添加评论,请登录

Swati Chetan Bhole的更多文章

社区洞察

其他会员也浏览了