#dbms interview questions
Explore tagged Tumblr posts
Text
Ace your next interview with Hero Vired’s ultimate guide to the Top 100 DBMS Interview Questions and Answers. Designed for aspiring data professionals and seasoned experts alike, this comprehensive resource covers a wide range of critical topics including database design, SQL commands, normalization, indexing, and more.
0 notes
Text
Dbms Full Form: Enhancing Data Structure And Minimizing Redundancy In DBMS
A dbms full form is a logical collection of data. It includes a set of related tables and index spaces. A database frequently stores all of the data related to a particular application or a group of linked applications. A database or an inventory database could be developed. A database management system (or DBMS) is essentially a computerized data storage system. Â
#dbms interview questions#dbms javatpoint#dbms notes#dbms definition#dbms vs rdbms#dbms tutorial#database management system#what is database#dbms full form#dbms#normalization in dbms#acid properties in dbms
0 notes
Text
Top 50 DBMS Interview Questions and Answers | DBMS Interview Preparation | Edureka
MYSQL DBA Certification Training ** This Edureka video on Top 50 DBMS Interview Question … source
0 notes
Text
Top DBMS Interview Questions and Answers
Prepare for your database management system (DBMS) interviews with our comprehensive list of commonly asked questions and expert answers. Ace your next DBMS interview!
0 notes
Text
DBMS Interview Question . . . For more interview questions https://bit.ly/3EEK2sG check the above link
0 notes
Text
Unlock Success: MySQL Interview Questions with Olibr
Introduction
Preparing for a MySQL interview requires a deep understanding of database concepts, SQL queries, optimization techniques, and best practices. Olibr’s experts provide insightful answers to common mysql interview questions, helping candidates showcase their expertise and excel in MySQL interviews.
1. What is MySQL, and how does it differ from other database management systems?
Olibr’s Expert Answer: MySQL is an open-source relational database management system (RDBMS) that uses SQL (Structured Query Language) for managing and manipulating databases. It differs from other DBMS platforms in its open-source nature, scalability, performance optimizations, and extensive community support.
2. Explain the difference between InnoDB and MyISAM storage engines in MySQL.
Olibr’s Expert Answer: InnoDB and MyISAM are two commonly used storage engines in MySQL. InnoDB is transactional and ACID-compliant, supporting features like foreign keys, row-level locking, and crash recovery. MyISAM, on the other hand, is non-transactional, faster for read-heavy workloads, but lacks features such as foreign keys and crash recovery.
3. What are indexes in MySQL, and how do they improve query performance?
Olibr’s Expert Answer: Indexes are data structures that improve query performance by allowing faster retrieval of rows based on indexed columns. They reduce the number of rows MySQL must examine when executing queries, speeding up data retrieval operations, and optimizing database performance.
4. Explain the difference between INNER JOIN and LEFT JOIN in MySQL.
Olibr’s Expert Answer: INNER JOIN and LEFT JOIN are SQL join types used to retrieve data from multiple tables. INNER JOIN returns rows where there is a match in both tables based on the join condition. LEFT JOIN returns all rows from the left table and matching rows from the right table, with NULL values for non-matching rows in the right table.
5. What are the advantages of using stored procedures in MySQL?
Olibr’s Expert Answer: Stored procedures in MySQL offer several advantages, including improved performance due to reduced network traffic, enhanced security by encapsulating SQL logic, code reusability across applications, easier maintenance and updates, and centralized database logic execution.
Conclusion
By mastering these MySQL interview questions and understanding Olibr’s expert answers, candidates can demonstrate their proficiency in MySQL database management, query optimization, and best practices during interviews. Olibr’s insights provide valuable guidance for preparing effectively, showcasing skills, and unlocking success in MySQL-related roles.
2 notes
·
View notes
Text
How to crack a top firm interview
How to crack an top firm interview
Cracking a top firm interview (like Google, McKinsey, FAANG, or Fortune 500 companies) requires strategic preparation, problem-solving skills, and the right mindset. Here’s a step-by-step guide to maximize your chances:
1. Research the Company & Role
✔ Understand the company’s culture, values, and recent news (check their website, LinkedIn, Glassdoor). ✔ Know the job description inside-out—align your skills with their requirements. ✔ Study their interview process (coding rounds, case studies, behavioral questions, etc.).
2. Master Technical & Domain Knowledge
For Tech Companies (FAANG, Startups, etc.)
Data Structures & Algorithms (DSA):
Practice on LeetCode (Medium/Hard), HackerRank, Codeforces.
Focus on arrays, trees, graphs, DP, and system design.
System Design (for experienced candidates):
Learn scalability, caching, databases, microservices.
Study real-world architectures (YouTube, Netflix, Uber).
CS Fundamentals (OS, DBMS, Networking):
Revise threads, deadlocks, SQL vs. NoSQL, TCP/IP.
For Consulting (McKinsey, BCG, Bain)
Case Interviews:
Practice profitability, market entry, M&A cases.
Use frameworks (Porter’s 5 Forces, 4Ps, SWOT).
Mental Math & Guesstimates:
Be quick with percentages, break-even analysis.
For Finance (Goldman Sachs, JP Morgan, etc.)
Financial modeling, valuation (DCF, LBO), market trends.
Brainteasers & probability puzzles.
3. Nail Behavioral Interviews (STAR Method)
Top firms assess soft skills, leadership, and cultural fit.
Use the STAR method (Situation, Task, Action, Result).
Prepare stories for:
Leadership
Conflict resolution
Failure & learning
Teamwork
Common Questions:
"Tell me about yourself."
"Describe a time you failed."
"Why should we hire you?"
4. Mock Interviews & Feedback
Practice with peers or mentors (or platforms like Pramp, Interviewing.io).
Record yourself to improve communication & body language.
Get feedback on weak areas (technical gaps, clarity, confidence).
5. Solve Real Interview Questions
Tech: Check LeetCode Discuss, Glassdoor interview reviews.
Consulting: Use CaseInterview.com, Victor Cheng’s videos.
Finance: Study Wall Street Oasis, Mergers & Inquisitions.
6. Dress & Communicate Professionally
✔ Dress formally (unless told otherwise). ✔ Speak clearly & confidently—avoid filler words ("um," "like"). ✔ Ask smart questions (e.g., "What’s the biggest challenge your team faces?").
7. Handle Stress & Curveball Questions
Stay calm—interviewers test how you think, not just answers.
For tricky questions:
Clarify assumptions
Think aloud
Break problems into steps
8. Follow Up Post-Interview
Send a thank-you email within 24 hours.
Reiterate your interest and key strengths.
Bonus Tips for Top Firms
🚀 Referrals boost chances (use LinkedIn or alumni networks). 🚀 Show passion—top firms want candidates who love their work. 🚀 Be authentic—don’t fake answers; interviewers spot it.
1 note
·
View note
Text
Bank of America (BA) Continuum India Pvt Ltd. Interview Experience

