Database Interview Questions
- 0of 0 votes
AnswerExplain Indexing, Mining algorithms, Joins, SQL
- bizz March 04, 2010| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Database - 0of 0 votes
Answers1) Bus route Database -
- dpka February 25, 2010
I want to design a database about bus route of a city like bangalore. Where u know all bus stop name and need a DB such that it will be easy to add new bus stop in our list. We would like to handle two kind of queries a) user will give route number ......we have to retrieve whole route i.e we have to print all the bus stop where this bus will stop and b) user will give source(S) and destination(D) name .....we have to find all possible route number that a person can take to reach D from S considering one case where we dont have direct connectivity from S to D so it should show via routes as well like the results of makemytrip.com or yatra.com when u want to travel from bangalore to guwahati ..though no direct flight is there we will get some via list. Also DB should be easily expandable (ie their should be some easy way of adding new routes and stops).| Report Duplicate | Flag | PURGE
Database - 0of 0 votes
AnswerWhat is the best way to handle distributed databases and to merge their results ??
- micscopb February 02, 2010| Report Duplicate | Flag | PURGE
Siemens Financial Software Developer Database - 0of 0 votes
Answerswhat is left outer join.
- myanything February 02, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Database - 0of 0 votes
AnswersDesign a ER model for university system? consider you are designing a db that will be hosted by us and any university can use it and we will host the database for them. design in such a way that we do not have separate db for each univ? etc. etc.
- G January 29, 2010| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Database - 0of 0 votes
AnswersFor those candidates who know SQL: There is a table with
- Thomas January 03, 2010
gene_ids ('gid') and clone_ids ('cid'). Each gene only resides on a
single clone and each clone may contain multiple genes. How do would
you find how many genes are on each and every clone? Please provide the
SQL.| Report Duplicate | Flag | PURGE
Software Engineer / Developer Database - 0of 0 votes
AnswersWhat is groupby?
- ramesh.chettu20 December 23, 2009| Report Duplicate | Flag | PURGE
Cisco Systems System Administrator Database - 0of 0 votes
AnswersAbout databases : primary keys, composite keys, table joins , relations
- emma December 22, 2009| Report Duplicate | Flag | PURGE
Sonoa Systems Testing / Quality Assurance Database - 0of 0 votes
AnswersTable CustomerOrder, columns customerid, orderid, orderdate.
- chris gayle vvs laakmann December 16, 2009
Give a query for customers that placed orders today
Query to get the day in the last 30 days with the most orders
What is an index?
Why not add an index to all the columns?
What data structure to store index data?
Why a btree?
* Employees
o id
o name
o department_id
o start_date
o salary
* Departments
o id
o department
get max salary
get all names and dept
get dept that spends most on salary:
Write a program/script to find a file in the current directory and sub-directories, tools like find and grep are missing.| Report Duplicate | Flag | PURGE
Amazon Development Support Engineer Database - 0of 0 votes
AnswersSQL: Retrieve second highest salary and the corresponding Employee Id from a Employee_Salary table.
- Anonymous November 26, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Database - 0of 0 votes
AnswersSQL: A table has only one column. Retrieve all the data which are different from their previous data.
- Anonymous November 26, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Database - 0of 0 votes
AnswerER diagram for a company which has people and professionals, investments in other companies
- zulu September 27, 2009| Report Duplicate | Flag | PURGE
CapitalIQ Software Engineer / Developer Database - 0of 0 votes
AnswersGiven a table: CustomerOrders:
- Kunzi July 29, 2009
Customer Orders
-------------------------------
Customer ID | Order ID | Order Date
1. Write a SQL to find all customers who has placed an order today.
2. Write a SQL to find all customers who has placed an order today AND yesterday.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Database - 0of 0 votes
AnswersGiven the below table:
LEDGER ID VARCHAR(11) PRI Month VARCHAR(2) Year VARCHAR(4) Amount REAL
Compose the query that will output the report in the following format:
Year 1980 1981 1982 ...................2009 Jan $$ $$ Feb Mar .. . . . Oct Nov Dec
Where $ if the total Amount for a given Month
- Anonymous July 03, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Database - 0of 0 votes
AnswersHow will u find the highest and second highest salary in each group using a single SQL query ?
- Ankit June 24, 2009| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Database - 0of 0 votes
AnswersGiven the following MySQL table schema, write a query to return the employee with the 7th highest salary.
CREATE TABLE `employee_salary` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`salary` decimal(10,2) NOT NULL,
PRIMARY KEY (`id`),
KEY `IDX_salary` (`salary`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
My Answer:SELECT name, salary FROM ( SELECT name, salary FROM Employees ORDER BY salary, desc ) WHERE ROWNUM >=3 and ROWNUM <=7
something like that....
- Silvimass May 27, 2009
here is the discription
http://coldfusion.sys-con.com/node/43794| Report Duplicate | Flag | PURGE
Amazon Web Developer Database - 0of 0 votes
AnswersDesign an inventory tracking system using database tables. Customers, inventory, and orders are tracked.
- ThatDude April 20, 2009
Then, write a query to find an order when you only have a lastname| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Database - 0of 0 votes
AnswersWhat is a join? What are the kinds of joins?
- webchic April 06, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Database - 0of 0 votes
AnswersWhat is a fact table and dimension table?
- Varsha March 08, 2009| Report Duplicate | Flag | PURGE
Goldman Sachs Financial Software Developer Database - 0of 0 votes
Answerswrite a sql to find all the duplicate email address in a table which contains only one column "email"
- Mo February 28, 2009| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Database - 0of 0 votes
AnswersThere is a table with 3 columns. Test ( Id, Col1, Col2) . Id column is identifier. Col1 and Col2 are varchar type. How will you insert N records in to the table with time complexity less than O(N)???
- Sadineni.Venkat February 28, 2009| Report Duplicate | Flag | PURGE
JP Morgan Software Engineer / Developer Database - 0of 0 votes
AnswerQuestion involved indexing from DBMS.
- Prashi December 20, 2008
Given a set of attributes how will you improve the retrieval time for a query involving these attributes.
-> You are allowed to change the physical storage
-> You can create index files
-> You need to minimize block accesses and memory used.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Database - 0of 0 votes
AnswersHow would you save a graph to a database?
- Anonymous November 11, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Database Data Structures - 0of 0 votes
AnswersWhat is Normalization? And what is First Norm Form:
- Anonymous October 16, 2008
Eliminate duplicative columns from the same table.
Create separate tables for each group of related data and identify each row with a unique column (the primary key).| Report Duplicate | Flag | PURGE
Database - 0of 0 votes
AnswerWhat is "group by"?
- The Hercules September 01, 2008| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Database - 0of 0 votes
AnswerDifference between inner join & outer join
- The Hercules September 01, 2008| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Database - 0of 0 votes
AnswersYou are given a table containing projectname, startdate, end date. You have another table containing projname, developername, testername are given as on mar 24. The project can be in any of the three states: planned, coding in progress, delivered(given to testers). Draw a chart showing the project state per developer as on mar 26
- ns August 26, 2008| Report Duplicate | Flag | PURGE
Microsoft Program Manager Database