Vous êtes sur la page 1sur 34

Top Software Testing interview questions and answers are below

Questions Do you know what the mean of CMM and TMM? :1 Answers : 1

Capability maturity model and testing maturity model

Questions How many Effort Estimation methods available in market for Testing? :2 Answers : A Effort estimation consists in predict how many hours of work and how many workers are needed to 2 develop a project. The effort invested in a software project is probably one of the most important and most analysed variables in recent years in the process of project management. The determination of the value of this variable when initiating software projects allows us to plan adequately any forthcoming activities. As far as estimation and prediction is concerned there is still a number of unsolved problems and errors. To obtain good results it is essential to take into consideration any previous projects. Estimating the effort with a high grade of reliability is a problem which has not yet been solved and even the project manager has to deal with it since the beginning. Questions What are the different Methodologies in Agile Development Model? :3 Answers : There are currently seven different Agile methodologies that I am aware of: 3 1) Extreme Programming (XP) 2) Scrum 3) Lean Software Development 4) Feature-Driven Development 5) Agile Unified Process 6) Crystal 7) Dynamic Systems Development Model (DSDM) Questions How the 2 wings and body of the Butterfly Model of Test Development is Represented? :4 Answers : The Butterfly Model focuses on verification and validation of software products and is therefore a good 4 fit for software testing tasks that are incorporated into the V-model of software development. This model provides a graphic picture of the complexity of test tasks using the outline of a butterfly. The areas occupied by the wings and body are approximately related to the level of effort afforded to each of the activities included in the model. In addition to this the reference of the butterfly stems from Chaos theory which states that a small disturbance in part of a system can have huge consequences in some other part of the system. The development of a software system has certain similarities. Small modifications or errors in code may result in significant degradations in an application's performance. The model establishes three general areas of test activities that are illustrated by the butterfly's graphic outline. They are: Test Analysis (butterflys left wing) Test Design (right wing) Test Execution (butterflys body) . Questions What does the mclabe cyclomatic complexity of a program determine? :5 Answers : Cyclomatic complexity is likely the most widely used complexity metric in software engineering. It 5 describes the complexity of a procedure by measuring the linearly independent paths through its source code. . Questions How do you obtain the expected results for testing a search operation? :6 Answers : 1) Corresponding Search Window should be opened & hold corresponding field names in that. 6 2) Search Operation should be shown correct result while valid data. 3) Search Operation should be shown warning message while enter invalid data.

4) Search Operation should be shown output for all the condition in valid inputs. Questions Describe to the basic elements you put in a defect report? :7 Answers : 1)project name 7 2)module name 3)defect detected on 4)defect detected by 5)defect id 6)defect name 7)snapshort of the defect(if the defect is in the non reproducible environment) 8)priority,severity,status 9)defect resolved by 10)defect resolved on. Questions What is Impact analysis? As a tester how will you do impact analysis in your project? :8 Answers : Suppose after completion of an application or module, if another module is to be added, then we need 8 to test the new module as well as the impacted area which is affected by adding a new module. Impact Analysis will be done to find the impact area of the application by adding a new module. Generally team lead will take the initiate for this. Team lead will send a mail to client asking for the impact area (if developer is new to domain), also send a mail to development team and testing team asking for the impacted area. After getting the response of all three, team lead will do the consolidated report of all the mails. This consolidated mail will be given to the Test Engineer saying this is the Impact Analysis Report and these are the impact areas. Questions What is the main Goal of Defect Prevention meeting? :9 Answers : Closed defects can be reopened due to some of the following reason: 9 1)Fix given for some other issue may reopen closed defects. 2)Deployment not properly done at the time of fixing new defects. 3)Build issue. And hence to prevent such defects to reopen, regression testing should be performed on the main flow, scenarios before each testing phase is completed. And also if time permits quick sanity testing could be carried out to ensure that there is no impact to the application or system before moving on to the next testing phase. Questions What are the factors affecting a manual testing project and what are the ways to overcome : 10 it? Answers : 1. Go for Manual Testing in the following cases: Unstable Software. To explore New Software. No 10 Automation suite available. Adhoc testing (unplanned test cases). Not critical project & only one time testing & the effort required is less than the effort required for automation. 2. Go for Automation in the following cases: Stable Software. Any application with a High degree of risk associated with the failure is a good candidate for test automation. (Aircrafts, Patient monitor,) Testing needs to be repeated. 3. Advantages of Automation: Accelerate releases (reduces regression effort) With repeatable tests ensure consistency across multiple supported platforms Greater Application Coverage. Can test more often & more completely Convenient test reports for analysis Questions How do you verify the test results and How do you proceed when you do not get the : 11 expected results? Answers : We need to check whether Expected Result coresponding to Test case mentioned in Test Case 11 Document is same as Actual Result.If they are same then Test Case passes and if they are not same then we have to see what is different and why it different. After narrowing down we need to raise a defect and map that defect to a Test case. Questions In real time how you do the Soak Testing?

: 12 Answers : Soak Testing: Running a system at high load for a prolonged period of time. For example, running 12 several times more transactions in an entire day (or night) than would be expected in a busy day, to identify and performance problems that appear Questions What do you mean by Trend Analysis? : 13 Answers : In project management trend analysis is a mathematical technique that uses historical results to 13 predict future outcome. This is achieved by tracking variances in cost and schedule performance. In this context it is a project management quality control tool. Questions How you will write test cases for integration testing? Explain me with an example ? : 14 Answers : Integration testing is actually composed of different types of tests, but its objective is to ensure that 14 the interaction of two or more components produces results taht satisfy functional testing requirements. For Example: Let A and B be two components in which A calls B. Let Ta be the component level tests of A Let Tb be the component level tests of B Tab The tests in A's suite that cause A to call B. Tbsa The tests in B's suite for which it is possible to sensitize A -- the inputs are to A, not B. Tbsa + Tab == the integration test suite (+ = union). Questions What is the difference between interoperability and compatibility testing with some : 15 examples? Answers : Interoperatability:-To check if the software can co exist with other supporting softwares in the system 15 Compatibility:-To check if the software runs on different types of operating systems according to customer requirements. Questions What is 'fish pond analysis' w.r.t software testing? : 16 Answers : This is one of the SDLC process generally we are following. Its like in fish model thats why it got the 16 name like that. Questions What does a manual tester need to become proficient with DB Testing? : 17 Answers : Need knowledge of SQL query 17 Questions What is difference between Validation and Verification? : 18 Answers : Varification: it is the process of confirming that s/w "meets its specification".It involves reviews and 18 meetings to evaluate documents,plans,code,requirement and specification.This can be done with checklist,issues lists amd walkthroughs. It is the examination of the process and checks r we building the product right Validation: It is the process of confirming that it "meets the user's requirements".Validation typically involves actual testing and take place after varification are Questions What is difference between Known regression Testing and Unknown Regression testing? : 19 Answers : Regression testing means it is the type of testing in which one will conduct testing on an already tested 19 functionality again and again. Regression testing will be conducted in two situations. 1. If the test engineer find any defect on one functionality then after the rectification of that defect from the development department again testing on that defected functionality and retesting the related functionalities of that defected functionality. 2. If the new features are added to that application testing on that new feature functionality and also the related functionality of that new features to be tested.

Questions What is Quality Matrix in Software Testing? : 20 Answers : By word quality we may be more generalized towards our target. but being a quality contious a 20 "quality matix" should have; 1. logical parameterization of our parameters i.e. first we should confirm that is parameter "a" has logical connection with parameter "b" 2. Matrix should be result oriented. we can extract/deduce some logical results from each matrix 3. Every matrix should be complete in its domain it should not further dependant on other parameters other than selected 4. Every matrix should work in boundries of your requirements Questions Which testing method is used to check the software in abnormal condition? : 21 Answers : Which testing method is used to check the software in abnormal condition? 21 1) Stress testing 2) Security testing 3) Recovery testing 4) Beta testing

Database (DBMS) interview questions and answers are below


Questions What is database or database management systems (DBMS)? and - Whats the difference :1 between file and database? Can files qualify as a database? Answers : 1

