Structured Query Language (SQL) => Beginner's Tutorial
BEGINNERS'S TUTORIAL : Structured Query Language (SQL)
Hello buddies, I am here with a dedicated thread that will focus upon SQL for beginners. I am going to provide more of an information about the concepts of Structured Query Language and will pay less attention on the history and stuff. Just a brief prologue is of it is as follows:
Prologue
Structured Query Language was developed for managing the data in Relational Database management System. It helps one to create and operate on relational database systems. Now lets have a brief outlook of what a database management system and relational database management systems actually are.
A database is a basic record keeping system. In other words, database is a central trpository of data.
DBMS: Database management System is helpful in storing data. It stores the data in plain form. For example: a flat file
RDBMS: Relational database management system on the other hand also stores data but in the form of relations. Relation, here specifies a tabular format. So RDBMS stores data in the form of tables (rows and columns).
Each and every transaction of databases must satisfy ACID properties:
Atomicity: Atomicity specifies that each and every transaction in SQl must be atomic. Atomic means all-or-none i.e. each and every transaction in sql must be either complete or it should be back in a state that it never started at all.
For example: While working on a database, if you are working on inserting data in some tables, and suddenly power goes off, then the original state of the table must be retained. Incomplete insertion must be rolled back. All the unfinished operations must be rolled back in case of any failure
Consistency: Consistency specifies that a database must always be in a consistent state. Its not feasible that you have data in shipments table without having a corresponding record in orders table. This will make database inconsistent. So all the transactions must be complete and consistent.
Isolation: Isolation specifies that one executing transaction is isolated from another transaction i.e. if one transaction is modifying some data on a table and at the same time another transaction is modifying the data or querying the data then it will see the data in a state in which it was before the modification began. this means one transaction is isolated from another transaction unless it is complete.
Durability: Durability specifies that in case there is any modification on a table as a result of a transaction, a backup of the old state is kept in the database and a row is inserted in transaction log so that in case if some failures occur, the original state of the database can be recovered from the backup. This makes the data durable.
So guys this is it for the prologue. A brief idea of what a database is and how transactions are carried out.
In the next tutorial we will have a closer look on what is called normalizing a database. See you all in the next tutorial.
Please don't comment in this thread. You can comment your views and concerns here: #-Link-Snipped-#
#-Link-Snipped-#
Please moderate if any comments come on this thread
Thanks,
Nick
Hello buddies, I am here with a dedicated thread that will focus upon SQL for beginners. I am going to provide more of an information about the concepts of Structured Query Language and will pay less attention on the history and stuff. Just a brief prologue is of it is as follows:
Prologue
Structured Query Language was developed for managing the data in Relational Database management System. It helps one to create and operate on relational database systems. Now lets have a brief outlook of what a database management system and relational database management systems actually are.
A database is a basic record keeping system. In other words, database is a central trpository of data.
DBMS: Database management System is helpful in storing data. It stores the data in plain form. For example: a flat file
RDBMS: Relational database management system on the other hand also stores data but in the form of relations. Relation, here specifies a tabular format. So RDBMS stores data in the form of tables (rows and columns).
Each and every transaction of databases must satisfy ACID properties:
Atomicity: Atomicity specifies that each and every transaction in SQl must be atomic. Atomic means all-or-none i.e. each and every transaction in sql must be either complete or it should be back in a state that it never started at all.
For example: While working on a database, if you are working on inserting data in some tables, and suddenly power goes off, then the original state of the table must be retained. Incomplete insertion must be rolled back. All the unfinished operations must be rolled back in case of any failure
Consistency: Consistency specifies that a database must always be in a consistent state. Its not feasible that you have data in shipments table without having a corresponding record in orders table. This will make database inconsistent. So all the transactions must be complete and consistent.
Isolation: Isolation specifies that one executing transaction is isolated from another transaction i.e. if one transaction is modifying some data on a table and at the same time another transaction is modifying the data or querying the data then it will see the data in a state in which it was before the modification began. this means one transaction is isolated from another transaction unless it is complete.
Durability: Durability specifies that in case there is any modification on a table as a result of a transaction, a backup of the old state is kept in the database and a row is inserted in transaction log so that in case if some failures occur, the original state of the database can be recovered from the backup. This makes the data durable.
So guys this is it for the prologue. A brief idea of what a database is and how transactions are carried out.
In the next tutorial we will have a closer look on what is called normalizing a database. See you all in the next tutorial.
Please don't comment in this thread. You can comment your views and concerns here: #-Link-Snipped-#
#-Link-Snipped-#
Please moderate if any comments come on this thread
Thanks,
Nick
0