InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What Is Sql Sandbox In Sql Server? |
|
Answer» SQL Sandbox is the safe place in SQL Server Environment where untrusted scripts are executed. There are 3 types of SQL sandbox, such as Safe Access Sandbox: Here a USER can perform SQL operations such as creating stored procedures, TRIGGERS ETC. but cannot have access to the memory and cannot create files. External Access Sandbox: User can have access to files without having a right to manipulate the memory allocation. Unsafe Access Sandbox: This contains untrusted CODES where a user can have access to memory. SQL Sandbox is the safe place in SQL Server Environment where untrusted scripts are executed. There are 3 types of SQL sandbox, such as Safe Access Sandbox: Here a user can perform SQL operations such as creating stored procedures, triggers etc. but cannot have access to the memory and cannot create files. External Access Sandbox: User can have access to files without having a right to manipulate the memory allocation. Unsafe Access Sandbox: This contains untrusted codes where a user can have access to memory. |
|
| 2. |
What Is The Difference Between Sql And Mysql? |
|
Answer» SQL is a structured query LANGUAGE that is used for manipulating and accessing the relational DATABASE, on the other hand, MySQL itself is a relational database that USES SQL as the standard database language. SQL is a structured query language that is used for manipulating and accessing the relational database, on the other hand, MySQL itself is a relational database that uses SQL as the standard database language. |
|
| 3. |
What Is Database White Box Testing And Black Box Testing? |
|
Answer» Database White Box Testing involves:
Database Black Box Testing involves:
Database White Box Testing involves: Database Black Box Testing involves: |
|
| 4. |
What Is Relationship? How Many Types Of Relationship Are There? |
|
Answer» The relationship can be DEFINED as the connection between more than ONE tables in the database. There are 4 types of RELATIONSHIPS:
The relationship can be defined as the connection between more than one tables in the database. There are 4 types of relationships: |
|
| 5. |
What Is The Difference Between Clustered And Non-clustered Indexes? |
Answer»
|
|
| 6. |
How Many Types Of Privileges Are Available In Sql? |
|
Answer» There are two types of privileges used in SQL, such as System Privilege: System privileges DEAL with an OBJECT of a particular type and specifies the right to perform one or more actions on it which INCLUDE Admin allows a user to perform ADMINISTRATIVE tasks, ALTER ANY INDEX, ALTER ANY CACHE GROUP CREATE/ALTER/DELETE TABLE, CREATE/ALTER/DELETE VIEW etc. Object Privilege: This allows to perform actions on an object or object of another user(s) viz. table, view, indexes etc. Some of the object privileges are EXECUTE, INSERT, UPDATE, DELETE, SELECT, FLUSH, LOAD, INDEX, REFERENCES etc. There are two types of privileges used in SQL, such as System Privilege: System privileges deal with an object of a particular type and specifies the right to perform one or more actions on it which include Admin allows a user to perform administrative tasks, ALTER ANY INDEX, ALTER ANY CACHE GROUP CREATE/ALTER/DELETE TABLE, CREATE/ALTER/DELETE VIEW etc. Object Privilege: This allows to perform actions on an object or object of another user(s) viz. table, view, indexes etc. Some of the object privileges are EXECUTE, INSERT, UPDATE, DELETE, SELECT, FLUSH, LOAD, INDEX, REFERENCES etc. |
|
| 7. |
Explain The Working Of Sql Privileges? |
|
Answer» SQL GRANT and REVOKE commands are used to implement privileges in SQL multiple user environments. The administrator of the DATABASE can grant or revoke privileges to or from USERS of database OBJECT like SELECT, INSERT, UPDATE, DELETE, ALL etc. GRANT Command: This command is used provide database access to user apart from an administrator. Syntax: GRANT privilege_name ON object_name TO {user_name|PUBLIC|role_name} [WITH GRANT OPTION]; In above syntax WITH GRANT OPTIONS indicates that the user can grant the access to another user too. REVOKE Command: This command is used provide database deny or remove access to database objects. Syntax: REVOKE privilege_name ON object_name FROM {user_name|PUBLIC|role_name}; SQL GRANT and REVOKE commands are used to implement privileges in SQL multiple user environments. The administrator of the database can grant or revoke privileges to or from users of database object like SELECT, INSERT, UPDATE, DELETE, ALL etc. GRANT Command: This command is used provide database access to user apart from an administrator. Syntax: GRANT privilege_name ON object_name TO {user_name|PUBLIC|role_name} [WITH GRANT OPTION]; In above syntax WITH GRANT OPTIONS indicates that the user can grant the access to another user too. REVOKE Command: This command is used provide database deny or remove access to database objects. Syntax: REVOKE privilege_name ON object_name FROM {user_name|PUBLIC|role_name}; |
|
| 8. |
What Are String Functions In Sql? |
|
Answer» SQL string functions are used primarily for string manipulation. Some of the widely used SQL string functions are:
SQL string functions are used primarily for string manipulation. Some of the widely used SQL string functions are: |
|
| 9. |
What Are Aggregate Functions In Sql? |
|
Answer» SQL aggregate FUNCTIONS return a single value, CALCULATED from values in a column. Some of the aggregate functions in SQL are as FOLLOWS:
SQL aggregate functions return a single value, calculated from values in a column. Some of the aggregate functions in SQL are as follows: |
|
| 10. |
What Is The Difference Between Having And Where Clause? |
|
Answer» Where clause is used to fetch data from a DATABASE that SPECIFIES particular CRITERIA whereas a Having clause is used ALONG with ‘GROUP BY’ to fetch data that MEETS particular criteria specified by the Aggregate functions. Where clause cannot be used with Aggregate functions, but the Having clause can. Where clause is used to fetch data from a database that specifies particular criteria whereas a Having clause is used along with ‘GROUP BY’ to fetch data that meets particular criteria specified by the Aggregate functions. Where clause cannot be used with Aggregate functions, but the Having clause can. |
|
| 11. |
What Is The Difference Between Delete, Truncate And Drop Command? |
|
Answer» The difference between the Delete, Truncate and DROP command is:
The difference between the Delete, Truncate and Drop command is: |
|
| 12. |
List Out The Acid Properties And Explain? |
|
Answer» Following are the four PROPERTIES of ACID. These guarantees that the database transactions are processed RELIABLY.
Following are the four properties of ACID. These guarantees that the database transactions are processed reliably. |
|
| 13. |
What Is A Null Value? |
|
Answer» A FIELD with a NULL value is a field with no value. A NULL value is different from a zero value or a field that contains SPACES. A field with a NULL value is one that has been LEFT blank during record creation. Assume, there is a field in a table is optional and it is possible to INSERT a record without ADDING a value to the optional field then the field will be saved with a NULL value. A field with a NULL value is a field with no value. A NULL value is different from a zero value or a field that contains spaces. A field with a NULL value is one that has been left blank during record creation. Assume, there is a field in a table is optional and it is possible to insert a record without adding a value to the optional field then the field will be saved with a NULL value. |
|
| 14. |
What Is The Difference Between Unique And Primary Key Constraints? |
|
Answer» There should be only one PRIMARY KEY in a table WHEREAS there can be any number of UNIQUE Keys. PRIMARY KEY doesn’t ALLOW NULL VALUES whereas Unique key allows NULL values. There should be only one PRIMARY KEY in a table whereas there can be any number of UNIQUE Keys. PRIMARY KEY doesn’t allow NULL values whereas Unique key allows NULL values. |
|
| 15. |
What Is A Unique Key And Primary Key And Foreign Key? |
Answer»
|
|
| 16. |
What Are The Constraints Available In Sql? |
|
Answer» Some of the constraints in SQL are : Primary Key, Foreign Key, Unique Key, SQL Not Null, DEFAULT, CHECK and INDEX CONSTRAINT. Some of the constraints in SQL are : Primary Key, Foreign Key, Unique Key, SQL Not Null, Default, Check and Index constraint. |
|
| 17. |
What Are Sql Constraints? |
|
Answer» SQL CONSTRAINTS are the set of rules that ENFORCED some RESTRICTION while inserting, deleting or UPDATING of data in the databases. SQL constraints are the set of rules that enforced some restriction while inserting, deleting or updating of data in the databases. |
|
| 18. |
What Are The Different Types Of Joins? |
|
Answer» Types of Joins are as follows: INNER JOIN: It is ALSO KNOWN as SIMPLE JOIN which returns all rows from BOTH TABLES when it has at least one column matched SYNTAX: SELECT column_name(s) FROM table_name1 INNER JOIN table_name2 ON column_name 1=column_name 2; LEFT JOIN (LEFT OUTER JOIN): This join returns all rows from a LEFT table and its matched rows from a RIGHT table. Syntax: SELECT column_name(s) FROM table_name1 LEFT JOIN table_name2 ON column_name 1=column_name 2; RIGHT JOIN (RIGHT OUTER JOIN): This joins returns all rows from the RIGHT table and its matched rows from a LEFT table. Syntax: SELECT column_name(s) FROM table_name1 RIGHT JOIN table_name2 ON column_name1=column_name2; FULL JOIN (FULL OUTER JOIN): This joins returns all when there is a match either in the RIGHT table or in the LEFT table. Syntax: SELECT column_name(s) FROM table_name1 FULL OUTER JOIN table_name2 ON column_name1=column_name2; Types of Joins are as follows: INNER JOIN: It is also known as SIMPLE JOIN which returns all rows from BOTH tables when it has at least one column matched Syntax: SELECT column_name(s) FROM table_name1 INNER JOIN table_name2 ON column_name 1=column_name 2; LEFT JOIN (LEFT OUTER JOIN): This join returns all rows from a LEFT table and its matched rows from a RIGHT table. Syntax: SELECT column_name(s) FROM table_name1 LEFT JOIN table_name2 ON column_name 1=column_name 2; RIGHT JOIN (RIGHT OUTER JOIN): This joins returns all rows from the RIGHT table and its matched rows from a LEFT table. Syntax: SELECT column_name(s) FROM table_name1 RIGHT JOIN table_name2 ON column_name1=column_name2; FULL JOIN (FULL OUTER JOIN): This joins returns all when there is a match either in the RIGHT table or in the LEFT table. Syntax: SELECT column_name(s) FROM table_name1 FULL OUTER JOIN table_name2 ON column_name1=column_name2; |
|
| 19. |
What Is A Join? |
|
Answer» Join is a QUERY, which retrieves RELATED columns or ROWS from multiple TABLES. Join is a query, which retrieves related columns or rows from multiple tables. |
|
| 20. |
Explain What Is A Subquery ? |
|
Answer» A SUBQUERY is a SQL QUERY within another query. It is a subset of a Select statement whose return values are used in FILTERING the conditions of the MAIN query. A Subquery is a SQL query within another query. It is a subset of a Select statement whose return values are used in filtering the conditions of the main query. |
|
| 21. |
Explain What Is A View? |
|
Answer» A VIEW is like a subset of a table which is STORED LOGICALLY in a database. A view is a virtual table. It contains rows and columns similar to a real table. The fields in the view are fields from one or more real tables. VIEWS do not contain data of their own. They are used to restrict access to the database or to hide data COMPLEXITY. A view is like a subset of a table which is stored logically in a database. A view is a virtual table. It contains rows and columns similar to a real table. The fields in the view are fields from one or more real tables. Views do not contain data of their own. They are used to restrict access to the database or to hide data complexity. |
|
| 22. |
Explain What Is An Index? |
|
Answer» An index is used to speed up the performance of QUERIES. It makes faster retrieval of DATA from the table. The index can be created on one column or a group of COLUMNS. An index is used to speed up the performance of queries. It makes faster retrieval of data from the table. The index can be created on one column or a group of columns. |
|
| 23. |
What Are The Different Tcl Commands In Sql? |
|
Answer» TCL commands are used to MANAGE the changes made by DML STATEMENTS. COMMIT: To WRITE and store the changes to the database ROLLBACK: To restore the database SINCE the LAST commit TCL commands are used to manage the changes made by DML statements. COMMIT: To write and store the changes to the database ROLLBACK: To restore the database since the last commit |
|
| 24. |
What Are The Different Dcl Commands In Sql? |
|
Answer» DCL commands are USED to create roles, grant PERMISSION and control ACCESS to the database objects. GRANT: To provide USER access DENY: To deny permissions to users REVOKE: To remove user access DCL commands are used to create roles, grant permission and control access to the database objects. GRANT: To provide user access DENY: To deny permissions to users REVOKE: To remove user access |
|
| 25. |
What Are The Different Dml Commands In Sql? |
|
Answer» DML commands are used for managing data PRESENT in the database. SELECT: To select specific data from a database INSERT: To insert new records into a table UPDATE: To update existing records DELETE: To delete existing records from a table DML commands are used for managing data present in the database. SELECT: To select specific data from a database INSERT: To insert new records into a table UPDATE: To update existing records DELETE: To delete existing records from a table |
|
| 26. |
What Are The Different Ddl Commands In Sql? |
|
Answer» DDL COMMANDS are USED to define or alter the STRUCTURE of the database. CREATE: To create databases and database objects ALTER: To alter existing database objects DROP: To drop databases and databases objects TRUNCATE: To remove all records from a table but not its database structure RENAME: To rename database objects DDL commands are used to define or alter the structure of the database. CREATE: To create databases and database objects ALTER: To alter existing database objects DROP: To drop databases and databases objects TRUNCATE: To remove all records from a table but not its database structure RENAME: To rename database objects |
|
| 27. |
What Are The Different Types Of Sql Commands? |
|
Answer» SQL commands are SEGREGATED into following types:
SQL commands are segregated into following types: |
|
| 28. |
Explain What Is A Column In A Table? |
|
Answer» A column is a VERTICAL ENTITY in a table that CONTAINS all information ASSOCIATED with a specific field in a table. A column is a vertical entity in a table that contains all information associated with a specific field in a table. |
|
| 29. |
Explain What Is A Field In A Database And Record In A Database? |
| Answer» | |
| 30. |
Explain What Is Table In A Database? |
|
Answer» A table is a DATABASE object used to store RECORDS in a field in the form of COLUMNS and rows that holds DATA. A table is a database object used to store records in a field in the form of columns and rows that holds data. |
|
| 31. |
Explain What Is Sql? |
|
Answer» SQL stands for Structured Query Language. It is an AMERICAN NATIONAL Standard Institute (ANSI) standard. It is a standard language for accessing and MANIPULATING databases. Using SQL, some of the ACTION we could do are to create databases, tables, stored procedures (SP’s), EXECUTE queries, retrieve, insert, update, delete data against a database. SQL stands for Structured Query Language. It is an American National Standard Institute (ANSI) standard. It is a standard language for accessing and manipulating databases. Using SQL, some of the action we could do are to create databases, tables, stored procedures (SP’s), execute queries, retrieve, insert, update, delete data against a database. |
|
| 32. |
What Are The Popular Database Management Systems In The It Industry? |
|
Answer» Oracle, MYSQL, Microsoft SQL Server, POSTGRESQL, Sybase, MONGODB, DB2, and Microsoft ACCESS etc., Oracle, MySQL, Microsoft SQL Server, PostgreSQL, Sybase, MongoDB, DB2, and Microsoft Access etc., |
|
| 33. |
Explain What Is Rdbms? |
|
Answer» RDBMS stands for Relational Database Management System. RDBMS is a database management system (DBMS) that is based on the relational model. DATA from relational database can be accessed USING Structured QUERY Language (SQL) RDBMS stands for Relational Database Management System. RDBMS is a database management system (DBMS) that is based on the relational model. Data from relational database can be accessed using Structured Query Language (SQL) |
|
| 34. |
Explain What Is Dbms? |
|
Answer» Database Management SYSTEM is a COLLECTION of programs that enables a user to store, retrieve, UPDATE and DELETE INFORMATION from a database. Database Management System is a collection of programs that enables a user to store, retrieve, update and delete information from a database. |
|
| 35. |
Explain What Is A Database? |
|
Answer» A database is a COLLECTION of information in an organized form for faster and BETTER ACCESS, STORAGE and manipulation. It can also be defined as a collection of TABLES, schema, views and other database objects. A database is a collection of information in an organized form for faster and better access, storage and manipulation. It can also be defined as a collection of tables, schema, views and other database objects. |
|