0% found this document useful (0 votes)
7 views5 pages

Viva Questions Answers

The document provides answers to various questions related to Database Management Systems (DBMS) and Java programming. It covers topics such as advantages of DBMS, types of keys, SQL data types, constraints, user types, Java features, and error handling. Additionally, it includes details on variable naming rules, loops, arrays, and Java's platform independence.

Uploaded by

Alok Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views5 pages

Viva Questions Answers

The document provides answers to various questions related to Database Management Systems (DBMS) and Java programming. It covers topics such as advantages of DBMS, types of keys, SQL data types, constraints, user types, Java features, and error handling. Additionally, it includes details on variable naming rules, loops, arrays, and Java's platform independence.

Uploaded by

Alok Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Answers to Viva Questions

1. Why we use DBMS over flat files?

DBMS provides efficient data storage, retrieval, and manipulation. It ensures

data integrity, reduces redundancy, and allows for concurrent access and

security.

2. What are the advantages of DBMS files?

- Data consistency and integrity

- Reduced data redundancy

- Enhanced security

- Concurrent access by multiple users

- Data recovery and backup

3. What are the different types of keys in SQL?

- Primary Key

- Foreign Key

- Unique Key

- Composite Key

- Candidate Key

4. SQL stands for: Structured Query Language.

5. What are the different types of data types in SQL?

- Numeric types: INT, FLOAT, DECIMAL

- Character types: CHAR, VARCHAR

- Date/Time types: DATE, TIME, TIMESTAMP


- Boolean type: TRUE/FALSE

6. Difference between CHAR and VARCHAR datatype?

- CHAR: Fixed-length data type. Always occupies the specified length,

regardless of the actual data size.

- VARCHAR: Variable-length data type. Occupies only the length of the data

stored.

7. Why we use constraints in DBMS?

Constraints ensure data validity, integrity, and consistency in the database.

8. What are the different types of constraints in DBMS?

- NOT NULL

- UNIQUE

- PRIMARY KEY

- FOREIGN KEY

- CHECK

9. How many types of user in DBMS?

- Database Administrator (DBA)

- Developers

- End Users

10. Tell some examples of DDL, DML commands.

- DDL: CREATE, ALTER, DROP

- DML: SELECT, INSERT, UPDATE, DELETE


11. Tell me the name of some aggregate functions.

- SUM()

- AVG()

- COUNT()

- MAX()

- MIN()

12. Why Java is called platform-independent?

Java is platform-independent because it uses the JVM (Java Virtual Machine)

to run programs, which makes Java code executable on any system with a JVM.

13. Exception 2nd of Java programming:

Likely refers to exceptions in Java, such as NullPointerException,

ArrayIndexOutOfBoundsException, etc.

14. What are rules for naming variables in Java?

- Should start with a letter or $ or _.

- Cannot use reserved keywords.

- Must not contain spaces.

15. What are the different types of data types in Java?

- Primitive types: int, float, double, char, boolean, etc.

- Reference types: Strings, Arrays, Objects.

16. What are the features of Java programming?

- Object-oriented

- Platform-independent
- Secure

- Robust

- Multithreaded

17. What is the difference between while loop and for loop?

- while loop: Executes until a condition is false, used when the number of

iterations is not known.

- for loop: Used when the number of iterations is known.

18. What is an array?

An array is a collection of elements of the same data type stored in

contiguous memory locations.

19. What is garbage collector in Java?

A garbage collector automatically deallocates memory by removing objects

no longer referenced in the program.

20. What is a comment in Java?

Comments are non-executable lines in the code used for documentation.

- Single-line: //

- Multi-line: /* */

21. What do you mean by robust?

Robustness refers to the ability of Java to handle errors efficiently and

continue running.

22. /*------*/ and // is type of?


These are types of comments in Java.

23. Difference between print and println command?

- print: Prints without a newline.

- println: Prints with a newline at the end.

24. Who is called father of Java?

James Gosling.

25. WORA stands for: Write Once, Run Anywhere.

26. What is the slogan of Java program?

WORA (Write Once, Run Anywhere).

27. Some question may ask from Employability Skill:

Likely includes questions on communication, teamwork, problem-solving,

etc.

28. What is the difference between syntax errors and runtime errors?

- Syntax errors: Errors in code structure that prevent compilation.

- Runtime errors: Errors that occur while the program is running.

You might also like