Basic database interview questions pdf




















A DBA is a Database Administrator, and this is the most common job that you find a database specialist doing. A Development DBA usually works closely with a team of developers and gets more involved in design decisions, giving advice on performance and writing good SQL. That can be satisfying at a human level because you are part of a team and you share the satisfaction of the teams accomplishments. A Production DBA on the other hand is responsible for maintaining Databases within an organization, so it is a very difficult and demanding job.

He or she, often gets involved when all the design decisions have been made, and has simply to keep things up and running. Therefore, of course, it is also a rewarding job, both financially and in terms of job satisfaction. But it is a more "lonely" job than being a Development DBA.

Is This Answer Correct? Again, do not get caught up in the "typical" day-to-day operational issues of database administration.

The followed measures are achieved to do that:. A data structure in the form of tree which stores sorted data and searches, insertions, sequential access and deletions are allowed in logarithmic time.

Iterating over all the table rows is called Table Scan while iterating over all the index items is defined as Index Scan. Fill Factor can be defined as being that value which defines the percentage of left space on every leaf-level page that is to be packed with data.

Fragmentation can be defined as a database feature of server that promotes control on data which is stored at table level by the user. An outer loop within an inner loop is formed consisting of fewer entries and then for individual entry, inner loop is individually processed.

Two independent sources of data are joined in sort merge join. They performance is better as compared to nested loop when the data volume is big enough but it is not good as hash joins generally. The full operation can be divided into parts of two:.

Division of logical database into independent complete units for improving its management, availability and performance is called Database partitioning. Splitting of one table which is large into smaller database entities logically is called database partitioning. Its benefits are:. The actions involving incomplete transactions are left undone in DBMS.

Aggregation: The collected entities and their relationship are aggregated in this model. It is mainly used in expressing relationships within relationships.

Compilations of objects make up this model in which values are stored within instance variables which is inside the object. This is also known as structured form of data which can be accessed in many ways.

A table is a set of data that are organized in a model with Columns and Rows. Columns can be categorized as vertical, and Rows are horizontal. A table has specified number of column called fields but can have any number of rows which is called record. A primary key is a combination of fields which uniquely specify a row.

A Unique key constraint uniquely identified each record in the database. This provides uniqueness for the column or set of columns. A Primary key constraint has automatic unique constraint defined on it. But not, in the case of Unique Key. There can be many unique constraint defined per table, but only one Primary key constraint defined per table.

A foreign key is one table which can be related to the primary key of another table. Relationship needs to be created between two tables by referencing foreign key with the primary key of another table. This is a keyword used to query data from more tables based on the relationship between the fields of the tables.

Keys play a major role when JOINs are used. There are various types of join which can be used to retrieve data and it depends on the relationship between tables. Right join return rows which are common between the tables and all rows of Right hand side table. Simply, it returns all the rows from the right hand side table even though there are no matches in the left hand side table. Left join return rows which are common between the tables and all rows of Left hand side table. Simply, it returns all the rows from Left hand side table even though there are no matches in the Right hand side table.

Full join return rows when there are matching rows in any one of the tables. This means, it returns all the rows from the left hand side table and all the rows from the right hand side table. Normalization is the process of minimizing redundancy and dependency by organizing fields and table of a database.

The main aim of Normalization is to add, delete or modify field that can be made in a single table. DeNormalization is a technique used to access the data from higher to lower normal forms of database. It is also process of introducing redundancy into a table by incorporating data from the related tables.

This should remove all the duplicate columns from the table. Creation of tables for the related data and identification of unique columns. Meeting all requirements of the first normal form. Placing the subsets of data in separate tables and Creation of relationships between the tables using primary keys.

This should meet all requirements of 2NF. Removing the columns which are not dependent on primary key constraints.

Meeting all the requirements of third normal form and it should not have multi- valued dependencies. A view is a virtual table which consists of a subset of data contained in a table. Views are not virtually present, and it takes less space to store. View can have data of one or more tables combined, and it is depending on the relationship. An index is performance tuning method of allowing faster retrieval of records from the table.

An index creates an entry for each value and it will be faster to retrieve data. This indexing does not allow the field to have duplicate values if the column is unique indexed. Unique index can be applied automatically when primary key is defined.

This type of index reorders the physical order of the table and search based on the key values. Each table can have only one clustered index. NonClustered Index does not alter the physical order of the table and maintains logical order of data.

Each table can have nonclustered indexes. A database Cursor is a control which enables traversal over the rows or records in the table.



0コメント

  • 1000 / 1000