Database provides a systematic and organized way of storing, managing and retrieving from collection of logically related information. Secondly the information has to be persistent, that means even after the application is closed the information should be persisted. Finally it should provide an independent way of accessing data and should not be dependent on the application to access the information. Main difference between a simple file and database that database has independent way (SQL) of accessing information while simple files do not File meets the storing, managing and retrieving part of a database but not the independent way of accessing data. Many experienced programmers think that the main difference is that file can not provide multi-user capabilities which a DBMS provides. But if we look at some old COBOL and C programs where file where the only means of storing data, we can see functionalities like locking, multi-user etc provided very efficiently. So its a matter of debate if some interviewers think this as a main difference between files and database accept it going in to debate is probably loosing a job.

Questions What is SQL ? :2 Answers : SQL stands for Structured Query Language.SQL is an ANSI (American National Standards Institute) 2 standard computer language for accessing and manipulating database systems. SQL statements are used to retrieve and update data in a database.

Questions Whats difference between DBMS and RDBMS ? :3 Answers : DBMS provides a systematic and organized way of storing, managing and retrieving from collection of 3 logically related information. RDBMS also provides what DBMS provides but above that it provides relationship integrity. So in short we can say RDBMS = DBMS + REFERENTIAL INTEGRITY

These relations are defined by using Foreign Keys in any RDBMS.Many DBMS companies claimed there DBMS product was a RDBMS compliant, but according to industry rules and regulations if the DBMS fulfills the twelve CODD rules its truly a RDBMS. Almost all DBMS (SQL SERVER, ORACLE etc) fulfills all the twelve CODD rules and are considered as truly RDBMS. Questions What are CODD rules? :4 Answers : In 1969 Dr. E. F. Codd laid down some 12 rules which a DBMS should adhere in order to get the logo of a true RDBMS. 4 Rule 1: Information Rule. "All information in a relational data base is represented explicitly at the logical level and in exactly one way - by values in tables." Rule 2: Guaranteed access Rule. "Each and every datum (atomic value) in a relational data base is guaranteed to be logically accessible by resorting to a combination of table name, primary key value and column name." In flat files we have to parse and know exact location of field values. But if a DBMS is truly RDBMS you can access the value by specifying the table name, field name, for instance Customers.Fields [Customer Name]. Rule 3: Systematic treatment of null values. "Null values (distinct from the empty character string or a string of blank characters and distinct from zero or any other number) are supported in fully relational DBMS for representing missing information and inapplicable information in a systematic way, independent of data type.". Rule 4: Dynamic on-line catalog based on the relational model. "The data base description is represented at the logical level in the same way as ordinary data, so that authorized users can apply the same relational language to its interrogation as they apply to the regular data."The Data Dictionary is held within the RDBMS, thus there is no-need for off-line volumes to tell you the structure of the database. Rule 5: Comprehensive data sub-language Rule. "A relational system may support several languages and various modes of terminal use (for example, the fill-in-the-blanks mode). However, there must be at least one language whose statements are expressible, per some well-defined syntax, as character strings and that is comprehensive in supporting all the following items Data Definition View Definition Data Manipulation (Interactive and by program). Integrity Constraints Authorization. Transaction boundaries ( Begin , commit and rollback) Rule 6: .View updating Rule "All views that are theoretically updatable are also updatable by the system." Rule 7: High-level insert, update and delete. "The capability of handling a base relation or a derived relation as a single operand applies not only to the retrieval of data but also to the insertion, update and deletion of data." Rule 8: Physical data independence. "Application programs and terminal activities remain logically unimpaired whenever any changes are made in either storage representations or access methods." Rule 9: Logical data independence. "Application programs and terminal activities remain logically unimpaired when information-preserving changes of any kind that theoretically permit un-impairment are made to the base tables." Rule 10: Integrity independence. "Integrity constraints specific to a particular relational data base must be definable in the relational data sub-language and storable in the catalog, not in the application programs." Rule 11: Distribution independence. "A relational DBMS has distribution independence." Rule 12: Non-subversion Rule. "If a relational system has a low-level (single-record-at-a-time) language, that low level cannot be used to subvert or bypass the integrity Rules and constraints expressed in the higher level relational language (multiple-records-at-a-time)." Questions What are E-R diagrams? :5

Answers : E-R diagram also termed as Entity-Relationship diagram shows relationship between various tables in 5 the database. . Questions How many types of relationship exist in database designing? :6 Answers : There are three major relationship models:6 One-to-one One-to-many Many-to-many Questions 7.What is normalization? What are different type of normalization? :7 Answers : There is set of rules that has been established to aid in the design of tables that are meant to be 7 connected through relationships. This set of rules is known as Normalization. Benefits of Normalizing your database include: =>Avoiding repetitive entries =>Reducing required storage space =>Preventing the need to restructure existing tables to accommodate new data. =>Increased speed and flexibility of queries, sorts, and summaries. Following are the three normal forms :First Normal Form For a table to be in first normal form, data must be broken up into the smallest un possible.In addition to breaking data up into the smallest meaningful values, tables first normal form should not contain repetitions groups of fields. Second Normal form The second normal form states that each field in a multiple field primary keytable must be directly related to the entire primary key. Or in other words,each non-key field should be a fact about all the fields in the primary key. Third normal form A non-key field should not depend on other Non-key field. Questions What is denormalization ? :8 Answers : Denormalization is the process of putting one fact in numerous places (its vice-versa of 8 normalization).Only one valid reason exists for denormalizing a relational design - to enhance performance.The sacrifice to performance is that you increase redundancy in database. Questions Can you explain Fourth Normal Form and Fifth Normal Form ? :9 Answers : In fourth normal form it should not contain two or more independent multi-v about an entity and it 9 should satisfy Third Normal form. Fifth normal form deals with reconstructing information from smaller pieces of information. These smaller pieces of information can be maintained with less redundancy. Questions Have you heard about sixth normal form? : 10 Answers : If we want relational system in conjunction with time we use sixth normal form. At this moment SQL 10 Server does not supports it directly. Questions What are DML and DDL statements? : 11 Answers : DML stands for Data Manipulation Statements. They update data values in table. Below are the most 11 important DDL statements:=>SELECT - gets data from a database table => UPDATE - updates data in a table => DELETE - deletes data from a database table

=> INSERT INTO - inserts new data into a database table DDL stands for Data definition Language. They change structure of the database objects like table, index etc. Most important DDL statements are as shown below:=>CREATE TABLE - creates a new table in the database. =>ALTER TABLE changes table structure in database. =>DROP TABLE - deletes a table from database => CREATE INDEX - creates an index => DROP INDEX - deletes an index Questions How do we select distinct values from a table? : 12 Answers : DISTINCT keyword is used to return only distinct values. Below is syntax:- Column age and Table 12 pcdsEmp SELECT DISTINCT age FROM pcdsEmp Questions What is Like operator for and what are wild cards? : 13 Answers : LIKE operator is used to match patterns. A "%" sign is used to define the pattern. 13 Below SQL statement will return all words with letter "S" SELECT * FROM pcdsEmployee WHERE EmpName LIKE 'S%' Below SQL statement will return all words which end with letter "S" SELECT * FROM pcdsEmployee WHERE EmpName LIKE '%S' Below SQL statement will return all words having letter "S" in between SELECT * FROM pcdsEmployee WHERE EmpName LIKE '%S%' "_" operator (we can read as Underscore Operator). _ operator is the character defined at that point. In the below sample fired a query Select name from pcdsEmployee where name like '_s%' So all name where second letter is s is returned. Questions Can you explain Insert, Update and Delete query? : 14 Answers : Insert statement is used to insert new rows in to table. Update to update existing data in the table. 14 Delete statement to delete a record from the table. Below code snippet for Insert, Update and Delete :INSERT INTO pcdsEmployee SET name='rohit',age='24'; UPDATE pcdsEmployee SET age='25' where name='rohit'; DELETE FROM pcdsEmployee WHERE name = 'sonia'; Questions What is order by clause? : 15 Answers : ORDER BY clause helps to sort the data in either ascending order to descending order. 15 Ascending order sort query SELECT name,age FROM pcdsEmployee ORDER BY age ASC Descending order sort query SELECT name FROM pcdsEmployee ORDER BY age DESC Questions What is the SQL " IN " clause? : 16 Answers : SQL IN operator is used to see if the value exists in a group of values. For instance the below SQL 16 checks if the Name is either 'rohit' or 'Anuradha' SELECT * FROM pcdsEmployee WHERE name IN ('Rohit','Anuradha') Also you can specify a not clause with the same. SELECT * FROM pcdsEmployee WHERE age NOT IN (17,16) Questions Can you explain the between clause? : 17 Answers : Below SQL selects employees born between '01/01/1975' AND '01/01/1978' as per mysql

