Sunday, October 18, 2009

XML_Interview_questions

XML Parsers
What are the different kind of parsers used in XML?
Latest Answer: XML Parser is nothing but a interface between user and XML Document. XML Parsers are divided into 2 types1) DOM (Document Object Module)2) SAX (Simple API for XML) ...
________________________________________
XPath
What is XPath?
Latest Answer: XPath describes where the items are located in a xml files For ExampleXYZ----path for this is employees/name 3 rd mg road ---path--employees/address/street ...
________________________________________
Why this parser needed exactly over Html or Jsp pages
Why this parser needed exactly over Html or Jsp pages, These two are enough for viewing the page. Can I know more sophisticated reasons from u?
SqlConnectionClass
which of the following is correct Q) ReadXml method belongs to the class of .............. NameSpacea)System.Datab)System.Data.SqlClientc)System.xmldSystem.Data.xml
Latest Answer: System.Data ...
________________________________________
Difference between XML and HTML
Write five difference between XML and HTML
Latest Answer: 1) XML is not a replacement for HTML. 2) XML and HTML were designed with different goals. 3) XML was designed to describe data and to focus on what data is. 4) HTML was designed to display data and to focus on how data looks. 5) HTML is about displaying ...

XML and Binary Serialization
What is XML Serialization and Binary Serialization? Where it actually used?
Latest Answer: Adding to above responses, XMLSerialization is called Shallow Serialization because it can serialize only public fieldsSoap Serialization and Binary Serialization techniques are called Deep Serialization because it serialize the object containing reference ...
________________________________________
XML to Oracle
How do you load data from XML file to a ORACLE table?
Latest Answer: This is from XML to sqlserverexce sp_xml_preparedocument @inthandle int output,@xmldocumentselect * from openxml(@inthandle,'/root/customer',2)with (customerid varchar(10), contactname varchar(20))exec sp_xml_removedocument ...

When there is HTML for presentation why are you going for XML?
Latest Answer: XML and HTML were designed with different goals: XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks.That is HTML is about displaying information, while XML is about describing ...

What are the different kinds of tags available in XML?
Latest Answer: In XML all the tags are user defined only. ...
________________________________________
What is a Processing Instruction in XML?
Latest Answer: An XML file can also contain processing instructions that give commands or information to an application that is processing the XML data. Processing instructions have the following format: target is the name of the ...
________________________________________
What is the use of "?
Latest Answer: XML Prolog: The XML declaration is essentially the same as the HTML header, , except that it uses and it may contain the following attributes: version: Identifies the version of the XML markup language used in the data. ...
________________________________________
What are the rules for making a tag name in XML?
Latest Answer: Rules for making a tag name are1.It should start with a letter or underscore(_)2.There are no reserved words , but however xml(in any case) should not be used as a tag name3.It can include digits, hyphen,periods, ':' can be used but best ...
________________________________________
What is a CDATA section in XML?
Latest Answer: CDATA is used to store plain text or string values. It is commonly used with implied attributes, which allows user to define their own values. For example, ...

________________________________________
Where is Schemas specified in XML?
Latest Answer: static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema"; Next, you ...

Why is XML referred as self-describing data?
Latest Answer: XML tags are not defined. XML uses DTD or schema to describe the data.becoz of DTD and schema it is self-descriptive. ...
________________________________________
What is the notation used for defining an empty XML element?
Latest Answer: eg. Now type can store empty elements in it. ...
________________________________________
What is the use of xml.onload property?
Latest Answer: The element defines a script to be executed when the AppML application loads in a browser.Used in conjunction with the form element. ...
________________________________________
What is entity referencing?
Latest Answer: Referencing the entity by name causes it to be inserted into the document in place of the entity reference. To create an entity reference, the entity name is surrounded by an ampersand and a semicolon, like this: &entityName; ...

How would you do XML testing of two incompatible systems in web application processing.How to test the
How would you do XML testing of two incompatible systems in web application processing.How to test the request and response of a web application.
How do you say XML is secured language on the information exchange over the network?
Latest Answer: Actually it isnt. XML may be eay to write and even parse, but the use of XML as a medium of B2B data interchange is still bleak. XML is used mainly for Application integration as it is just within the organisation and where major security issues will ...
1)which .net host doesn't support application domain a)iis b)INTERNET explorer c)shell executable
1)which .net host doesn't support application domain a)iis b)INTERNET explorer c)shell executable d)asp.net 2)in .net there is no deterministic destruction true/false 3).net runtime is having -------- type(s) of isolation4)how to implement 2 connect 2 a proxy with a remote service Please give me reply. 5)ow can we include unmanaged code into .net?
Other than XML/XSLT, what are other web services.
Latest Answer: i can explain this in detail. . First XML and XSLT are not webservices. . Webservices means any kind of service (functionality) that can be accessed by open std protocols like SOAP,WSDL and UDDI. And the basic platform is provided by HTTP and XML.. ...
How can you create an XML file?
Latest Answer: You can also create an XML file through the Java XML APIs and some simple Java.io File writer methods. Use the appendChild() method in the Node class for creating the tree structure of an XML. Use the FileWriter methods to save it into a file. ...
When a XML file has a DTD declared which is not accessible to the parser, what would happen?
Latest Answer: DTD is must. if the file is not found at location specified you will get following errorjava.io.FileNotFoundException: ....AddrBook.dtd (The system cannot find the file specified)       at org.apache.crimson.parser.Parser2.fatal(Unknown Source)       ...
What parser would you use for searching a huge XML file?
Latest Answer: Yes, SAX parser is better for huge XML files. ...
What are the differences between SAX and DOM parsers?
Latest Answer: The main difference between DOM and SAX is in the representation of the XML document they use. DOM uses an in-memory tree-like structure, whereas, SAX uses linear event driven approach. ...
What is a schema? What are the limitations of a DTD?
Latest Answer: Schema represents the Grammar of XMl document instanace used by Parser to check the well formed ness and validition of XML document instance with respect to schema we defined.In case of DTD it wont allow us to define our own datatype mean creating our ...
=============================================================================================================================



