Unit 3 Database Management System Class 10 Notes IT 402
Unit 3 Database Management System Class 10 Notes IT 402
Database Servers :
Database servers are dedicated computers that hold the actual databases and run only the
DBMS and related software.
Advantages of Database :
1) Reduces Data Redundancy : Database reduces data redundancy (duplication of data)
2) Sharing of Data : In a database, the users of the database can share the data among
themselves.
3) Data Integrity : Data integrity means that the data is accurate and consistent in the
database.
Important Terms :
1) Primary Key : A primary key is a unique value that identifies a row in a table. It helps the
database to search for a record.
2) Composite Primary Key : When primary key constraint is applied on one or more
columns then it is known as Composite Primary Key.
3) Foreign key : The foreign key identifies a column or set of columns in one (referencing)
table that refers to a column or set of columns in another (referenced) table.
SESSION-2 : CREATE AND EDIT TABLES USING WIZARD & SQL COMMANDS
Data in a relational database management system (RDBMS) is organized in the form of
tables.
DATABASE OBJECTS :
1) Table : A table is a set of data elements (values) that is organized using a model of
vertical columns and horizontal rows.
2) Columns or Fields or Attributes: A column is a set of data values of a particular simple
type, one for each row of the table.
3) Rows or Records or Tuples : A row also called a Record or Tuple represents a single data
item in a table. Every row in the table has the same structure.
Creating Database Using OpenOffice :
1) Open the OpenOffice Base Application by Clicking on Start>Programs>OpenOffice.org
4>OpenOffice.org Base.
2) Create a new database by selecting the option Create a new database
3) Database wizard appear. Click Finish. The Save As dialog box appears.
4) Specify a name for the database in the File name: field and click Save.
C WITTY IN TERN ATION AL SCHOOL
Create Tables:
Tables are the basic building blocks of a database. You store the data in the database in the
form of tables.
There are different ways to create a table:
a) Use Wizard To Create Table: The following are the steps to create a table:
1) Click on Tables > Use Wizard to Create Table
2) Click the Select Fields > Choose Category > Select the table > Click on Next Button.
3) Select the fields as per the requirements. Click on Next button
4) Set the data types and properties of the selected fields. Click on Next Button
5) Set the Primary Key and Click on Next Button
6) Window to rename the table will open. A user can either go ahead with the same table
name or can change it.
7) Click on Finish to insert the data in the table.
Data Types :
Datatypes are used to identify which type of data (value) we are going to store in the
database. Data types in OpenOffice base are broadly classified into five categories listed
below.
1. Numeric Types
2. Alphanumeric Types
3. Binary Types
4. Date time
5. Other Variable types
Numeric Types :Numeric data types in a database can be used for storing information such as
mobile number, roll number, door number etc. The different types of numeric data types
available are listed here.
database management system class 10 notes
Alphanumeric Types :
This data type is used to store information which has alphabets as well as numbers for
example address, book summary field etc. The different types of Alphanumeric
Types available are listed here.
Inserting Data In The Table : To insert the data in the table, follow the steps:
C WITTY IN TERN ATION AL SCHOOL
1) Select the table > Double click on it.
2) The table will open in Datasheet View.
3) Insert the required number of records in Datasheet View.
Editing Records In The Table : To edit the data in the table, follow the steps:
1) Select the table > Double click on it.
2) The table will open in Datasheet View.
3) Edit the required record in Datasheet View.
Deleting Records From The Table : To remove the data from the table, follow the steps:
1) Select the table > Double click on it.
2) The table will open in Datasheet View.
3) Select the data > right click on selected data > select the Delete option
Field Properties :
To set the field properties: Select the table > Right click > Select the option Edit > the table
will open in Design View.
In design view there are different properties of fields according to the data type set for each
field.
Referential Integrity :
Referential integrity is used to maintain accuracy and consistency of data in a relationship. In
Base, data can be linked between two or more tables with the help of primary key and foreign
key
Select Statement :
A SELECT statement retrieves zero or more rows from one or more tables. SELECT is the
most commonly used Data Manipulation Language(DML) command. To retrieve all the
columns in a table the syntax is: SELECT * FROM <Table Name>;
For example, if you want to display all the data from table emp (short form of employee), the
command is
Select * from emp;
Performing calculations :
In Base, simple calculations can be done on the data using arithmetic operators. Example:
1) To display the salary of all the employees after incrementing by 1000 then the following
SQL command will be executed in Base. (Fields of table Employee are EmployeeID,
FirstName, Salary)
Select “EmployeeID”, “FirstName”, “Salary” +1000 from “Employee”;
2) To display the salary of all the employees after decreasing by 10000 then the SQL
command will be:
Select “EmployeeID”, “FirstName”, “Salary” – 10000 from “Employee”;
3) To display the salary of all the employees after incrementing it as twice the amount of
present salary, then the SQL command will be.
Select “EmployeeID”, “FirstName”, “Salary” * 2 from “Employee”
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 [WHERE <Condition>];
for example :
1) To increase(update) the salary of employee “Ravi” by Rs 2000 (in table
Employee)then the SQL command will be:
Update Employee set Salary = Salary + 2000 Where FirstName = “Ravi”;
Creating Form Using Wizard : Steps To Create Form Using Wizard are :
1) Click Use Wizard to Create Form… option under Tasks group. The Form Wizard dialog
box appears.
2) Select selective fields to be sent onto the form by selecting the field name and clicking
>button and click Next.
3) Select the option Add Subform if you need to insert the contents in the table in a separate
form and click Next.
4) Arrange selected fields in a form and click Next.
5) Select the data entry mode and click Next.
6) Specify the styles to be used in the form and click Next.
7) Specify the name of the form. Click Finish.
Creating Reports using wizard : Steps To Create Report Using Wizard are :
1) Click on Use Wizard to Create Report… option available under Tasks.
2) Select all the table fields by selecting the >> button.
3) Redefine the label of the fields in the reports or else you can set the default name and click
Next.
4) Define grouping for the fields of the table if required and click Next
5) Sort the field in the report by selecting the appropriate field name and sorting method(if
required) and click Next.
6) Select the layout of the report and click Next.
7) Define a name for the report and click Finish.