17

SELECT * FROM pcdsEmployee WHERE DOB BETWEEN '1975-01-01' AND '2011-09-28'

Questions we have an employee salary table how do we find the second highest from it? : 18 Answers : below Sql Query find the second highest salary 18 SELECT * FROM pcdsEmployeeSalary a WHERE (2=(SELECT COUNT(DISTINCT(b.salary)) FROM pcdsEmployeeSalary b WHERE b.salary>=a.salary)) Questions What are different types of joins in SQL? : 19 Answers : INNER JOIN 19 Inner join shows matches only when they exist in both tables. Example in the below SQL there are two tables Customers and Orders and the inner join in made on Customers.Customerid and Orders.Customerid. So this SQL will only give you result with customers who have orders. If the customer does not have order it will not display that record. SELECT Customers.*, Orders.* FROM Customers INNER JOIN Orders ON Customers.CustomerID =Orders.CustomerID LEFT OUTER JOIN Left join will display all records in left table of the SQL statement. In SQL below customers with or without orders will be displayed. Order data for customers without orders appears as NULL values. For example, you want to determine the amount ordered by each customer and you need to see who has not ordered anything as well. You can also see the LEFT OUTER JOIN as a mirror image of the RIGHT OUTER JOIN (Is covered in the next section) if you switch the side of each table. SELECT Customers.*, Orders.* FROM Customers LEFT OUTER JOIN Orders ON Customers.CustomerID =Orders.CustomerID RIGHT OUTER JOIN Right join will display all records in right table of the SQL statement. In SQL below all orders with or without matching customer records will be displayed. Customer data for orders without customers appears as NULL values. For example, you want to determine if there are any orders in the data with undefined CustomerID values (say, after a conversion or something like it). You can also see the RIGHT OUTER JOIN as a mirror image of the LEFT OUTER JOIN if you switch the side of each table. SELECT Customers.*, Orders.* FROM Customers RIGHT OUTER JOIN Orders ON Customers.CustomerID =Orders.CustomerID Questions What is CROSS JOIN? or What is Cartesian product? : 20 Answers : CROSS JOIN or CARTESIAN PRODUCT combines all rows from both tables. Number of rows will be 20 product of the number of rows in each table. In real life scenario I can not imagine where we will want to use a Cartesian product. But there are scenarios where we would like permutation and combination probably Cartesian would be the easiest way to achieve it. Questions How to select the first record in a given set of rows? : 21 Answers : Select top 1 * from sales.salesperson 21 Questions What is the default -SORT order for a SQL? : 22 Answers : ASCENDING 22 Questions What is a self-join? : 23 Answers : If we want to join two instances of the same table we can use self-join. 23

Questions Whats the difference between DELETE and TRUNCATE ? : 24 Answers : Following are difference between them: 24 =>>DELETE TABLE syntax logs the deletes thus making the delete operations low. TRUNCATE table does not log any information but it logs information about deallocation of data page of the table. So TRUNCATE table is faster as compared to delete table. =>>DELETE table can have criteria while TRUNCATE can not. =>> TRUNCATE table can not have triggers. Questions Whats the difference between UNION and UNION ALL ? : 25 Answers : UNION SQL syntax is used to select information from two tables. But it selects only distinct records 25 from both the table. , while UNION ALL selects all records from both the tables. Questions What are cursors and what are the situations you will use them? : 26 Answers : SQL statements are good for set at a time operation. So it is good at handling set of data. But there 26 are scenarios where we want to update row depending on certain criteria. we will loop through all rows and update data accordingly. Theres where cursors come in to picture. Questions What is " Group by " clause? : 27 Answers : Group by clause group similar data so that aggregate values can be derived. 27 Questions What is the difference between HAVING and WHERE clause? : 28 Answers : HAVING clause is used to specify filtering criteria for GROUP BY, while WHERE clause applies on 28 normal SQL. Questions What is a Sub-Query? : 29 Answers : A query nested inside a SELECT statement is known as a subquery and is an alternative to complex 29 join statements. A subquery combines data from multiple tables and returns results that are inserted into the WHERE condition of the main query. A subquery is always enclosed within parentheses and returns a column. A subquery can also be referred to as an inner query and the main query as an outer query. JOIN gives better performance than a subquery when you have to check for the existence of records. For example, to retrieve all EmployeeID and CustomerID records from the ORDERS table that have the EmployeeID greater than the average of the EmployeeID field, you can create a nested query, as shown: SELECT DISTINCT EmployeeID, CustomerID FROM ORDERS WHERE EmployeeID > (SELECT AVG(EmployeeID) FROM ORDERS) Questions What are Aggregate and Scalar Functions? : 30 Answers : Aggregate and Scalar functions are in built function for counting and calculations. 30 Aggregate functions operate against a group of values but returns only one value. AVG(column) :- Returns the average value of a column COUNT(column) :- Returns the number of rows (without a NULL value) of a column COUNT(*) :- Returns the number of selected rows MAX(column) :- Returns the highest value of a column MIN(column) :- Returns the lowest value of a column Scalar functions operate against a single value and return value on basis of the single value. UCASE(c) :- Converts a field to upper case

LCASE(c) :- Converts a field to lower case MID(c,start[,end]) :- Extract characters from a text field LEN(c) :- Returns the length of a text Questions Can you explain the SELECT INTO Statement? : 31 Answers : SELECT INTO statement is used mostly to create backups. The below SQL backsup the Employee table 31 in to the EmployeeBackUp table. One point to be noted is that the structure of pcdsEmployeeBackup and pcdsEmployee table should be same. SELECT * INTO pcdsEmployeeBackup FROM pcdsEmployee Questions What is a View? : 32 Answers : View is a virtual table which is created on the basis of the result set returned by the select statement. 32 CREATE VIEW [MyView] AS SELECT * from pcdsEmployee where LastName = 'singh' In order to query the view SELECT * FROM [MyView] Questions What is SQl injection ? : 33 Answers : It is a Form of attack on a database-driven Web site in which the attacker executes unauthorized SQL 33 commands by taking advantage of insecure code on a system connected to the Internet, bypassing the firewall. SQL injection attacks are used to steal information from a database from which the data would normally not be available and/or to gain access to an organizations host computers through the computer that is hosting the database. SQL injection attacks typically are easy to avoid by ensuring that a system has strong input validation. As name suggest we inject SQL which can be relatively dangerous for the database. Example this is a simple SQL SELECT email, passwd, login_id, full_name FROM members WHERE email = 'x' Now somebody does not put x as the input but puts x ; DROP TABLE members;. So the actual SQL which will execute is :SELECT email, passwd, login_id, full_name FROM members WHERE email = 'x' ; DROP TABLE members; Think what will happen to your database. Questions What is Data Warehousing ? : 34 Answers : Data Warehousing is a process in which the data is stored and accessed from central location and is 34 meant to support some strategic decisions. Data Warehousing is not a requirement for Data mining. But just makes your Data mining process more efficient. Data warehouse is a collection of integrated, subject-oriented databases designed to support the decision-support functions (DSF), where each unit of data is relevant to some moment in time. Questions What are Data Marts? : 35 Answers : Data Marts are smaller section of Data Warehouses. They help data warehouses collect data. For 35 example your company has lot of branches which are spanned across the globe. Head-office of the company decides to collect data from all these branches for anticipating market. So to achieve this IT department can setup data mart in all branch offices and a central data warehouse where all data will finally reside. Questions What are Fact tables and Dimension Tables ? What is Dimensional Modeling and Star : 36 Schema Design Answers : When we design transactional database we always think in terms of normalizing design to its least 36 form. But when it comes to designing for Data warehouse we think more in terms of denormalizing the database. Data warehousing databases are designed using Dimensional Modeling. Dimensional