1. http://www.techinterviews.com/xml-interview-questionsWhat is the difference between SAX parser and DOM parser?
DOM:
creates an internal representation of an XML document
-Nice for smaller XML files, but because of the whole XML file
representation is in memory, it is possible not useful for
very large documents
-good for representation of an XML document.

SAX:
Event driven, so reacting when it finds certain elements in the XML
code (e.g. tags,
properties, …)
goes from top to bottom, and if it encounters
e.g. begintag, it fires an event.
e.g. end tag, it fires and event.
e.g. begin of file, it fires an event
1. 1.
DOM parser - reads the whole XML document and returns a DOM tree representation of xml document. It provides a convenient way for reading, analyzing and manipulating XML files. It is not well suited for large xml files, as it always reads the whole file before processing.
SAX parser - works incrementally and generate events that are passed to the application. It does not generate data representation of xml content so some programming is required. However, it provides stream processing and partial processing which cannot be done alone by DOM parser.
1. What is Xpath?
XPath is used to navigate through elements and attributes in an XML document
1. What is XSL?
XSLT - a language for transforming XML documents
XSLT is used to transform an XML document into another XML document, or another type of document that is recognized by a browser, like HTML and XHTML. Normally XSLT does this by transforming each XML element into an (X)HTML element.
XPath - a language for navigating in XML documents
XSL-FO - a language for formatting XML documents
1. A DTD is:
The XML Document Type Declaration contains or points to markup declarations that provide a grammar for a class of documents. This grammar is known as a document type definition or DTD.
The DTD can point to an external subset containing markup declarations, or can contain the markup declarations directly in an internal subset, or can even do both.
A Schema is:
XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents.
In summary, schemas are a richer and more powerful of describing information than what is possible with DTDs.
1. How Schemas Differ from DTDs
The first, and probably most significant, difference between XML Schemas and XML DTDs is that XML Schemas use XML document syntax. While transforming the syntax to XML doesn’t automatically improve the quality of the description, it does make those descriptions far more extensible than they were in the original DTD syntax. Declarations can have richer and more complex internal structures than declarations in DTDs, and schema designers can take advantage of XML’s containment hierarchies to add extra information where appropriate — even sophisticated information like documentation. There are a few other benefits from this approach. XML Schemas can be stored along with other XML documents in XML-oriented data stores, referenced, and even styled, using tools like XLink, XPointer, and XSL.
The largest addition XML Schemas provide to the functionality of the descriptions is a vastly improved data typing system. XML Schemas provide data-oriented data types in addition to the more document-oriented data types XML 1.0 DTDs support, making XML more suitable for data interchange applications. Built-in datatypes include strings, booleans, and time values, and the XML Schemas draft provides a mechanism for generating additional data types. Using that system, the draft provides support for all of the XML 1.0 data types (NMTOKENS, IDREFS, etc.) as well as data-specific types like decimal, integer, date, and time. Using XML Schemas, developers can build their own libraries of easily interchanged data types and use them inside schemas or across multiple schemas.
The current draft of XML Schemas also uses a very different style for declaring elements and attributes to DTDs. In addition to declaring elements and attributes individually, developers can create models — archetypes — that can be applied to multiple elements and refined if necessary. This provides a lot of the functionality SOX had developed to support object-oriented concepts like inheritance. Archetype development and refinement will probably become the mark of the high-end schema developer, much as the effective use of parameter entities was the mark of the high-end DTD developer. Archetypes should be easier to model and use consistently, however.
XML Schemas also support namespaces, a key feature of the W3C’s vision for the future of XML. While it probably wouldn’t be impossible to integrate DTDs and namespaces, the W3C has decided to move on, supporting namespaces in its newer developments and not retrofitting XML 1.0. In many cases, provided that namespace-prefixes don’t change or simply aren’t used, DTD’s can work just fine with namespaces, and should be able to interoperate with namespaces and schema processing that relies on namespaces. There will be a few cases, however, where namespaces may force developers to use the newer schemas rather than the older DTDs
1. How do you parse/validate the XML document?
The only way to validate an XML file is to parse the XML document using the DOM parser or the SAX parser
1. What is XML Namespace?
The XML namespaces recommendation defines a way to distinguish between duplicate element type and attribute names. Such duplication might occur, for example, in an XSLT stylesheet or in a document that contains element types and attributes from two different DTDs.
An XML namespace is a collection of element type and attribute names. The namespace is identified by a unique name, which is a URI. Thus, any element type or attribute name in an XML namespace can be uniquely identified by a two-part name: the name of its XML namespace and its local name. This two-part naming system is the only thing defined by the XML namespaces recommendation.
XML namespaces are declared with an xmlns attribute, which can associate a prefix with the namespace. The declaration is in scope for the element containing the attribute and all its descendants. For example:


abcd

If an XML namespace declaration contains a prefix, you refer to element type and attribute names in that namespace with the prefix. For example:


