0% found this document useful (0 votes)
62 views

Class 10 I.T. Practical File

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Class 10 I.T. Practical File

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Data can be

organized into two


types:
• Flat File: Data is stored in a single
table. Usually suitable for less
amount of data.
• Relational: Data is stored in
multiple tables and the tables are
linked using a common field.
Relational is suitable for medium to
large amount of data.

6
Database Servers
Database servers are dedicated
computers that hold the actual
databases and run only the DBMS
and related software. Typically
databases available on the
database servers are accessed
through command line or graphic
user interface tools referred to as
Frontends; database servers are
referred to as Back-ends. Such type
of data access is referred to as a
client-server model.

7
RDBMS
A relational database management
system (RDBMS) is a database
management system that is based
on the relational model as
introduced by E. F. Codd, of IBM’s
San Jose Research Laboratory.
Most popular databases currently in
use are based on the relational
database model The relational
model for database management is
a database model based on first-
order predicate logic, first
formulated and proposed in 1969 by
Edgar F. Codd. In the relational
8
model of a database, all data is
represented in terms of tuples,
grouped into relations. A database
organized in terms of the relational
model is a relational database. The
purpose of the relational model is to
provide a declarative method for
specifying data and queries: users
directly state what information the
database contains and what
information they want from it, and
let the database management
system software take care of
describing data structures for
storing the data and retrieval
procedures for answering queries.

9
Tables :

A table is a set of data elements


(values) that is organized using a
model of vertical columns (which
are identified by their name) and
horizontal rows. A table has a
defined number of columns, but can
have any number of rows. Each row
is identified by the values appearing
in a particular column identified as a
unique key index or the key field .

10
Columns or Fields:
A column is a set of data values of a
particular simple type, one for each
row of the table. The columns
provide the structure according to
which the rows are composed. For
example, cFirstName, or
cLastName are fields in a row.

11
Rows or Records
or Tuples:
A row also called a record or tuple
represents a single, data item in a
table. In simple terms, a database
table can be visualized as
consisting of rows and columns or
fields. Each row in a table
represents a set of related data, and
every row in the table has the same
structure.

12
Data types :

Datatypes are used to identify which


type of data (value) we are going to
store in the database. Fields
themselves can be of different types
depending on the data they contain.
Data types in OpenOffice base is
broadly classified into five
categories listed below.
• Numeric Types
• Alphanumeric Types
• Binary Types
• Date time
• Other Variable types
13
Numeric Types:
Numeric data types are used for
describing numeric values for the
field used in the table of a database.
Numeric data types in a database
can be using for storing information
such as mobile number, roll
number, door number, year of
school admission, true or false
statements, statistical values, etc.
The different types of numeric data
types available are listed here.

14
15
16
MANIPULATING DATA
In a database you can define the
structure of the data and manipulate
the data using some commands.
There are two types of languages
for this task. These are:
• Data Definition Language (DDL)
• Data Manipulation Language
(DML)

18
Data Definition
Language (DDL)
A data definition language or data
description language (DDL) is a
standard for commands that define
the different structures in a
database. DDL statements create,
modify, and remove database
objects such as tables, indexes, and
users. Common DDL statements
are CREATE, ALTER, and DROP.

19
Data Manipulation
Language (DML)
A data manipulation language (DML) is a
language that enables users to access
and manipulate data in a database. The
goal is to provide efficient human
interaction with the system. Data
manipulation involves:

• Retrieval of information from the


database- SELECT statement

• Insertion of new information into the


database - INSERT statement

• Deletion of information in the


database - DELETE statement

• Modification of information in the


database - UPDATE statement
20
A query language is a part of DML
involving information retrieval only. The
terms DML and query language are often
used synonymously.

There are two


types of DML:
• Procedural: The user specifies what
data is needed and how to get it

• Nonprocedural: The user only


specifies what data is needed. This is
21
easier for the user but may not generate
code as efficient as that produced by
procedural languages.

CREATING A DATABASE
OBJECT

22
Launching Openoffice To launch
OpenOffice, click
Start>Programs>OpenOffice.org
3.4.1>OpenOffice.org.