Modeling uses the existing relational database structure and builds on that. There are two basic tables in dimensional modeling:Fact Tables. Dimension Tables. Fact tables are central tables in data warehousing. Fact tables have the actual aggregate values which will be needed in a business process. While dimension tables revolve around fact tables. They describe the attributes of the fact tables. Questions What is Snow Flake Schema design in database? Whats the difference between Star and : 37 Snow flake schema? Answers : Star schema is good when you do not have big tables in data warehousing. But when tables start 37 becoming really huge it is better to denormalize. When you denormalize star schema it is nothing but snow flake design. For instance below customeraddress table is been normalized and is a child table of Customer table. Same holds true for Salesperson table. Questions What is ETL process in Data warehousing? What are the different stages in Data : 38 warehousing? Answers : ETL (Extraction, Transformation and Loading) are different stages in Data warehousing. Like when we 38 do software development we follow different stages like requirement gathering, designing, coding and testing. In the similar fashion we have for data warehousing. Extraction:In this process we extract data from the source. In actual scenarios data source can be in many forms EXCEL, ACCESS, Delimited text, CSV (Comma Separated Files) etc. So extraction process handles the complexity of understanding the data source and loading it in a structure of data warehouse. Transformation:This process can also be called as cleaning up process. Its not necessary that after the extraction process data is clean and valid. For instance all the financial figures have NULL values but you want it to be ZERO for better analysis. So you can have some kind of stored procedure which runs through all extracted records and sets the value to zero. Loading:After transformation you are ready to load the information in to your final data warehouse database. Questions What is Data mining ? : 39 Answers : Data mining is a concept by which we can analyze the current data from different perspectives and 39 summarize the information in more useful manner. Its mostly used either to derive some valuable information from the existing data or to predict sales to increase customer market. There are two basic aims of Data mining:Prediction: From the given data we can focus on how the customer or market will perform. For instance we are having a sale of 40000 $ per month in India, if the same product is to be sold with a discount how much sales can the company expect. Summarization: To derive important information to analyze the current business scenario. For example a weekly sales report will give a picture to the top management how we are performing on a weekly basis? Questions Compare Data mining and Data Warehousing ? : 40 Answers : Data Warehousing is technical process where we are making our data centralized while Data 40 mining is more of business activity which will analyze how good your business is doing or predict how it will do in the future coming times using the current data. As said before Data Warehousing is not a need for Data mining. Its good if you are doing Data mining on a Data Warehouse rather than on an actual production database. Data Warehousing is essential when we want to consolidate data from different sources, so its like a cleaner and matured data which sits in between the various data sources and brings then in to one format. Data Warehouses are normally physical entities which are meant to improve accuracy of Data mining process. For example you have 10 companies sending data in different format, so you create one physical database for consolidating all the data from different company sources, while Data mining can be a physical model or logical model. You can create a database in Data mining which gives you reports of net sales for this year for all

companies. This need not be a physical database as such but a simple query. Questions What are indexes? What are B-Trees? : 41 Answers : Index makes your search faster. So defining indexes to your database will make your search 41 faster.Most of the indexing fundamentals use B-Tree or Balanced-Tree principle. Its not a principle that is something is created by SQL Server or ORACLE but is a mathematical derived fundamental.In order that B-tree fundamental work properly both of the sides should be balanced. Questions I have a table which has lot of inserts, is it a good database design to create indexes on : 42 that table? Inserts are slower on tables which have indexes, justify it?or Why do page splitting happen? Answers : All indexing fundamentals in database use B-tree fundamental. Now whenever there is new data 42 inserted or deleted the tree tries to become unbalance. Creates a new page to balance the tree. Shuffle and move the data to pages. So if your table is having heavy inserts that means its transactional, then you can visualize the amount of splits it will be doing. This will not only increase insert time but will also upset the end-user who is sitting on the screen. So when you forecast that a table has lot of inserts its not a good idea to create indexes. Questions What are the two types of indexes and explain them in detail? or Whats the difference : 43 between clustered and non-clustered indexes? Answers : There are basically two types of indexes:43 Clustered Indexes. Non-Clustered Indexes. In clustered index the non-leaf level actually points to the actual data.In Non-Clustered index the leaf nodes point to pointers (they are rowids) which then point to actual data.

Mysql interview questions and answers are below


'
Questions how to do login in mysql with unix shell :1 Answers :1 By below method if password is pass and user name is root # [mysql dir]/bin/mysql -h hostname -u root -p pass

Questions how you will Create a database on the mysql server with unix shell :2 Answers : mysql> create database databasename; 2 Questions how to list or view all databases from the mysql server. :3 Answers : mysql> show databases; 3

Questions How Switch (select or use) to a database. :4 Answers : mysql> use databasename; 4 Questions How To see all the tables from a database of mysql server. :5 Answers : mysql> show tables; 5 Questions How to see table's field formats or description of table . :6 Answers : mysql> describe tablename; 6 Questions How to delete a database from mysql server. :7 Answers : mysql> drop database databasename; 7 Questions How we get Sum of column :8 Answers : mysql> SELECT SUM(*) FROM [table name]; 8 Questions How to delete a table :9 Answers : mysql> drop table tablename; 9 Questions How you will Show all data from a table. : 10 Answers : mysql> SELECT * FROM tablename; 10 Questions How to returns the columns and column information pertaining to the : 11 designated table Answers : mysql> show columns from tablename; 11 Questions How to Show certain selected rows with the value "pcds" : 12 Answers : mysql> SELECT * FROM tablename WHERE fieldname = "pcds"; 12 Questions How will Show all records containing the name "sonia" AND the phone : 13 number '9876543210' Answers : mysql> SELECT * FROM tablename WHERE name = "sonia" AND phone_number = 13 '9876543210'; Questions How you will Show all records not containing the name "sonia" AND the : 14 phone number '9876543210' order by the phone_number field.

Answer : 14

mysql> SELECT * FROM tablename WHERE name != "sonia" AND phone_number = '9876543210' order by phone_number;

Questions How to Show all records starting with the letters 'sonia' AND the phone : 15 number '9876543210' Answers : mysql> SELECT * FROM tablename WHERE name like "sonia%" AND phone_number 15 = '9876543210'; Questions How to show all records starting with the letters 'sonia' AND the phone : 16 number '9876543210' limit to records 1 through 5. Answers : mysql> SELECT * FROM tablename WHERE name like "sonia%" AND phone_number 16 = '9876543210' limit 1,5; Questions Use a regular expression to find records. Use "REGEXP BINARY" to force : 16 case-sensitivity. This finds any record beginning with r. Answer : 16 mysql> SELECT * FROM tablename WHERE rec RLIKE "^r";

Questions How you will Show unique records. : 17 Answer : 17 mysql> SELECT DISTINCT columnname FROM tablename;

Questions how we will Show selected records sorted in an ascending (asc) or : 18 descending (desc) Answer : 18 mysql> SELECT col1,col2 FROM tablename ORDER BY col2 DESC; mysql> SELECT col1,col2 FROM tablename ORDER BY col2 ASC;

Questions how to Return total number of rows. : 19 Answers : mysql> SELECT COUNT(*) FROM tablename; 19 Questions How to Join tables on common columns. : 20 Answer : 20 mysql> select lookup.illustrationid, lookup.personid,person.birthday from lookup left join person on lookup.personid=person.personid=statement to join birthday in person table with primary illustration id

Questions How to Creating a new user. Login as root. Switch to the MySQL db. Make the : 21 user. Update privs. Answer : 21 # mysql -u root -p mysql> use mysql; mysql> INSERT INTO user (Host,User,Password) VALUES('%','username',PASSWORD('password')); mysql> flush privileges; Questions How to Change a users password from unix shell.

: 22 Answers : # [mysql dir]/bin/mysqladmin -u username -h hostname.blah.org -p password 'new22 password' Questions How to Change a users password from MySQL prompt. Login as root. Set the : 23 password. Update privs. Answer : 23 # mysql -u root -p mysql> SET PASSWORD FOR 'user'@'hostname' = PASSWORD('passwordhere'); mysql> flush privileges; Questions How to Recover a MySQL root password. Stop the MySQL server process. : 24 Start again with no grant tables. Login to MySQL as root. Set new password. Exit MySQL and restart MySQL server. Answer : 24 # /etc/init.d/mysql stop # mysqld_safe --skip-grant-tables & # mysql -u root mysql> use mysql; mysql> update user set password=PASSWORD("newrootpassword") where User='root'; mysql> flush privileges; mysql> quit # /etc/init.d/mysql stop # /etc/init.d/mysql start

Questions How to Set a root password if there is on root password. : 25 Answer : 25 # mysqladmin -u root password newpassword

Questions How to Update a root password. : 26 Answer : 26 # mysqladmin -u root -p oldpassword newpassword