abcd

If an XML namespace declaration does not contain a prefix, the namespace is the default XML namespace and you refer to element type names in that namespace without a prefix. For example:


abcd

1.2) Can you give me an executive summary of what XML namespaces are not?
They aren’t a cure of cancer, they aren’t a way to win the lottery, and they aren’t a direct cause of world peace. They also aren’t very difficult to understand or use. Two things that XML namespaces are not have caused a lot of confusion, so we’ll mention them here:
XML namespaces are not a technology for joining XML documents that use different DTDs. Although they might be used in such a technology, they don’t provide it themselves.
The URIs used as XML namespace names are not guaranteed to point to schemas, information about the namespace, or anything else — they’re just identifiers. URIs were used simply because they’re a well-known system for creating unique identifiers. Don’t even think about trying to resolve these URIs. (For details, see question 12.4.)
1. XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer.
1. Generating PDF from XML
Today, the most common application of XSL-FO is to produce Adobe PDF documents from the source XML files. Here is the two step process that is used to turn XML into PDF:
Step 1. XML to XSL-FO using XSLT:
The first step is to transform XML into XSL-FO format document. XSL-FO, like XSLT, makes use of XML syntax. The obvious choice here is to use XSLT to transform XML into XSL-FO. However, if you want, you can use some other method, such as DOM- or SAX-based processing the XML document, and generating XSL-FO document. In this article, we’ll use XSLT to transform XML into XSL-FO. XSLT transformation engine, such as MSXML, Xalan, Saxon, XT, etc. can be used to apply the XSLT stylesheet on the XML document.
XSL-FO document describes the details of the presentation, such as physical size of the page, pagination details, margins, fonts, font sizes, colors, and so on. These characteristics are expressed using XSL formatting objects (for example: fo:page-sequence, fo:block, fo:footnote, fo:float, fo:region-body, and so on) and formatting properties (for example: background-attachment, background-color, font-family, text-depth, and so on). If you are know CSS (Cascading Style Sheets), the XSL formatting properties should sound familiar, however it is important to realize that XSL-FO provides a more sophisticated layout model than the CSS, and that XSL-FO is specifically designed to be used for generating fine-grained presentational layout files.
Step 2. Processing XSL-FO using Formatting Engine (or Formatter):
Once you have the XSL-FO document, XSL rendering engine, such as FOP or XSL Formatter (see XSL-FO Tools section below) can be used to convert XSL-FO elements into a PDF, PostScript, RTF or any other such print format.
XSL-FO is not meant to be hand-coded. Generally, XSLT stylesheet will be written to transform XML into XSL-FO. The rendering engine is then used to convert XSL-FO into the required print documents. External resources (such as images and fonts) can be referred in the XSL-FO document. SVG elements can be used inside XSL-FO document to produce vector graphics (such as charts or maps).


1. 1. What is the difference between SAX parser and DOM parser?
DOM spec defines an object-oriented hieararchy.
The DOM parser creates an internal tree based on the hierarchy of the XML data.
Tree stays in memory until released. The DOM parser is more memory intensive. DOM Parser’s advantage is that it is simple. Pairs nicely with XSLT.
SAX spec defines an event based approach, calling handler functions whenever certain text nodes or processing instructions are found. These events include the start and end of the document, finding a text node, finding child elements, and hitting a malformed element. SAX development is more challenging. SAX can parse gigabytes worth of XML without hitting resource barriers. It’s also faster and more complex. Better for huge XML docs. Best suited for sequential-scan applications.
2. What is the difference between Schema and DTD?
Schema might outphase DTD. XML shemas are in XML. XML Schema has a lot of built-in data types including xs:string,xs:decimal,xs:integer,xs:boolean,xs:date,xs:time. XML schemas can be edited with Schema files, parsed with XML parser, manipulated with XML DOM, and transformed with XSLT.
The building blocks of DTD include elements, attributes, entities, PCDATA, and CDATA.
3. How do you parse/validate the XML document?
By using a SAXParser, DOMParser, or XSDValidator.
4. What is XML Namespace?
Defining a namespace to avoid confusion involves using a prefix and adding an xmlns attribute to the tag to give the prefix a qualified name associated with the namespace. All child elements with the same prefix are associated with the namespace defined in the start tag of an element.
5. What is Xpath?
XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer.
6. What is XML template?
* A style sheets describes transformation rules
* A transformation rule: a pattern + a template
* Pattern: a configuration in the source tree
* Template: a structure to be instantiated in the result tree
* When a pattern is matched in the source tree, the corresponding pattern is generated in the result tree
7. How would you produce PDF output using XSL’s?
FOP it. =)
-transform xml into xsl-fo doc using xslt, or DOM or SAX
-process xsl-fo using a Formatter to convert xsl-fo into a pdf.
8. What are the steps to transform XML into HTML using XSL?
An XSLT processor may output the result tree as a sequence of bytes.The xsl:output element allows stylesheet authors to specify how they wish the result tree to be output. If an XSLT processor outputs the result tree, it should do so as specified by the xsl:output element; however, it is not required to do so.The method attribute on xsl:output identifies the overall method that should be used for outputting the result tree.
The html output method outputs the result tree as HTML; for example,

9. What is XSL?
In addition to XSLT, XSL includes an XML vocabulary for specifying formatting. XSL specifies the styling of an XML document by using XSLT to describe how the document is transformed into another XML document that uses the formatting vocabulary.
10. What is XSLT?
A language for transforming XML documents into other XML documents. XSLT is designed for use as part of XSL, which is a stylesheet language for XML.
==================================================================================================================