Recently, BA Continuum India visited our campus for recruitment. There were total 4 rounds. Round 1: This round was a general aptitude test, which consisted of 4 different sections: Section – 1: English Proficiency (sentence ordering, paragraph, synonyms, antonyms etc.) Section – 2: Technical MCQs (includes basic C/C++ input output questions, DSA, DBMS, Computer Networks etc.) Section – 3: Quantitative Questions (P & C, Ratio, Percentage, Profit and Loss, Mixtures, Work and Time etc.) Section – 4: Logical Questions (directions, clocks, assertion reasoning, decode patterns etc.) Each section had specific time for it. Round 2: This round was a face […]
0 notes
Text
0 notes
Text
TCS Closed Campus Drive at Shri Ram Group-the Best Engineering College in Jabalpur
Shri Ram Group Jabalpur has recently organized the closed campus drive of Tata Consultancy Services for the 2023-2026 engineering batch students. The closed campus drive has once again made SRIT as one of the top 10 engineering colleges in Jabalpur and highlighted its commitment to provide several career opportunities to the students. Â
Overview and Significance of the TCS Closed Campus Drive
Both open and closed campus recruitment drives play significant roles to provide bright career to engineering students. However, the specialty of a closed campus drive, especially the TCS closed campus drive gives opportunity only to specific B. Tech and M. Tech students to try their luck for job placements. In simple words, the model will benefit both the students and the recruiting officers.