Questions How to allow the user "sonia" to connect to the server from localhost using : 27 the password "passwd". Login as root. Switch to the MySQL db. Give privs. Update privs. Answers : # mysql -u root -p 27 mysql> use mysql; mysql> grant usage on *.* to sonia@localhost identified by 'passwd'; mysql> flush privileges; Questions How to give user privilages for a db. Login as root. Switch to the MySQL db. : 28 Grant privs. Update privs. Answers : # mysql -u root -p 28 mysql> use mysql; mysql> INSERT INTO user (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) VALUES ('%','databasename','username','Y','Y','Y','Y','Y','N'); mysql> flush privileges; or mysql> grant all privileges on databasename.* to username@localhost; mysql> flush privileges;

Questions How To update info already in a table and Delete a row(s) from a table. : 29 Answer : 29 mysql> UPDATE [table name] SET Select_priv = 'Y',Insert_priv = 'Y',Update_priv = 'Y' where [field name] = 'user'; mysql> DELETE from [table name] where [field name] = 'whatever';

Questions How to Update database permissions/privilages. : 30 Answer : 30 mysql> flush privileges;

Questions How to Delete a column and Add a new column to database : 31 Answer : 31 mysql> alter table [table name] drop column [column name]; mysql> alter table [table name] add column [new column name] varchar (20);

Questions Change column name and Make a unique column so we get no dupes. : 32 Answer : 32 mysql> alter table [table name] change [old column name] [new column name] varchar (50); mysql> alter table [table name] add unique ([column name]);

Questions How to make a column bigger and Delete unique from table. : 33 Answer : 33 mysql> alter table [table name] modify [column name] VARCHAR(3); mysql> alter table [table name] drop index [colmn name];

Questions How to Load a CSV file into a table : 34 Answer : 34 mysql> LOAD DATA INFILE '/tmp/filename.csv' replace INTO TABLE [table name] FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1,field2,field3);

Questions How to dump all databases for backup. Backup file is sql commands to : 35 recreate all db's. Answer : 35 # [mysql dir]/bin/mysqldump -u root -ppassword --opt >/tmp/alldatabases.sql

Questions How to dump one database for backup. : 36 Answer : 36 # [mysql dir]/bin/mysqldump -u username -ppassword --databases databasename >/tmp/databasename.sql

Questions How to dump a table from a database. : 37 Answer : 37 # [mysql dir]/bin/mysqldump -c -u username -ppassword databasename tablename > /tmp/databasename.tablename.sql

Questions Restore database (or database table) from backup. : 38 Answer : 38 # [mysql dir]/bin/mysql -u username -ppassword databasename < /tmp/databasename.sql

Questions How to Create Table show Example : 39 Answer : 39 mysql> CREATE TABLE [table name] (firstname VARCHAR(20), middleinitial VARCHAR(3), lastname VARCHAR(35),suffix VARCHAR(3),officeid VARCHAR(10),userid VARCHAR(15),username VARCHAR(8),email VARCHAR(35),phone VARCHAR(25), groups VARCHAR(15),datestamp DATE,timestamp time,pgpemail VARCHAR(255));