1. Can I use XML namespaces in DTDs?
2. Define DTD (Document Type definition).
3. Describe about the syntax rules which form the XML documents?
4. Differences Between XML and xlink?
5. Explain about DOM interface?
6. Explain about XML Canonicalization
1. Explain about XML data binding?
2. Explain about XML namespaces?
3. Explain about XML signature?
4. Explain about XQuery?
5. Explain about core validation?
6. Explain about the DTD features?
7. Explain about the techniques for processing XML files?
8. Give some examples of XML DTDs
9. Give the main reasons to use DTD?
10. Give us syntax rules of XQuery?
11. How can u create an XML file?
12. How do I configure an XPointer processor?
13. How do I implement an application-specific XPointer scheme?
14. How do I make a table which looks good on xlink and Prodigy?
15. How do I write my own DTD?
1. How do integrate XPointer into my application?
2. How do you create Drop Down Combos in xlink ?
3. How do you display XML with XSLT?
4. How do you load data from XML file to a ORACLE table?
5. How do you parse/validate the XML document?
6. How to add elements and attributes with XQuery in XML data?
7. How to declare DTD?
8. How to define functions in XQuery?
9. How to perform comparisons in XQuery?
10. How to perform conditional operations in XQuery?
11. How to perform operation on node using XQuery function in XML?Explain with an example?
12. How to use FLWOR expression given by XQuery in XML data?
13. How to use XPointer?
14. How would you produce PDF output using XSL’s?
15. How you define atomic values?
16. How you define syntax of XLink?
17. How you define syntax of XPointer?
18. How you define terms in XQuery?
19. How you use XQuery FLWOR with HTML?
20. List the rules to be followed by an XML document.
21. Other than XML/XSLT, what are other web services.
22. State and explain about XML encoding errors?
23. State some advantages of XML
24. State some disadvantages of XML?
25. State some features of XQuery.
26. WHich type of problems we can solved with XQuery?
27. What XPointer schemes are supported in this release?
28. What about xpointer resources?
29. What are XML indexes and secondary XML indexes?
30. What are the differences between SAX and DOM parsers?
31. What are the steps to transform XML into HTML using XSL?
32. What do you mean by selecting and Filtering elements in XQuery?
33. What is DOM?
34. What is DTD?
35. What is XLink ?
36. What is XML Namespace?
37. What is XML Serialization and Binary Serialization?
38. What is XML data binding?
39. What is XML template?
40. What is XML?
41. What is XMLA ?
42. What is XPointer?
43. What is XQuery?
44. What is XSL?
45. What is XSLT?
46. What is Xpath?
47. What is a CDATA section in XML?
48. What is a schema? What are the limitations of a DTD?
49. What is an XML encoding error?
50. What is server-side XPointer?
51. What is the difference between SAX parser and DOM parser?
52. What is the difference between Schema and DTD?
53. What is the purpose of FOR XML in SQL Server?
54. What is the use of Xlinks Modularization?
55. What parser would you use for searching a huge XML file?
56. When a XML file has a DTD declared which is not accessible to the parser, what would happen?
57. When constructing an XML DTD
58. Why doesn't use XLink?
59. Why should I care if my document is in correct x link? It displays all right on my browser.

HTML Interview Questions and Answers

What is HTML?
Answer1:
HTML, or HyperText Markup Language, is a Universal language which allows an individual using special code to create web pages to be viewed on the Internet.

Answer2:
HTML ( H yper T ext M arkup L anguage) is the language used to write Web pages. You are looking at a Web page right now.
You can view HTML pages in two ways:
* One view is their appearance on a Web browser, just like this page -- colors, different text sizes, graphics.
* The other view is called "HTML Code" -- this is the code that tells the browser what to do.
What is a tag?
In HTML, a tag tells the browser what to do. When you write an HTML page, you enter tags for many reasons -- to change the appearance of text, to show a graphic, or to make a link to another page.
Browser Display:
This is my message to the world!
How do I create frames? What is a frameset?
Frames allow an author to divide a browser window into multiple (rectangular) regions. Multiple documents can be displayed in a single window, each within its own frame. Graphical browsers allow these frames to be scrolled independently of each other, and links can update the document displayed in one frame without affecting the others.
You can't just "add frames" to an existing document. Rather, you must create a frameset document that defines a particular combination of frames, and then display your content documents inside those frames. The frameset document should also include alternative non-framed content in a NOFRAMES element.
The HTML 4 frames model has significant design flaws that cause usability problems for web users. Frames should be used only with great care.
How can I include comments in HTML?
Technically, since HTML is an SGML application, HTML uses SGML comment syntax. However, the full syntax is complex, and browsers don't support it in its entirety anyway. Therefore, use the following simplified rule to create HTML comments that both have valid syntax and work in browsers:

An HTML comment begins with "", and does not contain "--" or ">" anywhere in the comment.
The following are examples of HTML comments:

*
*
*

Do not put comments inside tags (i.e., between "<" and ">") in HTML markup.
What is a Hypertext link?
A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the link's destination.
How comfortable are you with writing HTML entirely by hand?

