Home / Interview /Top 10 SQL Intervie...
Admin
2024-06-18
0 mins read
DDL stands for Data Definition Language. It is used to define the structure of the table, that holds the data. SQL commands like CREATE, ALTER, DROP and RENAME comes under this.
DML stands for Data Manipulation Language. It is used for the manipulation of the data. SQL commands like SELECT, INSERT and UPDATE comes under this.
DCL stands for Data Control Language. It is used to control the visibility of data like Granting or revoking access on database and setting different privileges to different user roles. SQL commands like GRANT and REVOKE comes under this.
A composite key in SQL can be defined as a combination of several columns that are used to uniquely identify all the involved rows. A combination of more than one column can uniquely identify any record even though a single column cannot uniquely identify any row. In other words, the combination key is a primary key that is produced by combining many columns. Yet, the data types of several columns could be dissimilar from one another.
For e.g. In a table with Employee information, “EmployeeId” and “EmployeeName” is combined to uniquely identify a row and called as a Composite key.
Data is saved in various linked tables to prevent data duplication. To retrieve the data from a related table, Join keyword is used. When there is at least one match in both tables, a join returns rows.
Based on a shared column between the tables, it is used to combine rows from two or more tables.
Right Join: It returns all the rows from the right table, even when there is no match in the left table.
Left Join: It returns all the rows from the left table, even when there is no match in the right table.
Full Join: It returns those rows when there is a match in one of the tables.
A small unit of any given program made up of numerous low-level operations is referred to as a transaction. Every DBMS transaction must uphold ACID, which stands for Atomicity, Consistency, Isolation, and Durability. To guarantee the completeness, accuracy, and integrity of data, ACID must be maintained.
Atomicity: Any given transaction must be regarded as an atomic unit, according to the property of atomicity. It implies that all of its functions must be carried out, or none at all. Make sure the database doesn't contain any states where a transaction has been left unfinished. Either the states before or after the transaction's execution, failure, or abortion must be defined.
Consistency: The consistency property stipulates that following any transaction, the database must always be consistent. A transaction must therefore never have any negative impact on the data and information stored in the database. If the database is consistent before a transaction is done, it must continue to be consistent even after the transaction has been completed.
Isolation: According to the property of isolation, when many transactions are being carried out and performed in a database system concurrently and in parallel, it would appear as if that transaction were the only one present in the system. None of the transactions would have an impact on the existence of any other transactions.
Durability: According to the durability property, each particular database must be strong enough to withstand all of its most recent updates and must continue to function even if the system unexpectedly restarts or fails. If a transaction modifies and commits some data in the database, the database would save the modified data. If a transaction is committed but the system crashes before the data is written to disc, the data will really be updated once the system restarts.
INQUIRY
By tapping continuing, you agree to our Privacy Policy and Terms & Conditions
SkillAhead Solutions
Gurgaon
USA
1603, Capitol Avenue, Suite 413A, 2659, Cheyenne, WY 82001, USA
`Copyright © DevLabs Alliance. All rights Reserved`
|
Refund & Reschedule Policy
Privacy Policy
Terms of Use