Questions How to search second maximum(second highest) salary value(integer)from : 40 table employee (field salary)in the manner so that mysql gets less load? Answers : By below query we will get second maximum(second highest) salary 40 value(integer)from table employee (field salary)in the manner so that mysql gets less load? SELECT DISTINCT(salary) FROM employee order by salary desc limit 1 , 1 ; (This way we will able to find out 3rd highest , 4th highest salary so on just need to change limit condtion like LIMIT 2,1 for 3rd highest and LIMIT 3,1 for 4th some one may finding this way useing below query that taken more time as compare to above query SELECT salary FROM employee where salary < (select max(salary) from employe) order by salary DESC limit 1 ;

Top Data Structure interview questions and answers are below


Questions What is data structure? :1 Answers : 1

A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data.

Questions List out the areas in which data structures are applied extensively? :2 Answers : =>Compiler Design, 2 => Operating System, => Database Management System, => Statistical analysis package, => Numerical Analysis, => Graphics, => Artificial Intelligence, => Simulation Questions What are the major data structures used in the following areas : RDBMS, :3 Network data model & Hierarchical data model. Answers : =>RDBMS - Array (i.e. Array of structures) 3 =>Network data model Graph =>Hierarchical data model Trees Questions If you are using C language to implement the heterogeneous linked list, :4 what pointer type will you use? Answers : The heterogeneous linked list contains different data types in its nodes and we 4 need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type. . Questions Minimum number of queues needed to implement the priority queue? :5 Answers : Two. One queue is used for actual storing of data and another for storing priorities.

Questions What is the data structures used to perform recursion? :6 Answers : Stack. Because of its LIFO (Last In First Out) property it remembers its caller so 6 knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used. Questions What are the notations used in Evaluation of Arithmetic Expressions using :7 prefix and postfix forms? Answers : Polish and Reverse Polish notations. 7 Questions Convert the expression ((A + B) * C (D E) ^ (F + G)) to equivalent :8 Prefix and Postfix notations. Answers : Prefix Notation: ^ - * +ABC - DE + FG Postfix Notation: AB + C * DE - - FG + ^ 8 Questions Sorting is not possible by using which of the following methods? :9 (a) Insertion (b) Selection (c) Exchange (d) Deletion Answers : (d) Deletion. 9 Using insertion we can perform insertion sort, using selection we can perform selection sort, using exchange we can perform the bubble sort (and other similar sorting methods). But no sorting method can be done just using deletion. Questions What are the methods available in storing sequential files ? : 10 Answers : a>Straight merging, 10 b> Natural merging, c> Polyphase sort, d> Distribution of Initial runs. Questions List out few of the Application of tree data-structure? : 11 Answers : a>The manipulation of Arithmetic expression, 11 b> Symbol Table construction, c> Syntax analysis. Questions List out few of the applications that make use of Multilinked Structures? : 12 Answers : a> Sparse matrix, 12 b> Index generation. Questions 15. In tree construction which is the suitable efficient data structure? : 13 (a) Array (b) Linked list (c) Stack (d) Queue (e) none Answers : (b) Linked list

13 Questions What is a spanning Tree?Does the minimum spanning tree of a graph give : 14 the shortest distance between any 2 specified nodes? Answers : A spanning tree is a tree associated with a network. All the nodes of the graph 14 appear on the tree once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized. No. minimum spanning tree of a graph give the shortest distance between any 2 specified node Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But it doesnt mean that the distance between any two nodes involved in the minimum-spanning tree is minimum. Questions Which is the simplest file structure? : 15 (a) Sequential (b) Indexed (c) Random Answers : (a) Sequential 15 Questions Whether Linked List is linear or Non-linear data structure? : 16 Answers : According to Access strategies Linked list is a linear one. 16 According to Storage Linked List is a Non-linear one. Questions 28. Of the following tree structure, which is, efficient considering space : 17 and time complexities? (a) Incomplete Binary Tree (b) Complete Binary Tree (c) Full Binary Tree Answers : (b) Complete Binary Tree. 17 By the method of elimination: Full binary tree loses its nature when operations of insertions and deletions are done. For incomplete binary trees, extra storage is required and overhead of NULL node checking takes place. So complete binary tree is the better one since the property of complete binary tree is maintained even after operations like additions and deletions are done on it. Questions In RDBMS, what is the efficient data structure used in the internal storage : 18 representation? Answers : B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes 18 searching easier. This corresponds to the records that shall be stored in leaf nodes. Questions 25. What are the types of Collision Resolution Techniques and the methods : 19 used in each of the type? Answers : a> Open addressing (closed hashing), The methods used include: 19 Overflow block, b> Closed addressing (open hashing) The methods used include: Linked list, Binary tree Questions Classify the Hashing Functions based on the various methods by which the : 20 key value is found. Answers : => Subtraction method, 20 => Modulo-Division method, =>Digit-Extraction method,

=> => => =>

Mid-Square method, Folding method, Pseudo-random method. Direct method,

Questions In an AVL tree, at what condition the balancing is to be done? : 21 Answers : If the pivotal value (or the Height factor) is greater than 1 or less than 1. 21

oops interview questions and answers are below


Questions What is Object Oriented Programming ? :1 Answers : 1

It is a problem solving technique to develop software systems. It is a technique to think real world in terms of objects. Object maps the software model to real world concept. These objects have responsibilities and provide services to application or other objects.

Questions What is a Class ? :2 Answers : A class describes all the attributes of objects, as well as the methods that implement the behavior of 2 member objects. It is a comprehensive data type which represents a blue print of objects. Its a template of object. Questions What is an Object ? :3 Answers : It is a basic unit of a system. An object is an entity that has attributes, behavior, and identity. Objects 3 are members of a class. Attributes and behavior of an object are defined by the class definition. Questions What is the relation between Classes and Objects? :4 Answers : They look very much same but are not same. Class is a definition, while object is instance of the class 4 created. Class is a blue print while objects are actual objects existing in real world. Example we have class CAR which has attributes and methods like Speed, Brakes, Type of Car etc.Class CAR is just a prototype, now we can create real time objects which can be used to provide functionality. Example we can create a Maruti car object with 100 km speed and urgent brakes. Questions What are different properties provided by Object-oriented systems ? :5 Answers : Following are characteristics of Object Oriented Systems:5 Abstraction It allows complex real world to be represented in simplified manner. Example color is abstracted to RGB.By just making the combination of these three colors we can achieve any color in world. Its a model of real world or concept. Encapsulation The process of hiding all the internal details of an object from the outside world. Communication Using messages when application wants to achieve certain task it can only be done using combination of objects. A single object can not do the entire task. Example if we want to make order processing form. We will use Customer object, Order object, Product object and Payment object to achieve this functionality. In short these objects should communicate with each other. This is achieved when objects send messages to each other. Object lifetime All objects have life time. Objects are created, initialized, necessary functionalities are done and later the object is destroyed. Every object have there own state and identity, which differ from instance to

instance. Questions What is an Abstract class ? :6 Answers : Abstract class defines an abstract concept which can not be instantiated and comparing o interface it 6 can have some implementation while interfaces can not. Below are some points for abstract class:=>We can not create object of abstract class it can only be inherited in a below class. => Normally abstract classes have base implementation and then child classes derive from the abstract class to make the class concrete. Questions What are Abstract methods? :7 Answers : Abstract class can contain abstract methods. Abstract methods do not have implementation. Abstract 7 methods should be implemented in the subclasses which inherit them. So if an abstract class has an abstract method class inheriting the abstract class should implement the method or else java compiler will through an error. In this way, an abstract class can define a complete programming interface thereby providing its subclasses with the method declarations for all of the methods necessary to implement that programming interface. Abstract methods are defined using "abstract" keyword. Below is a sample code snippet. abstract class pcdsGraphics { abstract void draw(); } Any class inheriting from "pcdsGraphics" class should implement the "draw" method or else the java compiler will throw an error. so if we do not implement a abstract method the program will not compile. Questions What is the difference between Abstract classes and Interfaces ? :8 Answers : Difference between Abstract class and Interface is as follows:8 Abstract class can only be inherited while interfaces can not be it has to be implemented. Interface cannot implement any methods, whereas an abstract class can have implementation. Class can implement many interfaces but can have only one super class. Interface is not part of the class hierarchy while Abstract class comes in through inheritance. Unrelated classes can implement the same interface. Questions What is difference between Static and Non-Static fields of a class ? :9 Answers : Non-Static values are also called as instance variables. Each object of the class has its own copy of 9 Non-Static instance variables. So when a new object is created of the same class it will have completely its own copy of instance variables. While Static values have only one copy of instance variables and will be shared among all the objects of the class. Questions What are inner classes and what is the practical implementation of inner classes? : 10 Answers : Inner classes are nested inside other class. They have access to outer class fields and methods even if 10 the fields of outer class are defined as private. public class Pcds { class pcdsEmp { // inner class defines the required structure String first; String last; } // array of name objects clsName personArray[] = {new clsName(), new clsName(), new clsName()}; }

Normally inner classes are used for data structures like one shown above or some kind of helper classes. Questions What is a constructor in class? : 11 Answers : Constructor has the same name as the class in which it resides and looks from syntax point of view it 11 looks similiar to a method. Constructor is automatically called immediately after the object is created, before the new operator completes. Constructors have no return type, not even void. This is because the implicit return type of a class' constructor is the class type itself. It is the constructor's job to initialize the internal state of an object so that the code creating an instance will have a fully initialized, usable object immediately. Questions Can constructors be parameterized? : 12 Answers : Yes we can have parameterized constructor which can also be termed as constructor overloading. 12 Below is a code snippet which shows two constructors for pcdsMaths class one with parameter and one with out. class pcdsMaths { double PI; // This is the constructor for the maths constant class. pcdsMaths() {PI = 3.14;} pcdsMaths(int pi) { PI = pi; }} Questions What is the use if instanceof keyword? and How do refer to a current instance of object? : 13 Answers : "instanceof" keyword is used to check what is the type of object. 13 we can refer the current instance of object using "this" keyword. For instance if we have class which has color property we can refer the current object instance inside any of the method using "this.color". Questions what is Bootstrap, Extension and System Class loader? or Can you explain primordial class : 14 loader? Answers : There three types of class loaders:14 BootStrap Class loader also called as primordial class loader. Extension Class loader. System Class loader. Lets now try to get the fundamentals of these class loaders. Bootstrap Class loader Bootstrap class loader loads those classes those which are essential for JVM to function properly. Bootstrap class loader is responsible for loading all core java classes for instance java.lang.*, java.io.* etc. Bootstrap class loader finds these necessary classes from jdk/ jre/lib/rt.jar. Bootstrap class loader can not be instantiated from JAVA code and is implemented natively inside JVM. Extension Class loader The extension class loader also termed as the standard extensions class loader is a child of the bootstrap class loader. Its primary responsibility is to load classes from the extension directories, normally located the jre/lib/ext directory. This provides the ability to simply drop in new extensions, such as various security extensions, without requiring modification to the user's class path. System Class loader The system class loader also termed application class loader is the class loader responsible for loading code from the path specified by the CLASSPATH environment variable. It is also used to load an applications entry point class that is the "static void main ()" method in a class. Questions whats the main difference between ArrayList / HashMap and Vector / Hashtable? : 15

Answers : Vector / HashTable are synchronized which means they are thread safe. Cost of thread safe is 15 performance degradation. So if you are sure that you are not dealing with huge number of threads then you should use ArrayList / HashMap.But yes you can still synchronize List and Maps using Collections provided methods :List OurList = Collections.synchronizedList (OurList); Map OurMap = Collections.synchronizedMap (OurMap); Questions What are access modifiers? : 16 Answers : Access modifiers decide whether a method or a data variable can be accessed by another method in 16 another class or subclass. four types of access modifiers: Public: - Can be accessed by any other class anywhere. Protected: - Can be accessed by classes inside the package or by subclasses ( that means classes who inherit from this class). Private - Can be accessed only within the class. Even methods in subclasses in the same package do not have access. Default - (Its private access by default) accessible to classes in the same package but not by classes in other packages, even if these are subclasses. Questions Define exceptions ? : 17 Answers : An exception is an abnormal condition that arises in a code sequence at run time. Basically there are 17 four important keywords which form the main pillars of exception handling: try, catch, throw and finally. Code which you want to monitor for exception is contained in the try block. If any exception occurs in the try block its sent to the catch block which can handle this error in a more rational manner. To throw an exception manually you need to call use the throw keyword. If you want to put any clean up code use the finally block. The finally block is executed irrespective if there is an error or not. Questions What is serialization?How do we implement serialization actually? : 18 Answers : Serialization is a process by which an object instance is converted in to stream of bytes. There are 18 many useful stuff you can do when the object instance is converted in to stream of bytes for instance you can save the object in hard disk or send it across the network. In order to implement serialization we need to use two classes from java.io package ObjectOutputStream and ObjectInputStream. ObjectOutputStream has a method called writeObject, while ObjectInputStream has a method called readObject. Using writeobject we can write and readObject can be used to read the object from the stream. Below are two code snippet which used the FileInputStream and FileOutputstream to read and write from harddisk.

OS interview questions and answers below for freshers and experienced


Questions Explain the concept of Reentrancy. ? :1 Answers : 1

It is a useful, memory-saving technique for multiprogrammed timesharing systems. A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period. Reentrancy has 2 key aspects: The program code cannot modify itself, and the local data for each user process must be stored separately. Thus, the permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program. Each execution instance is called activation. It executes the code in the permanent part, but has its own copy of local variables/parameters. The temporary part associated with each activation is the activation record. Generally, the activation record is kept on the stack.

Note: A reentrant procedure can be interrupted and called by an interrupting program, and still execute correctly on returning to the procedure. Questions Explain Belady's Anomaly. :2 Answers : Also called FIFO anomaly. Usually, on increasing the number of frames allocated to a process' virtual 2 memory, the process execution is faster, because fewer page faults occur. Sometimes, the reverse happens, i.e., the execution time increases even when more frames are allocated to the process. This is Belady's Anomaly. This is true for certain page reference patterns. Questions What is a binary semaphore? What is its use? :3 Answer : 3 A binary semaphore is one, which takes only 0 and 1 as values. They are used to implement mutual exclusion and synchronize concurrent processes.

Questions What is thrashing? :4 Answer : 4 It is a phenomenon in virtual memory schemes when the processor spends most of its time swapping pages, rather than executing instructions. This is due to an inordinate number of page faults.

Questions List the Coffman's conditions that lead to a deadlock. :5 Answers : ==> Mutual Exclusion : Only one process may use a critical resource at a time. 5 ==> Hold and Wait : A process may be allocated some resources while waiting for others. ==> No Pre-emption : No resource can be forcible removed from a process holding it. ==> Circular Wait : A closed chain of processes exist such that each process holds at least one resource needed by another process in the chain. Questions What are short-term, long-term and medium-term scheduling? :6 Answers : Long term scheduler determines which programs are admitted to the system for processing. It controls the degree of multiprogramming. Once admitted, a job becomes a process. 6 Medium term scheduling is part of the swapping function. This relates to processes that are in a blocked or suspended state. They are swapped out of real-memory until they are ready to execute. The swapping-in decision is based on memory-management criteria. Short term scheduler, also know as a dispatcher executes most frequently, and makes the finestgrained decision of which process should execute next. This scheduler is invoked whenever an event occurs. It may lead to interruption of one process by preemption. Questions What are turnaround time and response time? :7 Answers : Turnaround time is the interval between the submission of a job and its completion. Response time is 7 the interval between submission of a request, and the first response to that request. Questions What are the typical elements of a process image? :8 Answers : ==> User data : Modifiable part of user space. May include program data, user stack area, and 8 programs that may be modified. ==> User program : The instructions to be executed. ==> System Stack : Each process has one or more LIFO stacks associated with it. Used to store parameters and calling addresses for procedure and system calls. ==> Process control Block (PCB) : Info needed by the OS to control processes.

Questions What is the Translation Lookaside Buffer (TLB)? :9 Answers : In a cached system, the base addresses of the last few referenced pages is maintained in registers 9 called the TLB that aids in faster lookup. TLB contains those page-table entries that have been most recently used. Normally, each virtual memory reference causes 2 physical memory accesses-- one to fetch appropriate page-table entry, and one to fetch the desired data. Using TLB in-between, this is reduced to just one physical memory access in cases of TLB-hit. Questions What is the resident set and working set of a process? : 10 Answers : Resident set is that portion of the process image that is actually in real-memory at a particular 10 instant. Working set is that subset of resident set that is actually needed for execution. (Relate this to the variable-window size method for swapping techniques.) Questions When is a system in safe state? : 11 Answers : The set of dispatchable processes is in a safe state if there exists at least one temporal order in 11 which all processes can be run to completion without resulting in a deadlock. Questions What is cycle stealing? : 12 Answers : We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the DMA controller 12 can use the data bus when the CPU does not need it, or it may force the CPU to temporarily suspend operation. The latter technique is called cycle stealing. Note that cycle stealing can be done only at specific break points in an instruction cycle. Questions What is meant by arm-stickiness? : 13 Answers : If one or a few processes have a high access rate to data on one track of a storage disk, then they 13 may monopolize the device by repeated requests to that track. This generally happens with most common device scheduling algorithms (LIFO, SSTF, C-SCAN, etc). High-density multisurface disks are more likely to be affected by this than low density ones. Questions What are the stipulations of C2 level security? : 14 Answers : C2 level security provides for: 14 ==> Discretionary Access Control ==> Identification and Authentication ==> Auditing ==> Resource reuse Questions What is busy waiting? : 15 Answers : The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. 15 The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion. Questions Explain the popular multiprocessor thread-scheduling strategies. : 16 Answers : ==> Load Sharing : Processes are not assigned to a particular processor. A global queue of 16 threads is maintained. Each processor, when idle, selects a thread from this queue. Note that load balancing refers to a scheme where work is allocated to processors on a more permanent basis. ==>Gang Scheduling: A set of related threads is scheduled to run on a set of processors at the

same time, on a 1-to-1 basis. Closely related threads / processes may be scheduled this way to reduce synchronization blocking, and minimize process switching. Group scheduling predated this strategy. ==>Dedicated processor assignment: Provides implicit scheduling defined by assignment of threads to processors. For the duration of program execution, each program is allocated a set of processors equal in number to the number of threads in the program. Processors are chosen from the available pool. ==>Dynamic scheduling: The number of thread in a program can be altered during the course of execution. Questions When does the condition 'rendezvous' arise? : 17 Answers : In message passing, it is the condition in which, both, the sender and receiver are blocked until the 17 message is delivered. Questions What is a trap and trapdoor? : 18 Answers : Trapdoor is a secret undocumented entry point into a program used to grant access without normal 18 methods of access authentication. A trap is a software interrupt, usually the result of an error condition. Questions What are local and global page replacements? : 19 Answers : Local replacement means that an incoming page is brought in only to the relevant process' address 19 space. Global replacement policy allows any page frame from any process to be replaced. The latter is applicable to variable partitions model only. Questions Define latency, transfer and seek time with respect to disk I/O. : 20 Answers : Seek time is the time required to move the disk arm to the required track. Rotational delay or 20 latency is the time it takes for the beginning of the required sector to reach the head. Sum of seek time (if any) and latency is the access time. Time taken to actually transfer a span of data is transfer time. Questions Describe the Buddy system of memory allocation. : 21 Answers : Free memory is maintained in linked lists, each of equal sized blocks. Any such block is of size 2^k. 21 When some memory is required by a process, the block size of next higher order is chosen, and broken into two. Note that the two such pieces differ in address only in their kth bit. Such pieces are called buddies. When any used block is freed, the OS checks to see if its buddy is also free. If so, it is rejoined, and put into the original free-block linked-list. Questions What is time-stamping? : 22 Answers : It is a technique proposed by Lamport, used to order events in a distributed system without the use 22 of clocks. This scheme is intended to order events consisting of the transmission of messages. Each system 'i' in the network maintains a counter Ci. Every time a system transmits a message, it increments its counter by 1 and attaches the time-stamp Ti to the message. When a message is received, the receiving system 'j' sets its counter Cj to 1 more than the maximum of its current value and the incoming time-stamp Ti. At each site, the ordering of messages is determined by the following rules: For messages x from site i and y from site j, x precedes y if one of the following conditions holds....(a) if Ti<j.<="" p=""> Questions How are the wait/signal operations for monitor different from those for semaphores?

: 23 Answers : If a process in a monitor signal and no task is waiting on the condition variable, the signal is lost. So 23 this allows easier program design. Whereas in semaphores, every operation affects the value of the semaphore, so the wait and signal operations should be perfectly balanced in the program. Questions In the context of memory management, what are placement and replacement algorithms? : 24 Answers : Placement algorithms determine where in available real-memory to load a program. Common 24 methods are first-fit, next-fit, best-fit. Replacement algorithms are used when memory is full, and one process (or part of a process) needs to be swapped out to accommodate a new program. The replacement algorithm determines which are the partitions to be swapped out. Questions In loading programs into memory, what is the difference between load-time dynamic : 25 linking and run-time dynamic linking? Answer : 25 For load-time dynamic linking: Load module to be loaded is read into memory. Any reference to a target external module causes that module to be loaded and the references are updated to a relative address from the start base address of the application module. With run-time dynamic loading: Some of the linking is postponed until actual reference during execution. Then the correct module is loaded and linked. Questions What are demand- and pre-paging? : 26 Answer : 26 With demand paging, a page is brought into memory only when a location on that page is actually referenced during execution. With pre-paging, pages other than the one demanded by a page fault are brought in. The selection of such pages is done based on common access patterns, especially for secondary memory devices.

Questions Paging a memory management function, while multiprogramming a processor : 27 management function, are the two interdependent? Answers : Yes. 27 Questions What is page cannibalizing? : 28 Answer : 28 Page swapping or page replacements are called page cannibalizing.

Questions What has triggered the need for multitasking in PCs? : 29 Answer : 29 ==> Increased speed and memory capacity of microprocessors together with the support fir virtual memory and ==> Growth of client server computing

Questions What are the four layers that Windows NT have in order to achieve independence? : 30 Answer : 30 ==> ==> ==> ==> Hardware abstraction layer Kernel Subsystems System Services.

Questions What is SMP? : 31 Answer : To achieve maximum efficiency and reliability a mode of operation known as symmetric

31

multiprocessing is used. In essence, with SMP any process or threads can be assigned to any processor.

Questions What are the key object oriented concepts used by Windows NT? : 32 Answer : 32 ==> Encapsulation ==> Object class and instance

Questions Is Windows NT a full blown object oriented operating system? Give reasons. : 33 Answer : 33 No Windows NT is not so, because its not implemented in object oriented language and the data structures reside within one executive component and are not represented as objects and it does not support object oriented capabilities

Questions What is a drawback of MVT? : 34 Answer : 34 It does not have the features like ==> ability to support multiple processors ==> virtual storage ==> source level debugging

Questions What is process spawning? : 35 Answer : 35 When the OS at the explicit request of another process creates a process, this action is called process spawning

Questions How many jobs can be run concurrently on MVT? : 36 Answer : 36 15 jobs

Questions List out some reasons for process termination. : 37 Answer : 37 ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> ==> Normal completion Time limit exceeded Memory unavailable Bounds violation Protection error Arithmetic error Time overrun I/O failure Invalid instruction Privileged instruction Data misuse Operator or OS intervention Parent termination

Questions What are the reasons for process suspension? : 38 Answer : 38 ==> ==> ==> ==> swapping interactive user request timing parent process request

Questions What is process migration?

: 39 Answer : 39 It is the transfer of sufficient amount of the state of process from one machine to the target machine

Questions What is mutant? : 40 Answer : 40 In Windows NT a mutant provides kernel mode or user mode mutual exclusion with the notion of ownership.

Questions What is an idle thread? : 41 Answer : 41 The special thread a dispatcher will execute when no ready thread is found

Questions What is FtDisk? : 42 Answer : 42 It is a fault tolerance disk driver for Windows NT.

Questions What are the possible threads a thread can have? : 43 Answer : 43 ==> ==> ==> ==> ==> ==> Ready Standby Running Waiting Transition Terminated.

Questions What are rings in Windows NT? : 44 Answer : 44 Windows NT uses protection mechanism called rings provides by the process to implement separation between the user mode and kernel mode.

Questions What is Executive in Windows NT? : 45 Answer : 45 In Windows NT, executive refers to the operating system code that runs in kernel mode.

Questions What are the sub-components of I/O manager in Windows NT? : 46 Answer : 46 ==> ==> ==> ==> ==> Network redirector/ Server Cache manager. File systems Network driver Device driver

Questions What are DDks? Name an operating system that includes this feature. : 47 Answer : 47 DDks are device driver kits, which are equivalent to SDKs for writing device drivers. Windows NT includes DDks.

Questions What level of security does Windows NT meets? : 48

Answer : 48

C2 level security.

Home Jobs Freshers Employers Careers Forums Placement Papers

Home \Important 40 Testing Interview Questions

Important 40 Testing Interview Questions


Last Updated on Tuesday, 3 May 2011 02:20 Written by EditorMonday, 22 October 2007 05:29

Important 40 Testing Interview Questions for Job seekers to prepare for the Testing job Interview Whats Ad Hoc Testing ? A testing where the tester tries to break the software by randomly trying functionality of software. Whats the Accessibility Testing ? Testing that determines if software will be usable by people with disabilities. Whats the Alpha Testing ? The Alpha Testing is conducted at the developer sites and in a controlled environment by the end user of the software Whats the Beta Testing ? Testing the application after the installation at the client place. What is Component Testing ? Testing of individual software components (Unit Testing). Whats Compatibility Testing ?

In Compatibility testing we can test that software is compatible with other elements of system. What is Concurrency Testing ? Multi-user testing geared towards determining the effects of accessing the same application code, module or database records. Identifies and measures the level of locking, deadlocking and use of single-threaded code and locking semaphores. What is Conformance Testing ? The process of testing that an implementation conforms to the specification on which it is based. Usually applied to testing conformance to a formal standard. What is Context Driven Testing ? The context-driven school of software testing is flavor of Agile Testing that advocates continuous and creative evaluation of testing opportunities in light of the potential information revealed and the value of that information to the organization right now. What is Data Driven Testing ? Testing in which the action of a test case is parameterized by externally defined data values, maintained as a file or spreadsheet. A common technique in Automated Testing. What is Conversion Testing ? Testing of programs or procedures used to convert data from existing systems for use in replacement systems. What is Dependency Testing ? Examines an applications requirements for pre-existing software, initial states and configuration in order to maintain proper functionality. What is Depth Testing ? A test that exercises a feature of a product in full detail. What is Dynamic Testing ? Testing software through executing it. See also Static Testing. What is Endurance Testing ? Checks for memory leaks or other problems that may occur with prolonged execution.

What is End-to-End testing ? Testing a complete application environment in a situation that mimics real-world use, such as interacting with a database, using network communications, or interacting with other hardware, applications, or systems if appropriate. What is Exhaustive Testing ? Testing which covers all combinations of input values and preconditions for an element of the software under test. What is Gorilla Testing ? Testing one particular module, functionality heavily. What is Installation Testing ? Confirms that the application under test recovers from expected or unexpected events without loss of data or functionality. Events can include shortage of disk space, unexpected loss of communication, or power out conditions. What is Localization Testing ? This term refers to making software specifically designed for a specific locality. What is Loop Testing ? A white box testing technique that exercises program loops. What is Mutation Testing ? Mutation testing is a method for determining if a set of test data or test cases is useful, by deliberately introducing various code changes (bugs) and retesting with the original test data/cases to determine if the bugs are detected. Proper implementation requires large computational resources What is Monkey Testing ? Testing a system or an Application on the fly, i.e just few tests here and there to ensure the system or an application does not crash out. What is Positive Testing ? Testing aimed at showing software works. Also known as test to pass. See also Negative Testing.

What is Negative Testing ? Testing aimed at showing software does not work. Also known as test to fail. See also Positive Testing. What is Path Testing ? Testing in which all paths in the program source code are tested at least once. What is Performance Testing ? Testing conducted to evaluate the compliance of a system or component with specified performance requirements. Often this is performed using an automated test tool to simulate large number of users. Also know as Load Testing. What is Ramp Testing ? Continuously raising an input signal until the system breaks down. What is Recovery Testing ? Confirms that the program recovers from expected or unexpected events without loss of data or functionality. Events can include shortage of disk space, unexpected loss of communication, or power out conditions. What is the Re-testing testing ? Retesting- Again testing the functionality of the application. What is the Regression testing ? Regression- Check that change in code have not effected the working functionality What is Sanity Testing ? Brief test of major functional elements of a piece of software to determine if its basically operational. What is Scalability Testing ? Performance testing focused on ensuring the application under test gracefully handles increases in work load. What is Security Testing ?

Testing which confirms that the program can restrict access to authorized personnel and that the authorized personnel can access the functions available to their security level. What is Stress Testing ? Stress testing is a form of testing that is used to determine the stability of a given system or entity. It involves testing beyond normal operational capacity, often to a breaking point, in order to observe the results. What is Smoke Testing ? A quick-and-dirty test that the major functions of a piece of software work. Originated in the hardware testing practice of turning on a new piece of hardware for the first time and considering it a success if it does not catch on fire. What is Soak Testing ? Running a system at high load for a prolonged period of time. For example, running several times more transactions in an entire day (or night) than would be expected in a busy day, to identify and performance problems that appear after a large number of transactions have been executed. Whats the Usability testing ? Usability testing is for user friendliness. Whats the User acceptance testing ? User acceptance testing is determining if software is satisfactory to an end-user or customer. Whats the Volume Testing ? We can perform the Volume testing, where the system is subjected to large volume of data.