Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

Database Management System Interview Questions and Answers For Freshers and Experience Part-7

Be First!

database61. Why is XML a better markup language than HTML?
XML is a better markup language than HTML, primarily because XML provides a clear separation between document structure, content, and materialization. Symbols cannot be used ambiguously with XML.
62. What are the two means to describe the content of XML documents?
DTD (Document Type Declarations) and XML Schemas. An XML document that conforms to its DTD is called type-valid. A document can be well-formed and not be type-valid, either because it violates the structure of its DTD or because it has no DTD. However, DTDs have limitations and to overcome these limits XML Schemas were created. XML Schemas are XML documents that are the preferred method for defining document structure.

63. What is the difference between simple elements and complexType elements?
Simple elements have only one data value. ComplexType elements can have multiple elements nested within them. ComplexTypes may also have attributes. The elements contained in a complexType may be simple or other complexTypes. ComplexTypes may also define element sequences.

64. What is ADO.NET?

ADO.NET is a new, improved, and greatly expanded version of ADO that was developed for the Microsoft .NET initiative. ADO.NET incorporates all of the functionality of ADO, but adds much more. In particular, ADO.NET facilitates the transformation of XML documents to and from database data. Most importantly, ADO.NET introduces the concept of datasets, which are in-memory, full-function, independent databases.

65. What is a dataset?
A dataset is an in-memory database that is disconnected from any regular database, but has all the important characteristics of a regular database. Datasets can have multiple tables, relationships, referential integrity rules, referential integrity actions, views and the equivalent of triggers. Datasets are needed to provide a standardized, non-proprietary means to process database views. They are especially important for the processing of views with multiple multivalued paths.

66. Briefly describe the four JDBC driver types that Sun defines.
Type 1 drivers provide a bridge between Java and ODBC. Types 2-4 drivers are written entirely in Java, but differ as to how they connect to the DBMS. Type 2 drivers rely on the DBMS product for intermachine communication, if any. Type 3 drivers translate JDBC calls into a DBMS-independent network protocol. Type 4 drivers translate JDBC calls into a DBMS-dependent network protocol.

67. What is the difference between a Java servlet and a Java applet?
An applet is a compiled Java bytecode program that is transmitted to a browser via HTTP and is invoked using the HTTP protocol on the user’s workstation. A servlet is a Java program that is invoked on the server to respond to HTTP requests.
68. What is the coding pattern for using a JDBC driver?
1. Load the driver.
2. Establish a connection to the database.
3. Create a statement.
4. Do something with the statement.

69. What is a Java bean?
A Java bean is a Java class that has the following three properties. (1) There are no public instance variables. (2) All persistent values are accessed using methods named getxxx and setxxx. (3) The bean class must either have no constructors or it must have one explicitly defined zero-argument constructor.

70. How are surrogate keys and metadata handled in MySQL?

MySQL uses integer data types combined with the property AUTO_INCREMENT to create surrogate keys. This creates a sequence that starts at one (1) and increases by one (1) for each new record. MySql maintain its metadata in a database named mysql. For example, this database maintains two tables named user and db.

(61)

Previous
Next

Leave a Reply