Questions tagged [interview-question]

Good questions for interviews - should be open-ended with a number of possible answers, of which the best (or least-worst) depending on the situation, available resources, project requirements, etc, is the best one.

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

Database design for ID (RFID) card access

One of the system design interview questions I got many years ago was to design an ID (RFID) card access system. I don't remember how I answered the question back then but I attempted a solution ...
Andrew Cheong's user avatar
6 votes
1 answer
1k views

How do I write a query that places passengers on buses if there is capacity?

Buses and passengers arrive at a station. If a bus arrives at the station at a time tbus and a passenger arrives at a time tpassenger where tpassenger <= tbus, then the passenger will attempt to ...
Rishav Ghosh's user avatar
2 votes
1 answer
34 views

Performing SQL string manipulations on a single column

I recently came across a problem at an interview which I wasn't able to answer. The ask was to write some SQL fetch the first three number(s) after crossing two 2 decimals. For example: Input table: ...
Rachit Singh's user avatar
0 votes
1 answer
314 views

List population of provices (SQL Query)

I was asked this question in an interview and I could not get my mind around it, and now it is bothering me a lot! If you have a table CANADA(PROVINCE, CITY, POPULATION). - Population is correlated ...
Gowtham Mohan's user avatar
0 votes
2 answers
112 views

SQL Login cannot connect to Database

Recently I attended one interview and this was the question: Many Users reported that they are not able to connect to server.Where as I can connect to server. My Answer : I will check out their ...
Learning_Learning's user avatar
8 votes
6 answers
16k views

How can I display twice each stored row without using UNION ALL or a temporary table?

The relevant table, named emp, holds the following data: CREATE TEMPORARY TABLE emp AS SELECT * FROM ( VALUES (1,'A'), (2,'B'), (3,'C') ); ID Name -- ---- 1 A 2 B 3 C And the output ...
Anup's user avatar
  • 89
2 votes
1 answer
213 views

Troubleshoot corruption in SQL Server Database [closed]

I have been asked by my interviewer "How do you troubleshoot corrupted data in SQL in SQL Server 2012?"
Naseer Aryobee's user avatar
11 votes
2 answers
112k views

Efficient way to join two tables with one to many relationship

This is interview question asked to me in interview and i was not able to answer. Please help.. What is the most efficient way to join two table with one to many relationship between them
user3678399's user avatar
1 vote
0 answers
56 views

Disable the Task action button

How can I disable the "Tasks ->" button in SQL Server Management Studio? I need to prevent users scripting objects.
raju's user avatar
  • 11
19 votes
2 answers
2k views

Interview SQL question

Given a table 'employees' employee_id | salary | department_id -------------+--------+--------------- Only using SQL find all the variants of employee-transfers from one department to another, so ...
Alexander's user avatar
  • 353
13 votes
3 answers
64k views

I Want to Become a Database Administrator - How Can I Start? [closed]

I just took a database course in my college and found it fascinating. I want to learn more in this field, but I feel a bit lost with how to start. How do I become a database administrator? What are ...
user30622's user avatar
  • 131
2 votes
3 answers
8k views

Recovering a lost datafile with no backup available

How do you recover a lost datafile if: the database is running in archivelog mode there is no backup is available
Javed Sayed's user avatar
2 votes
1 answer
3k views

Recovering from the loss of datafile in NOARCHIVELOG mode?

How do you recover from the loss of datafile if the database is running in NOARCHIVELOG mode?
Javed Sayed's user avatar
10 votes
4 answers
7k views

What should I ask at a MySQL DBA interview?

I am a software developer and am helping my team hire a MySQL DBA. The core challenges that we are facing are: Slower queries and performance due to Hibernate. Database management (backups, tuning, ...
geoaxis's user avatar
  • 1,747
6 votes
8 answers
43k views

What is Atomic Relation in First Normal Form

I have read the definition of 1NF which is, "If each attribute of relation is atomic". Please tell me what is Atomic.
Siddiqui's user avatar
  • 171
2 votes
1 answer
648 views

Recover Oracle database after drive loss Interview Question

How would you answer this as an interview question? The database crashed and you lost a drive containing one of your control files and another drive containing an entire redo log group. You ...
Leigh Riffel's user avatar
  • 23.8k
15 votes
2 answers
8k views

What is a Clustered Index?

I need a short explaining of clustered index. What is a clustered index? What are best practices for using the clustered index?
Amir Rezaei's user avatar