Furthermore, as the best private engineering college in Jabalpur, the placement staff of Shri Ram Group has consistently attracted TCS and other top-tier companies to allow a seamless transition for its B. Tech and M. Tech talents into the competitive IT world. Indeed, the campus drive will let TCS Private Limited to access a few of the best engineering talents of Shri Ram Group. On the other hand, students will undergo a focused recruitment procedure, which ultimately increase their chance to secure a coveted position with the IT and tech giant TCS. Â
Factor Contributing to the Recent TCS Closed Campus Drive
Shri Ram Group Jabalpur, especially its first institute Shri Ram Institute of Technology has always remained in the list of top 5 engineering colleges in Jabalpur. Thanks to its outstanding placement records and academic excellence with experienced faculty members.
Other than that, many reviews and rankings let the institute stand as a leading T-school of the entire Mahakaushal region. Such a reputation has become a key factor to entice multinational companies and global tech giants, including TCS Limited, as they regularly seek institutes producing industry-ready IT professionals.
Key Aspects of the TCS Recruitment Process
The TCS recruitment process involves many rigorous rounds designed primarily to assess the skills, technical and problem-solving abilities, communication skills, and personality of the prospective candidates. The main rounds of the recruitment process are-
Online Assessment via MCQs
To start, TCS with the placement team of SRIT conducts online test consisting of multiple choice-questions. The questions are a combination of logical reasoning, quantitative aptitude, verbal ability, and basic coding skills.
Technical Interview
Technical interview round explores and analyzes the core technical knowledge of the applicants. Here, the interviewers will ask questions based on data structures, programming languages, algorithms, operating systems, DBMS, and similar others.
Managerial Interview
Managerial interview round assesses decision-making and problem-solving skills of an applicant. Such an interview session may even judge the ability of a candidate to handle pressure, and show leadership potential via situational questions.
HR Interview
HR interview is the last interview phase associated with the TCS closed campus drive. This stage evaluates the personality of a candidate based on his/her communication skills, culture, and career aspirations.
Why TCS Closed Campus Drive is a Win-Win Scenario
TCS closed campus drive organized by Shri Ram Group, the best private engineering college in Jabalpur is a win-win scenario. It has offered TCS highly motivated and skilled candidates while the engineering students got a direct pathway to achieve their promising careers with a reputed and global IT company. Indeed, the continuous collaboration of the academic institutions with industry giants will strengthen the entire talent pipeline to contribute to drastic growth in the technology sector.
Overall, TCS campus drive by Shri ram Group has reaffirmed its position as a top-class institution dedicated to shape the bright future of engineering professionals of the entire Mahakaushal region.
#top 10 engineering colleges in jabalpur#best private engineering college in jabalpur#best engineering college in jabalpur#private engineering college in jabalpur#top 5 engineering colleges in jabalpur
0 notes
Text
0 notes
Text
How do I get prepared for TCS technical interview questions?
Cracking the TCS Technical Interview – Here's How to Prepare
If you're getting ready for TCS placements, the first thing you need to understand is the TCS recruitment process. TCS mostly hires through the TCS NQT (National Qualifier Test), and the selection happens in multiple stages.
TCS Recruitment Process
Online Assessment (TCS NQT) This is the first step, where you’ll be tested across several sections:
Numerical Ability – Covers basic math topics like percentages, profit and loss, time and work, etc.
Verbal Ability – Includes English grammar, reading comprehension, sentence correction, and vocabulary.
Reasoning Ability – Focuses on puzzles, sequences, and logical thinking.
Programming Logic – Basic programming concepts such as loops, functions, and conditionals.
Coding Round – You’ll be asked to solve coding problems using C, C++, Java, or Python.
Technical Interview Once you clear the online assessment, you'll move on to the technical interview. This round includes questions on:
Programming languages like C, C++, Java, or Python
Data Structures and Algorithms – Arrays, Linked Lists, Searching, Sorting, and more
Object-Oriented Programming – Classes, Inheritance, Polymorphism, and other core concepts
Database Management – SQL queries, normalization, joins, and other DBMS topics
Managerial and HR Interview These final rounds evaluate your communication skills, attitude, problem-solving approach, and ability to work in a team. You may also be asked about your final year project and previous experiences.
How to Prepare for TCS Interviews
Start with the basics – make sure your programming fundamentals are clear.
Practice coding questions every day to strengthen your logic and problem-solving skills.
Refer to our blog on TCS NQT Coding Questions and Answers 2025 for real practice problems.
If you're aiming for a higher package, check out the TCS NQT Advanced Coding Questions as well.
Prepare well for your final year project – interviewers often ask detailed questions about it.
Taking mock interviews and practice tests can help you gain confidence and improve your performance.
For complete resources, including sample papers and the latest updates, visit our TCS Dashboard here: TCS Dashboard – PrepInsta
Start preparing the smart way and increase your chances of landing the job.
1 note
·
View note
Text
Dbms Full Form: Enhancing Data Structure And Minimizing Redundancy In DBMS
A dbms full form is a logical collection of data. It includes a set of related tables and index spaces. A database frequently stores all of the data related to a particular application or a group of linked applications. A database or an inventory database could be developed. A database management system (or DBMS) is essentially a computerized data storage system. Â

