Technical Interview Questions and Answers :: SQL
: The insert and Delete commands are known as magic tables in SQL.
Yes, Consider a category table in a e-commerce web site.
Category_Id, Category_Name, Parent_Category_ID. In this table all the parent categories are also categories. When we create a self join category id will be treated as foreign key to the same table.
Nnormalization is step by step process of spiliting the bigger table into smaller table without changing any functionality. This wil improve the performance.
There are some way to normalize table
There are several advantages of normalization as under:
* Faster sorting and index creation.
* A larger number of clustered indexes.
* Narrower and more compact indexes.
* Fewer indexes per table, which improves the performance of INSERT, UPDATE, and DELETE statements
* Fewer null values and less opportunity for inconsistency, which increase database compactness.
Beside the above benefits there are few disadvantages as well:
* Increased amount of Normalization increases the amount of complexity of joins between tables and that hinders the performance.
There are few conditions to achieve the normalization:
* There should be a unique row identifier.
* A table should store only data for a single type of entity. For e.g. details for book’s publisher and book’s author should be saved under different table.
* A table should avoid columns which can be null-able.
* A table should avoid duplication of data and columns.
No Discussion on this question yet!
The data rows are not stored in any particular order, and there is no particular order to the sequence of the data pages. In a clustered index, the physical order of the rows in the table is not same as the logical (indexed) order of the key values.
The are three levels of abstraction:
* Physical level: The lowest level of abstraction describes how data are stored.
* Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data.
* View level: The highest level of abstraction describes only part of entire database
A data base schema which is specified by a set of definitions expressed by a special language is called DDL. Data Definition Language (DDL) is used to define and manage all the objects in an SQL database.
It is a special language used to manipulate the Data. Data Manipulation Language (DML), which is used to select, insert, update, and delete data in the objects defined using DDL.
Looking to grab a job as a Database Developer or Administrator? You can easily find SQL technical interview questions and answers on this page. All the questions have been previously asked during the technical rounds in IT companies. You can test your SQL database knowledge by solving these questions and compare your chances of fetching the job with a top IT company.
Are you targeting a specific IT company like Adobe? You can filter the question set by the company name easily. If you are not sure about a specific answer, you can easily click and read the answer along with the explanation. So, check these SQL technical interview questions and answers to prepare for your dream job.