dbms lab manual 2
dbms lab manual 2
AIM
To create an XML database and validate it using XML schema.
If an XML document conforms to a predefined XML schema, then the document can be considered
as structured data.
XML Documents
An XML document is well formed if it follows a few conditions. In particular, it must start with an
XML declaration to indicate the version of XML being used as well as any other relevant attributes, as
shown in the first line in Figure 13.3. It must also follow the syntactic guidelines of the tree data model.
This means that there should be a single root element, and every element must include a matching pair of
start and end tags within the start and end tags of the parent element. must be well formed, and it must
follow a particular schema. That is, the element names used in the start and end tag pairs must follow the
structure specified in a separate XML DTD (Document Type Definition) file or XML schema file.
XML Schema
The XML schema language is a standard for specifying the structure of XML documents. It uses
the same syntax rules as regular XML documents, so that the same processors can be used on both. To
distinguish the two types of documents, we will use the term XML instance document or XML document
for a regular XML document that contains both tag names and data values, and XML schema document for
a document that specifies an XML schema. An XML schema document would contain only tag names, tree
structure information, constraints, and other descriptions but no data values.
Result
Thus an XML database is created and validated using XML schema.
Program:
<book id="bk002">
<author>Poet</author>
<title>The Poet's First Poem</title>
<genre>Poem</genre>
<price>24.95</price>
<pub_date>2000-10-01</pub_date>
<review>Least poetic poems.</review>
</book>
</x:books>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:books"
xmlns:bks="urn:books">
<xsd:complexType name="BooksForm">
<xsd:sequence>
<xsd:element name="book"
type="bks:BookForm"
minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="BookForm">
<xsd:sequence>
<xsd:element name="author" type="xsd:string"/>
<xsd:element name="title" type="xsd:string"/>
<xsd:element name="genre" type="xsd:string"/>
<xsd:element name="price" type="xsd:float" />
<xsd:element name="pub_date" type="xsd:date" />
<xsd:element name="review" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:string"/>
</xsd:complexType>
</xsd:schema>
Ex. No.: 11 Create Document, column and graph based data using NOSQL database
tools.
AIM
To create document, column and graph based data using NOSQL database tools.
RESULT
Thus document, column and graph based data is created using NOSQL database
tools.
Ex. No.: 12a FRONT END TOOLS
AIM
To design an application using Front end tools.
FRONT END
Front-end and back-end are terms used to characterize program interfaces and
services relative to the initial user of these interfaces and services. (The "user" may be a
human being or a program.) A "front-end" application is one that application users interact
with directly. A "back-end" application or program serves indirectly in support of the front-
end services, usually by being closer to the required resource or having the capability to
communicate with the required resource. The back-end application may interact directly
with the front-end or, perhaps more typically, is a program called from an intermediate
program that mediates front-end and back-end activities.
ALGORITHM
Step 1. Start.
Step 2. Create an application using frontend tools (VB/Java).
Step 3. Create a database in the backend using oracle.
Step 4. Design the frontend forms using buttons, textboxes, checkboxes, list etc.
Step 5. Enter, compare, display, delete, etc in database using information through forms.
Step 6. Stop.
RESULT
Thus an application using Front end tools has been designed.
Ex. No.: 12b FORMS
AIM
To design a form for a database.
FORMS
Forms interfaces are widely used to enter data into databases and extract
information from databases.
ALGORITHM
Step 1. Start
Step 2. Enter the database to which the text box should be connected.
Step 3. Enter the user name to which the form builder should be connected.
Step 4. Select at least one column from the available column.
Step 5. Click finish.
Step 6. The corresponding form will appear on the screen.
Step 7. For executing the form click on the run button.
Step 8. To insert or delete a record click the insert record or delete record button.
Step 9. Form builder has provisions such as to seek the first, last, next record etc.,
Step 10. Stop.
RESULT
Thus the form for a database has been designed.
Ex. No.: 12c MENU DESIGN
AIM
To write menu design for accessing databases.
MENU
In computing, a menu or menu bar is graphical control element. It is a list of options
or commands presented to an operator by a computer or communications system. Choices
given from a menu may be selected by the operator by a number of methods.
ALGORITHM
Step 1. Start.
Step 2. To create a menu using resource editor, click on Insert -> Resource.
Step 3. A dialog box containing a list of different resource editors appears. Select Menu-
>New.
Step 4. A menu bar with a rectangular box on it gets displayed. Double click on this box, a
dialog box with a Caption ‘Menu item properties’ appears.
Step 5. Enter the menu item name and menu ID value. No ID value has to be given, if popup
check box is selected.
Step 6. Click on Project -> Add to project -> Files, select .rc file and press OK. This will
include the ‘.rc’ file in the currently opened project.
Step 7. Right click on Header Files in the work space, select Add files to Folder. Select
resource.h header file in the dialog box.
Step 8. Stop.
RESULT
Thus Menu design for database accessing executed.
Ex No.: 12d REPORT GENERATION
AIM
To generate report for a sample database.
REPORT GENERATORS
Report generators are tools to generate human readable summary reports from a
database.
ALGORITHM
Step 1. Start.
Step 2. Click the query builder to insert a query.
Step 3. The username, password and database should be entered.
Step 4. The tables in the corresponding user will be displayed.
Step 5. From that include the required table.
Step 6. The table name and the columns will be displayed.
Step 7. Select the columns, and then the query will be displayed.
Step 8. Click next.
Step 9. Select wanted columns in the table and click next.
Step 10. If necessary add functions like average, sum etc., and click next.
Step 11. Select the template in the template list and click next.
Step 12. Stop.
RESULT
Thus the Report for a database has been designed.
Ex. No.:12e CASE STUDY - RAILWAY RESERVATION SYSTEM
AIM
To implement the Railway Reservation System using Visual Basic as front end and
Oracle as back end.
ALGORITHM
Step 1. Start.
Step 2. Collect the details of how the project is expected by the user and the atmosphere in
which it is going to work.
Step 3. Create the tables which are required by the project and insert the values in the
Oracle database (Back End).
Step 4. Design the forms which are required by the project by using Visual Basic (Front
End)
Step 5. Connect the front end (VB) to Oracle database by using ADO Data Control
Step 6. Execute the project.
Step 7. Stop.
RESULT
Thus the Railway Reservation System is implemented successfully.