Very. I don’t usually use WYSIWYG. The only occasions when I do use Dreamweaver are when I want to draw something to see what it looks like, and then I’ll usually either take that design and hand-modify it or build it all over again from scratch in code. I have actually written my own desktop HTML IDE for Windows (it’s called Less Than Slash) with the intention of deploying it for use in web development training. If has built-in reference features, and will autocomplete code by parsing the DTD you specify in the file. That is to say, the program doesn’t know anything about HTML until after it parses the HTML DTD you specified. This should give you some idea of my skill level with HTML.
What is everyone using to write HTML?
Everyone has a different preference for which tool works best for them. Keep in mind that typically the less HTML the tool requires you to know, the worse the output of the HTML. In other words, you can always do it better by hand if you take the time to learn a little HTML.
What is a DOCTYPE? Which one do I use?
According to HTML standards, each HTML document begins with a DOCTYPE declaration that specifies which version of HTML the document uses. Originally, the DOCTYPE declaration was used only by SGML-based tools like HTML validators, which needed to determine which version of HTML a document used (or claimed to use).
Today, many browsers use the document's DOCTYPE declaration to determine whether to use a stricter, more standards-oriented layout mode, or to use a "quirks" layout mode that attempts to emulate older, buggy browsers.
Can I nest tables within tables?
Yes, a table can be embedded inside a cell in another table. Here's a simple example:

The main caveat about nested tables is that older versions of Netscape Navigator have problems with them if you don't explicitly close your TR, TD, and TH elements. To avoid problems, include every , , and tag, even though the HTML specifications don't require them. Also, older versions of Netscape Navigator have problems with tables that are nested extremely deeply (e.g., tables nested ten deep). To avoid problems, avoid nesting tables more than a few deep. You may be able to use the ROWSPAN and COLSPAN attributes to minimize table nesting. Finally, be especially sure to validate your markup whenever you use nested tables.
How do I align a table to the right (or left)?
You can use to float a table to the right. (Use ALIGN="left" to float it to the left.) Any content that follows the closing
tag will flow around the table. Use
or
to mark the end of the text that is to flow around the table, as shown in this example:

The table in this example will float to the right.
This text will wrap to fill the available space to the left of (and if the text is
This text will appear below the table, even if there is additional room to its left.
How can I use tables to structure forms?
Small forms are sometimes placed within a TD element within a table. This can be a useful for positioning a form relative to other content, but it doesn't help position the form-related elements relative to each other.
To position form-related elements relative to each other, the entire table must be within the form. You cannot start a form in one TH or TD element and end in another. You cannot place the form within the table without placing it inside a TH or TD element. You can put the table inside the form, and then use the table to position the INPUT, TEXTAREA, SELECT, and other form-related elements, as shown in the following example.
When the form is submitted, the form data is sent to the URL specified in the ACTION attribute. This URL should refer to a server-side (e.g., CGI) program that will process the form data. The form itself should contain

SQL General Interview Questions

Up until now, you would have had to be one of the candidates that I personally coached in order to receive this highly valuable job interviewing information. But not anymore. Several people recommended I make this interview information available online so now, you too can benefit from some of the most effective job interview questions, techniques and tips available to job seekers today.
Database Interview Questions - Oracle, Sybase, SqlServer
Database Interview Questions (SQL, Oracle, Pro*C/C++)


SQL General Interview Questions ...
o What are the different types of joins?
o Explain normalization with examples.
o What cursor type do you use to retrieve multiple recordsets?
o Diffrence between a "where" clause and a "having" clause
o What is the difference between "procedure" and "function"?
-- Sponsored Links --

o How will you copy the structure of a table without copying the data?
o How to find out the database name from SQL*PLUS command prompt?
o Tadeoffs with having indexes
o Talk about "Exception Handling" in PL/SQL?
o What is the diference between "NULL in C" and "NULL in Oracle?"
o What is Pro*C? What is OCI?
o Give some examples of Analytical functions.
o What is the difference between "translate" and "replace"?
o What is DYNAMIC SQL method 4?
o How to remove duplicate records from a table?
o What is the use of ANALYZing the tables?
o How to run SQL script from a Unix Shell?
o What is a "transaction"? Why are they necessary?
o Explain Normalizationa dn Denormalization with examples.
o When do you get contraint violtaion? What are the types of constraints?
o How to convert RAW datatype into TEXT?
o Difference - Primary Key and Aggregate Key
o How functional dependency is related to database table design?
o What is a "trigger"?
o Why can a "group by" or "order by" clause be expensive to process?
o What are "HINTS"? What is "index covering" of a query?
o What is a VIEW? How to get script for a view?
o What are the Large object types suported by Oracle?
o What is SQL*Loader?
o Difference between "VARCHAR" and "VARCHAR2" datatypes.
o What is the difference among "dropping a table", "truncating a table" and "deleting all records" from a table.
o Difference between "ORACLE" and "MICROSOFT ACCESS" databases.
o How to create a database link ?
PL/SQL interview questions...
o Normalize many to many relationships
o Difference - Equijoin and union
-- Sponsored Links --

o What is TEMP table space in Oracle, what is rollback segment
o How do we find row chaining?
o Pattern matching operators
o Features in oracle 9i and 10g
o Why truncating table is faster than delete
o copy commit syntax
o Convert Zulu time zone to US Eastern time zone
o Difference - union and union all
o Difference - Group by, Order by clause
o Which Ranking functions are available?
o Difference - Decode, NVL, NVL2
o Tradeoffs of using partitioned tables
o How can we call stored procedure in SQL query
o What are the restrictions on calling PL/SQL from SQL
o Why EXISTS is preferable to distinct
o Give two examples of avoiding unnecessary parsing.










Perl is a high level general purpose interpreted dynamic programming language . Perl was originally developed by Larry Wall a linguist working as a systems administrator for NASA in 1987 as a general purpose Unix scripting language to make report processing easier. Since then it has undergone many changes and revisions and become widely popular among programmers. Larry Wall continues to oversee development of the core language and its upcoming version Perl 6 .
Perl borrows features from other programming languages including shell scripting sh AWK and sed . The language provides powerful text processing facilities without the arbitrary data length limits of many contemporary Unix tools facilitating easy manipulation of text files . It is also used for graphics programming system administration network programming applications that require database access and CGI programming on the Web . Perl is nicknamed the Swiss Army chainsaw of programming languages due to its flexibility and adaptability
Unix (officially trademarked as UNIX is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs , including Ken Thompson , Dennis Ritchie , Douglas McIlroy , and Joe Ossanna . Today's Unix systems are split into various branches, developed over time by AT&T as well as various commercial vendors and non-profit organizations.
As of 2009, the owner of the trademark is The Open Group , an industry standards consortium. Only systems fully compliant with and certified to the Single UNIX Specification are qualified to use the trademark; others are called "Unix system-like" or "Unix-like ".
During the late 1970s and early 1980s, the influence of Unix in academic circles led to large-scale adoption of Unix (particularly of the BSD variant, originating from the University of California, Berkeley ) by commercial startups, the most notable of which are Solaris , HP-UX , AIX , and Mac OS X . Today, in addition to certified Unix systems such as those already mentioned, Unix-like operating systems such as Linux and BSD are commonly encountered. Sometimes, "traditional Unix" may be used to describe a Unix or an operating system that has the characteristics of either Version 7 Unix or UNIX System V .

Data mining

Data mining is the process of extracting hidden patterns from data. As more data is gathered, with the amount of data doubling every three years,[1] data mining is becoming an increasingly important tool to transform this data into information. It is commonly used in a wide range of profiling practices, such as marketing, surveillance, fraud detection and scientific discovery.
While data mining can be used to uncover patterns in data samples, it is important to be aware that the use of non-representative samples of data may produce results that are not indicative of the domain. Similarly, data mining will not find patterns that may be present in the domain, if those patterns are not present in the sample being "mined". There is a tendency for insufficiently knowledgeable "consumers" of the results to attribute "magical abilities" to data mining, treating the technique as a sort of all-seeing crystal ball. Like any other tool, it only functions in conjunction with the appropriate raw material: in this case, indicative and representative data that the user must first collect. Further, the discovery of a particular pattern in a particular set of data does not necessarily mean that pattern is representative of the whole population from which that data was drawn. Hence, an important part of the process is the verification and validation of patterns on other samples of data.
The term data mining has also been used in a related but negative sense, to mean the deliberate searching for apparent but not necessarily representative patterns in large amounts of data. To avoid confusion with the other sense, the terms data dredging and data snooping are often used. Note, however, that dredging and snooping can be (and sometimes are) used as exploratory tools when developing and clarifying hypotheses
Background
Humans have been "manually" extracting patterns from data for centuries, but the increasing volume of data in modern times has called for more automatic approaches. Early methods of identifying patterns in data include Bayes' theorem (1700s) and Regression analysis (1800s). The proliferation, ubiquity and increasing power of computer technology has increased data collection and storage. As data sets have grown in size and complexity, direct hands-on data analysis has increasingly been augmented with indirect, automatic data processing. This has been aided by other discoveries in computer science, such as Neural networks, Clustering, Genetic algorithms (1950s), Decision trees(1960s) and Support vector machines (1980s). Data mining is the process of applying these methods to data with the intention of uncovering hidden patterns.[2] It has been used for many years by businesses, scientists and governments to sift through volumes of data such as airline passenger trip records, census data and supermarket scanner data to produce market research reports. (Note, however, that reporting is not always considered to be data mining).
A primary reason for using data mining is to assist in the analysis of collections of observations of behaviour. Such data are vulnerable to collinearity because of unknown interrelations. An unavoidable fact of data mining is that the (sub-)set(s) of data being analysed may not be representative of the whole domain, and therefore may not contain examples of certain critical relationships and behaviours that exist across other parts of the domain. To address this sort of issue, the analysis may be augmented using experiment-based and other approaches, such as Choice Modelling for human-generated data. In these situations, inherent correlations can be either controlled for, or removed altogether, during the construction of the experimental design.
There have been some efforts to define standards for data mining, for example the 1999 European Cross Industry Standard Process for Data Mining (CRISP-DM 1.0) and the 2004 Java Data Mining standard (JDM 1.0). These are evolving standards; later versions of these standards are under development. Independent of these standardization efforts, freely available open-source software systems like RapidMiner, Weka, KNIME, and the R Project have become an informal standard for defining data-mining processes. Most of these systems are able to import and export models in PMML (Predictive Model Markup Language) which provides a standard way to represent data mining models so that these can be shared between different statistical applications. PMML is an XML-based language developed by the Data Mining Group (DMG)[3], an independent group composed of many data mining companies. PMML version 4.0 was released in June 2009.[3][4][5]
[edit] Research and evolution
In addition to industry driven demand for standards and interoperability, professional and academic activity have also made considerable contributions to the evolution and rigour of the methods and models; an article published in a 2008 issue of the International Journal of Information Technology and Decision Making summarises the results of a literature survey which traces and analyses this evolution.[6]
The premier professional body in the field is the Association for Computing Machinery's Special Interest Group on Knowledge Discovery and Data Mining (SIGKDD).[citation needed] Since 1989 they have hosted an annual international conference and published its proceedings,[7] and since 1999 have published a biannual academic journal titled "SIGKDD Explorations".[8] Other Computer Science conferences on data mining include:
• DMIN - International Conference on Data Mining;[9]
• DMKD - Research Issues on Data Mining and Knowledge Discovery;
• ECML-PKDD - European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases;
• ICDM - IEEE International Conference on Data Mining;[10]
• MLDM - Machine Learning and Data Mining in Pattern Recognition;
• SDM - SIAM International Conference on Data Mining
[edit] Process

This section relies largely or entirely upon a single source. Please help improve this article by introducing appropriate citations of additional sources. (April 2009)
Knowledge Discovery in Databases (KDD) is the name coined by Gregory Piatetsky-Shapiro in 1989 to describe the process of finding interesting, interpreted, useful and novel data. There are many nuances to this process, but roughly the steps are to preprocess raw data, mine the data, and interpret the results.[11]

Database Matiral

database matiral

1. What is database?

A database is a logically coherent collection of data with some
inherent meaning, representing some aspect of real world and which
is designed, built and populated with data for a specific purpose.


2. What is DBMS?
It is a collection of programs that enables user to create and
maintain a database. In other words it is general-purpose software
that provides the users with the processes of defining, constructing
and manipulating the database for various applications.


3. What is a Database system?
The database and DBMS software together is called as Database
system.


4. Advantages of DBMS?
Ø Redundancy is controlled.
Ø Unauthorised access is restricted.
Ø Providing multiple user interfaces.
Ø Enforcing integrity constraints.
Ø Providing backup and recovery.


5. Disadvantage in File Processing System?
Ø Data redundancy & inconsistency.
Ø Difficult in accessing data.
Ø Data isolation.
Ø Data integrity.
Ø Concurrent access is not possible.
Ø Security Problems.


6. Describe the three levels of data abstraction?
The are three levels of abstraction:
Ø Physical level: The lowest level of abstraction describes how data
are stored.
Ø Logical level: The next higher level of abstraction, describes
what data are stored in database and what relationship among those
data.
Ø View level: The highest level of abstraction describes only part
of entire database.


7. Define the "integrity rules"
There are two Integrity rules.
Ø Entity Integrity: States that "Primary key cannot have NULL value"
Ø Referential Integrity: States that "Foreign Key can be either a
NULL value or should be Primary Key value of other relation.


8. What is extension and intension?
Extension -
It is the number of tuples present in a table at any instance. This
is time dependent.
Intension -
It is a constant value that gives the name, structure of table and
the constraints laid on it.


9. What is System R? What are its two major subsystems?
System R was designed and developed over a period of 1974-79 at IBM
San Jose Research Center. It is a prototype and its purpose was to
demonstrate that it is possible to build a Relational System that
can be used in a real life environment to solve real life problems,
with performance at least comparable to that of existing system.
Its two subsystems are
Ø Research Storage
Ø System Relational Data System.


10. How is the data structure of System R different from the
relational structure?
Unlike Relational systems in System R
Ø Domains are not supported
Ø Enforcement of candidate key uniqueness is optional
Ø Enforcement of entity integrity is optional
Ø Referential integrity is not enforced


11. What is Data Independence?
Data independence means that "the application is independent of the
storage structure and access strategy of data". In other words, The
ability to modify the schema definition in one level should not
affect the schema definition in the next higher level.
Two types of Data Independence:
Ø Physical Data Independence: Modification in physical level should
not affect the logical level.
Ø Logical Data Independence: Modification in logical level should
affect the view level.
NOTE: Logical Data Independence is more difficult to achieve


12. What is a view? How it is related to data independence?
A view may be thought of as a virtual table, that is, a table that
does not really exist in its own right but is instead derived from
one or more underlying base table. In other words, there is no
stored file that direct represents the view instead a definition of
view is stored in data dictionary.
Growth and restructuring of base tables is not reflected in views.
Thus the view can insulate users from the effects of restructuring
and growth in the database. Hence accounts for logical data
independence.



13. What is Data Model?
A collection of conceptual tools for describing data, data
relationships data semantics and constraints.


14. What is E-R model?
This data model is based on real world that consists of basic
objects called entities and of relationship among these objects.
Entities are described in a database by a set of attributes.


15. What is Object Oriented model?
This model is based on collection of objects. An object contains
values stored in instance variables with in the object. An object
also contains bodies of code that operate on the object. These
bodies of code are called methods. Objects that contain same types
of values and the same methods are grouped together into classes.


16. What is an Entity?
It is a 'thing' in the real world with an independent existence.


17. What is an Entity type?
It is a collection (set) of entities that have same attributes.


18. What is an Entity set?
It is a collection of all entities of particular entity type in the
database.


19. What is an Extension of entity type?
The collections of entities of a particular entity type are grouped
together into an entity set.


20. What is Weak Entity set?
An entity set may not have sufficient attributes to form a primary
key, and its primary key compromises of its partial key and primary
key of its parent entity, then it is said to be Weak Entity set.


21. What is an attribute?
It is a particular property, which describes the entity.


22. What is a Relation Schema and a Relation?
A relation Schema denoted by R(A1, A2, …, An) is made up of the
relation name R and the list of attributes Ai that it contains. A
relation is defined as a set of tuples. Let r be the relation which
contains set tuples (t1, t2, t3, ..., tn). Each tuple is an ordered
list of n-values t=(v1,v2, ..., vn).


23. What is degree of a Relation?
It is the number of attribute of its relation schema.


24. What is Relationship?
It is an association among two or more entities.


25. What is Relationship set?
The collection (or set) of similar relationships.


26. What is Relationship type?
Relationship type defines a set of associations or a relationship
set among a given set of entity types.


27. What is degree of Relationship type?
It is the number of entity type participating.


25. What is DDL (Data Definition Language)?
A data base schema is specifies by a set of definitions expressed by
a special language called DDL.


26. What is VDL (View Definition Language)?
It specifies user views and their mappings to the conceptual schema.


27. What is SDL (Storage Definition Language)?
This language is to specify the internal schema. This language may
specify the mapping between two schemas.


28. What is Data Storage - Definition Language?
The storage structures and access methods used by database system
are specified by a set of definition in a special type of DDL called
data storage-definition language.


29. What is DML (Data Manipulation Language)?
This language that enable user to access or manipulate data as
organised by appropriate data model.
Ø Procedural DML or Low level: DML requires a user to specify what
data are needed and how to get those data.
Ø Non-Procedural DML or High level: DML requires a user to specify
what data are needed without specifying how to get those data.


31. What is DML Compiler?
It translates DML statements in a query language into low-level
instruction that the query evaluation engine can understand.


32. What is Query evaluation engine?
It executes low-level instruction generated by compiler.


33. What is DDL Interpreter?
It interprets DDL statements and record them in tables containing
metadata.


34. What is Record-at-a-time?
The Low level or Procedural DML can specify and retrieve each record
from a set of records. This retrieve of a record is said to be
Record-at-a-time.


35. What is Set-at-a-time or Set-oriented?
The High level or Non-procedural DML can specify and retrieve many
records in a single DML statement. This retrieve of a record is said
to be Set-at-a-time or Set-oriented.


36. What is Relational Algebra?
It is procedural query language. It consists of a set of operations
that take one or two relations as input and produce a new relation.


37. What is Relational Calculus?
It is an applied predicate calculus specifically tailored for
relational databases proposed by E.F. Codd. E.g. of languages based
on it are DSL ALPHA, QUEL.


38. How does Tuple-oriented relational calculus differ from domain-
oriented relational calculus
The tuple-oriented calculus uses a tuple variables i.e., variable
whose only permitted values are tuples of that relation. E.g. QUEL
The domain-oriented calculus has domain variables i.e., variables
that range over the underlying domains instead of over relation.
E.g. ILL, DEDUCE.


39. What is normalization?
It is a process of analysing the given relation schemas based on
their Functional Dependencies (FDs) and primary key to achieve the
properties
Ø Minimizing redundancy
Ø Minimizing insertion, deletion and update anomalies.


40. What is Functional Dependency?
A Functional dependency is denoted by X Y between two sets of
attributes X and Y that are subsets of R specifies a constraint on
the possible tuple that can form a relation state r of R. The
constraint is for any two tuples t1 and t2 in r if t1[X] = t2[X]
then they have t1[Y] = t2[Y]. This means the value of X component of
a tuple uniquely determines the value of component Y.


41. When is a functional dependency F said to be minimal?
Ø Every dependency in F has a single attribute for its right hand
side.
Ø We cannot replace any dependency X A in F with a dependency Y A
where Y is a proper subset of X and still have a set of dependency
that is equivalent to F.
Ø We cannot remove any dependency from F and still have set of
dependency that is equivalent to F.


42. What is Multivalued dependency?
Multivalued dependency denoted by X Y specified on relation schema
R, where X and Y are both subsets of R, specifies the following
constraint on any relation r of R: if two tuples t1 and t2 exist in
r such that t1[X] = t2[X] then t3 and t4 should also exist in r with
the following properties
Ø t3
= t4[X] = t1[X] = t2[X]
Ø t3[Y] = t1[Y] and t4[Y] = t2[Y]
Ø t3[Z] = t2[Z] and t4[Z] = t1[Z]
where [Z = (R-(X U Y)) ]


43. What is Lossless join property?
It guarantees that the spurious tuple generation does not occur with
respect to relation schemas after decomposition.


44. What is 1 NF (Normal Form)?
The domain of attribute must include only atomic (simple,
indivisible) values.


45. What is Fully Functional dependency?
It is based on concept of full functional dependency. A functional
dependency X Y is full functional dependency if removal of any
attribute A from X means that the dependency does not hold any more.


46. What is 2NF?
A relation schema R is in 2NF if it is in 1NF and every non-prime
attribute A in R is fully functionally dependent on primary key.


47. What is 3NF?
A relation schema R is in 3NF if it is in 2NF and for every FD X A
either of the following is true
Ø X is a Super-key of R.
Ø A is a prime attribute of R.
In other words, if every non prime attribute is non-transitively
dependent on primary key.


48. What is BCNF (Boyce-Codd Normal Form)?
A relation schema R is in BCNF if it is in 3NF and satisfies an
additional constraint that for every FD X A, X must be a candidate
key.


49. What is 4NF?
A relation schema R is said to be in 4NF if for every Multivalued
dependency X Y that holds over R, one of following is true
Ø X is subset or equal to (or) XY = R.
Ø X is a super key.


50. What is 5NF?
A Relation schema R is said to be 5NF if for every join dependency
{R1, R2, ..., Rn} that holds R, one the following is true
Ø Ri = R for some i.
Ø The join dependency is implied by the set of FD, over R in which
the left side is key of R.