#dbms interview questions#dbms javatpoint#dbms notes#dbms definition#dbms vs rdbms#dbms tutorial#database management system#what is database#dbms full form#dbms#normalization in dbms#acid properties in dbms
1 note
·
View note
Text
Top 20 DBMS Interview Questions & Answers - TCS, Accenture, Capgemini, Infosys, Wipro, Cognizant etc
Top DBMS Interview Questions with Answer for Freshers and Experienced Professionals – Campus Placement Interview … source
0 notes
Text
Top DBMS Interview Questions and Answers
Prepare for your database management system (DBMS) interviews with our comprehensive list of commonly asked questions and expert answers. Ace your next DBMS interview!
0 notes
Text
Java Database Connectivity API contains commonly asked Java interview questions. A good understanding of JDBC API is required to understand and leverage many powerful features of Java technology. Here are few important practical questions and answers which can be asked in a Core Java JDBC interview. Most of the java developers are required to use JDBC API in some type of application. Though its really common, not many people understand the real depth of this powerful java API. Dozens of relational databases are seamlessly connected using java due to the simplicity of this API. To name a few Oracle, MySQL, Postgres and MS SQL are some popular ones. This article is going to cover a lot of general questions and some of the really in-depth ones to. Java Interview Preparation Tips Part 0: Things You Must Know For a Java Interview Part 1: Core Java Interview Questions Part 2: JDBC Interview Questions Part 3: Collections Framework Interview Questions Part 4: Threading Interview Questions Part 5: Serialization Interview Questions Part 6: Classpath Related Questions Part 7: Java Architect Scalability Questions What are available drivers in JDBC? JDBC technology drivers fit into one of four categories: A JDBC-ODBC bridge provides JDBC API access via one or more ODBC drivers. Note that some ODBC native code and in many cases native database client code must be loaded on each client machine that uses this type of driver. Hence, this kind of driver is generally most appropriate when automatic installation and downloading of a Java technology application is not important. A native-API partly Java technology-enabled driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, DB2, or other DBMS. Note that, like the bridge driver, this style of driver requires that some binary code be loaded on each client machine. A net-protocol fully Java technology-enabled driver translates JDBC API calls into a DBMS-independent net protocol which is then translated to a DBMS protocol by a server. This net server middleware is able to connect all of its Java technology-based clients to many different databases. The specific protocol used depends on the vendor. In general, this is the most flexible JDBC API alternative. It is likely that all vendors of this solution will provide products suitable for Intranet use. In order for these products to also support Internet access they must handle the additional requirements for security, access through firewalls, etc., that the Web imposes. Several vendors are adding JDBC technology-based drivers to their existing database middleware products. A native-protocol fully Java technology-enabled driver converts JDBC technology calls into the network protocol used by DBMSs directly. This allows a direct call from the client machine to the DBMS server and is a practical solution for Intranet access. Since many of these protocols are proprietary the database vendors themselves will be the primary source for this style of driver. Several database vendors have these in progress. What are the types of statements in JDBC? the JDBC API has 3 Interfaces, (1. Statement, 2. PreparedStatement, 3. CallableStatement ). The key features of these are as follows: Statement This interface is used for executing a static SQL statement and returning the results it produces. The object of Statement class can be created using Connection.createStatement() method. PreparedStatement A SQL statement is pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times. The object of PreparedStatement class can be created using Connection.prepareStatement() method. This extends Statement interface. CallableStatement This interface is used to execute SQL stored procedures. This extends PreparedStatement interface. The object of CallableStatement class can be created using Connection.prepareCall() method.
What is a stored procedure? How to call stored procedure using JDBC API? Stored procedure is a group of SQL statements that forms a logical unit and performs a particular task. Stored Procedures are used to encapsulate a set of operations or queries to execute on database. Stored procedures can be compiled and executed with different parameters and results and may have any combination of input/output parameters. Stored procedures can be called using CallableStatement class in JDBC API. Below code snippet shows how this can be achieved. CallableStatement cs = con.prepareCall("call MY_STORED_PROC_NAME"); ResultSet rs = cs.executeQuery(); What is Connection pooling? What are the advantages of using a connection pool? Connection Pooling is a technique used for sharing the server resources among requested clients. It was pioneered by database vendors to allow multiple clients to share a cached set of connection objects that provides access to a database. Getting connection and disconnecting are costly operation, which affects the application performance, so we should avoid creating multiple connection during multiple database interactions. A pool contains set of Database connections which are already connected, and any client who wants to use it can take it from pool and when done with using it can be returned back to the pool. Apart from performance this also saves you resources as there may be limited database connections available for your application. How to do database connection using JDBC thin driver ? This is one of the most commonly asked questions from JDBC fundamentals, and knowing all the steps of JDBC connection is important. import java.sql.*; class JDBCTest public static void main (String args []) throws Exception //Load driver class Class.forName ("oracle.jdbc.driver.OracleDriver"); //Create connection Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@hostname:1526:testdb", "scott", "tiger"); // @machineName:port:SID, userid, password Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("select 'Hi' from dual"); while (rs.next()) System.out.println (rs.getString(1)); // Print col 1 => Hi stmt.close(); What does Class.forName() method do? Method forName() is a static method of java.lang.Class. This can be used to dynamically load a class at run-time. Class.forName() loads the class if its not already loaded. It also executes the static block of loaded class. Then this method returns an instance of the loaded class. So a call to Class.forName('MyClass') is going to do following - Load the class MyClass. - Execute any static block code of MyClass. - Return an instance of MyClass. JDBC Driver loading using Class.forName is a good example of best use of this method. The driver loading is done like this Class.forName("org.mysql.Driver"); All JDBC Drivers have a static block that registers itself with DriverManager and DriverManager has static initializer method registerDriver() which can be called in a static blocks of Driver class. A MySQL JDBC Driver has a static initializer which looks like this: static try java.sql.DriverManager.registerDriver(new Driver()); catch (SQLException E) throw new RuntimeException("Can't register driver!"); Class.forName() loads driver class and executes the static block and the Driver registers itself with the DriverManager. Which one will you use Statement or PreparedStatement? Or Which one to use when (Statement/PreparedStatement)? Compare PreparedStatement vs Statement. By Java API definitions: Statement is a object used for executing a static SQL statement and returning the results it produces. PreparedStatement is a SQL statement which is precompiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times. There are few advantages of using PreparedStatements over Statements
Since its pre-compiled, Executing the same query multiple times in loop, binding different parameter values each time is faster. (What does pre-compiled statement means? The prepared statement(pre-compiled) concept is not specific to Java, it is a database concept. Statement precompiling means: when you execute a SQL query, database server will prepare a execution plan before executing the actual query, this execution plan will be cached at database server for further execution.) In PreparedStatement the setDate()/setString() methods can be used to escape dates and strings properly, in a database-independent way. SQL injection attacks on a system are virtually impossible when using PreparedStatements. What does setAutoCommit(false) do? A JDBC connection is created in auto-commit mode by default. This means that each individual SQL statement is treated as a transaction and will be automatically committed as soon as it is executed. If you require two or more statements to be grouped into a transaction then you need to disable auto-commit mode using below command con.setAutoCommit(false); Once auto-commit mode is disabled, no SQL statements will be committed until you explicitly call the commit method. A Simple transaction with use of autocommit flag is demonstrated below. con.setAutoCommit(false); PreparedStatement updateStmt = con.prepareStatement( "UPDATE EMPLOYEE SET SALARY = ? WHERE EMP_NAME LIKE ?"); updateStmt.setInt(1, 5000); updateSales.setString(2, "Jack"); updateStmt.executeUpdate(); updateStmt.setInt(1, 6000); updateSales.setString(2, "Tom"); updateStmt.executeUpdate(); con.commit(); con.setAutoCommit(true); What are database warnings and How can I handle database warnings in JDBC? Warnings are issued by database to notify user of a problem which may not be very severe. Database warnings do not stop the execution of SQL statements. In JDBC SQLWarning is an exception that provides information on database access warnings. Warnings are silently chained to the object whose method caused it to be reported. Warnings may be retrieved from Connection, Statement, and ResultSet objects. Handling SQLWarning from connection object //Retrieving warning from connection object SQLWarning warning = conn.getWarnings(); //Retrieving next warning from warning object itself SQLWarning nextWarning = warning.getNextWarning(); //Clear all warnings reported for this Connection object. conn.clearWarnings(); Handling SQLWarning from Statement object //Retrieving warning from statement object stmt.getWarnings(); //Retrieving next warning from warning object itself SQLWarning nextWarning = warning.getNextWarning(); //Clear all warnings reported for this Statement object. stmt.clearWarnings(); Handling SQLWarning from ResultSet object //Retrieving warning from resultset object rs.getWarnings(); //Retrieving next warning from warning object itself SQLWarning nextWarning = warning.getNextWarning(); //Clear all warnings reported for this resultset object. rs.clearWarnings(); The call to getWarnings() method in any of above way retrieves the first warning reported by calls on this object. If there is more than one warning, subsequent warnings will be chained to the first one and can be retrieved by calling the method SQLWarning.getNextWarning on the warning that was retrieved previously. A call to clearWarnings() method clears all warnings reported for this object. After a call to this method, the method getWarnings returns null until a new warning is reported for this object. Trying to call getWarning() on a connection after it has been closed will cause an SQLException to be thrown. Similarly, trying to retrieve a warning on a statement after it has been closed or on a result set after it has been closed will cause an SQLException to be thrown. Note that closing a statement also closes a result set that it might have produced. What is Metadata and why should I use it?
JDBC API has 2 Metadata interfaces DatabaseMetaData & ResultSetMetaData. The DatabaseMetaData provides Comprehensive information about the database as a whole. This interface is implemented by driver vendors to let users know the capabilities of a Database Management System (DBMS) in combination with the driver based on JDBC technology ("JDBC driver") that is used with it. Below is a sample code which demonstrates how we can use the DatabaseMetaData DatabaseMetaData md = conn.getMetaData(); System.out.println("Database Name: " + md.getDatabaseProductName()); System.out.println("Database Version: " + md.getDatabaseProductVersion()); System.out.println("Driver Name: " + md.getDriverName()); System.out.println("Driver Version: " + md.getDriverVersion()); The ResultSetMetaData is an object that can be used to get information about the types and properties of the columns in a ResultSet object. Use DatabaseMetaData to find information about your database, such as its capabilities and structure. Use ResultSetMetaData to find information about the results of an SQL query, such as size and types of columns. Below a sample code which demonstrates how we can use the ResultSetMetaData ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2"); ResultSetMetaData rsmd = rs.getMetaData(); int numberOfColumns = rsmd.getColumnCount(); boolean b = rsmd.isSearchable(1); What is RowSet? or What is the difference between RowSet and ResultSet? or Why do we need RowSet? or What are the advantages of using RowSet over ResultSet? RowSet is a interface that adds support to the JDBC API for the JavaBeans component model. A rowset, which can be used as a JavaBeans component in a visual Bean development environment, can be created and configured at design time and executed at run time. The RowSet interface provides a set of JavaBeans properties that allow a RowSet instance to be configured to connect to a JDBC data source and read some data from the data source. A group of setter methods (setInt, setBytes, setString, and so on) provide a way to pass input parameters to a rowset's command property. This command is the SQL query the rowset uses when it gets its data from a relational database, which is generally the case. Rowsets are easy to use since the RowSet interface extends the standard java.sql.ResultSet interface so it has all the methods of ResultSet. There are two clear advantages of using RowSet over ResultSet RowSet makes it possible to use the ResultSet object as a JavaBeans component. As a consequence, a result set can, for example, be a component in a Swing application. RowSet be used to make a ResultSet object scrollable and updatable. All RowSet objects are by default scrollable and updatable. If the driver and database being used do not support scrolling and/or updating of result sets, an application can populate a RowSet object implementation (e.g. JdbcRowSet) with the data of a ResultSet object and then operate on the RowSet object as if it were the ResultSet object. What is a connected RowSet? or What is the difference between connected RowSet and disconnected RowSet? or Connected vs Disconnected RowSet, which one should I use and when? Connected RowSet A RowSet object may make a connection with a data source and maintain that connection throughout its life cycle, in which case it is called a connected rowset. A rowset may also make a connection with a data source, get data from it, and then close the connection. Such a rowset is called a disconnected rowset. A disconnected rowset may make changes to its data while it is disconnected and then send the changes back to the original source of the data, but it must reestablish a connection to do so. Example of Connected RowSet: A JdbcRowSet object is a example of connected RowSet, which means it continually maintains its connection to a database using a JDBC technology-enabled driver. Disconnected RowSet A disconnected rowset may have a reader (a RowSetReader object) and a writer (a RowSetWriter object) associated with it.
The reader may be implemented in many different ways to populate a rowset with data, including getting data from a non-relational data source. The writer can also be implemented in many different ways to propagate changes made to the rowset's data back to the underlying data source. Example of Disconnected RowSet: A CachedRowSet object is a example of disconnected rowset, which means that it makes use of a connection to its data source only briefly. It connects to its data source while it is reading data to populate itself with rows and again while it is propagating changes back to its underlying data source. The rest of the time, a CachedRowSet object is disconnected, including while its data is being modified. Being disconnected makes a RowSet object much leaner and therefore much easier to pass to another component. For example, a disconnected RowSet object can be serialized and passed over the wire to a thin client such as a personal digital assistant (PDA). What is the benefit of having JdbcRowSet implementation? Why do we need a JdbcRowSet like wrapper around ResultSet? The JdbcRowSet implementation is a wrapper around a ResultSet object that has following advantages over ResultSet This implementation makes it possible to use the ResultSet object as a JavaBeans component. A JdbcRowSet can be used as a JavaBeans component in a visual Bean development environment, can be created and configured at design time and executed at run time. It can be used to make a ResultSet object scrollable and updatable. All RowSet objects are by default scrollable and updatable. If the driver and database being used do not support scrolling and/or updating of result sets, an application can populate a JdbcRowSet object with the data of a ResultSet object and then operate on the JdbcRowSet object as if it were the ResultSet object. Can you think of a questions which is not part of this post? Please don't forget to share it with me in comments section & I will try to include it in the list.
0 notes