Alternatively, you can also double-


click on the OpenOffice.org 3.4.1
shortcut on the desktop if available.

23
Select the option database to launch the
base application.

You can also directly launch the


OpenOffice Base Application by doing the
following:

• Click Start>Programs>OpenOffice.org
3.4.1>OpenOffice.org Base. You should
are guided through the Database Wizard
for creating a database. You will see a

24
dialog box similar to the one displayed
below.

You can create a new database by


selecting the option Create a new
database.

25
: BUILDING FORMS
A form provides the user a
systematic way of storing
information into the database. It is
an interface in a user specified
layout that lets users to view, enter,
and change data directly in
database objects such as tables.
To create a form,
Click on Forms option located
under Database section (Figure
below).

31
Click Use Wizard to Create Form…
option under Tasks group. The
32
Form Wizard dialog box appears as
shown below.

You can select selective fields to be


sent onto the form by selecting the
field name and clicking >button.
You can select individual fields in a
database or all fields in a database.

33
you use SQL (pronounced as “sequel”)
or Structured Query Language. Query
languages are computer languages
used to make queries into databases
and information systems. Queries are
commands that are used to define the
data structure and also to manipulate
the data in the database.

A SELECT statement retrieves zero or


more rows from one or more database
tables or database views. In most
applications, SELECT is the most
commonly used Data Manipulation
Language (DML) command.

43
44
You can type the query in the above
window and execute it by using the
F5 function key or by clicking the
icon in the window. For example, if
you want to display all the data in
the table that you created in the
early session, then the select
statement will be: select * from
SDetails; After executing the select
query the output will be shown
similar to the one displayed below

45
You can type the query in the above
window and execute it by using the
F5 function key or by clicking the
icon in the window. For example, if
you want to display all the data in
the table that you created in the
early session, then the select
statement will be: select * from
SDetails; After executing the select
query the output will be shown
similar to the one displayed below

46
To get details about the list of
students whose favorite color is
blue, you can use: select * from
SDetails where Color=’Blue’; After
executing the select query the
output will be shown similar to the
one displayed below.

To view records in ascending order


of RollNo, from the table the select
statement will be: select * from
SDetails order by “Rollno” ASC;
47
INSERT statement

INSERT statement is used to add one or more records to a


database. The general syntax of the

insert statement is shown


below.INSERTINTO<table_name><column1, column2,
column3...> VALUES <value1, value2, value3 ...>;To add a
record in the database created earlier, type the following
and click Execute. insertinsert into SDetails (“ID”, “Name”,
“Rollno”, “DOB”, “Class”, “Phone”, “Email”, “Color”,

48
“Location”)values (‘8’, ‘Ranjith Singh’, ’67’, ‘12-03-99’,’X’,
‘435363’, ‘[email protected]’, ‘White’, ‘Bihar’);

UPDATE statement

Update statement is used for modifying records in a


database. The general syntax of the update statement is as
follows:UPDATE <table_name> SET <column_name> =
value [, column_name = value ...] [WHERE <condition>]To
update a record using update statement, type the following
and click Execute.update SDetails set Location
‘Bhubaneswar’ where Rollno = 14;Execute select query to
view the updated table. After execution you should see a
window similar to the one displayed below

CREATE Statement

Create statement is used for creating a database or a table


in any RDBMS Software. A commonly used CREATE
command is the CREATE TABLE command. The general
syntax of the create statement is shown below.
CREATECREATE TABLE <TABLENAME> ([column
definitions]) [table parameters]Column definitions: A
comma-separated list consisting of any of the following
Column definition: [column name] [data type] {NULL | NOT
NULL} {column options} Primary key definition: PRIMARY
KEY ([comma separated column list]) For example, if you

49
would like to create a table using the Create statement,
type the following and click Execute.

CREATE TABLE Employee (ID INTEGER, Name VARCHAR


(50), Department VARCHAR (50), Address VARCHAR (120),
Contact_Number INTEGER);Now create 5 records in the
table and use the SQL statements to view, modify and
delete them

The end .

50

You might also like