You are on page 1of 12

ST.

JOSEPH’S CENTRAL SCHOOL , VIJAYANAGAR


CLASS X : IT 402 (2022-23)
Session -1 : Appreciate Concept Of Database Management System
DATABASE : A database is an organized collection of data. You can visualize it as a
container of information.
Eg:
Hospital database:
It is used to store the staff information in a hospital, doctor information, medicine
information, Inpatient info, outpatient info..etc
school database :
It is used to maintain teaching staff information ,non-teaching staff info, fees info, student
details, salary info,Library info..etc..
DBMS[stands for Data Base Management system]
A database management system is a software package with computer programs that
controls the creation, maintenance, and use of a database.
It allows organizations to conveniently develop databases for various applications.

Well known DBMSs include Oracle, IBM DB2, Microsoft SQL Server, MicrosoftAccess,
openoffice.org Base,PostgreSQL, MySQL, FoxPro, and SQLite.(below picture for the better
understanding of database and DBMS)

1
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.

Database Servers
Database servers are dedicated computers that hold the actual databases and run only the
DBMS and related software.
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.
Advantages of Database
 Reduces Data Redundancy
 Sharing of Data
 Data Integrity
 Data Security
 Privacy
 Backup and Recovery
 Data Consistency
 Reduces Data redundancy
occurs when the same piece of data is stored in two or more separate places, data redundancy
can cause data inconsistency.
This is prevented in a database as there is a single database and any change in it is reflected
immediately. Because of this, there is no chance of encountering duplicate data.

 Sharing of Data
The ability to share the same data resource with multiple applications or users.
Data sharing is a primary feature of a database management system (DBMS).
 Data integrity
Data integrity is normally enforced in a database system by a series of integrity constraints or
rules.
Data integrity means that the data is accurate and consistent in the database. Data Integrity is
very important as there are multiple databases in a DBMS.

2
 Data Security
. Only authorized users should be allowed to access the database and their identity should be
authenticated using a username and password. Unauthorized users should not be allowed to
access the database under any circumstances as it violates the integrity constraints.
 Privacy
The privacy rule in a database states that only the authorized users can access a database
according to its privacy constraints. For example - In social networking sites, access constraints
are different for different user.
 Backup and Recovery
Database Management System automatically takes care of backup and recovery. The users don't
need to backup data periodically because this is taken care of by the DBMS. Moreover, it also
restores the database after a crash or system failure to its previous condition
 Data Consistency
Data consistency is ensured in a database because there is no data redundancy.
Data Consistency means there should be multiple mismatching copies of the same data. All data
appears consistently across the database and must be same for all the users viewing the
database.
Features of Database
Database stores data or information in the form of tables .just like the one below

Table name: student Attribute or field(column name)

Name Class Section Age DOB Address


Raju 3 C 9 18/11/2012 kuvempunagar
Shivu 4 A 10 11/1/2011 Rajkumar road Tuple or
Julie 5 B 11 29/4/2010 vijayanagar Record
Austin 6 D 11 4/4/2010 SBI layout
Raju 3 C 9.5 26/7/2012 KHB colony

Table can store small record to billions of records in the data base.

Fields or attributes: In the database each individual piece of information is called as


fields or Attribute. (Here in the student database Name, Class , Section Age, Dob and
Address are fields)

Record or Tuple: Each row is called as a record, it is the information about the one item
or thing (Here it is about one student)

3
Value:It is the actual text, number, date.. etc. You put in while adding information to
your database. (Here in the student data base 3, c, 9 ,kuvempunar, 4/4/2110 are the
values)

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.

Referenced table or
parent table

Foreign key

Referencing table
or child table

RDBMS[stands for-Relational Database Management System]


RDBMS was introduced by E.F.Codd.of IBM's San Jose Research Laboratory. RDBMS
is a powerful data management system and is widely used across the world.

A relational database is a collective set of multiple data sets organized by tables, records
and columns. Relational database establish a well-defined relationship between database
tables.
A Relational database use Structured Query Language (SQL), which is a standard user
application that provides an easy programming interface for database interaction.

4
ASSESSMENT

Fill in the blanks:


1) A database is an organized collection of data.
2) A DBMS is a software package that can be used for creating and managing databases.
3) A RDBMS is a database management system that is based on the relational model.
4. Three popular DBMS software are open office base, oracle & Microsoft Access
5) A primary key is a unique value that identifies a row in a table.
6) Composite Key is a combination of one or more columns.

Short Answer Questions:

Q1. What does DBMS stands for?


Ans. DBMS stands for Database Management System.
Q2. What does RDBMS stands for?
Ans. RDBMS stands for Relational Database Management System.
Q3. How is data organized in a RDBMS?
Ans.
In RDBMS data is organized into rows and columns which collectively form a table.
Data is typically structured across multiple tables, which can be joined together via
primary key and foreign key, these keys are used to relate tables so that data can be
fetched from multiple tables.

Q4. State the relationship and difference between a primary and foreign key?
Ans. Primary key and Foreign key are used to relate the tables so that data can be fetched
from multiple tables.

We can not enter duplicate values in Primary key while duplicate values can be entered in
Foreign Key.

5
SESSION-2 : CREATE AND EDIT TABLES USING WIZARD & SQL COMMANDS

Fill in the blanks:


1. A table is a set of data elements that is organized using a model of vertical columns and horizontal
Rows.
2. A column is a set of data values of a particular type, one for each row of the table.
3. A row Or Record or Tuple represents a single, data item in a table.
4. Data types are used to identify which type of data we are going to store in thedatabase.
5. There are 2 ways to create a table.
6. Field properties can be set in both the Design View and Wizard View.

7. Data types are used to identify which type of data we are going to store in the database.

8. Data types in Open Office base are broadly classified into five categories.

9. By default all the fields will have Text [VARCHAR] data type.
10. Files of any format can be stored using the Binary data types.
11. Time stamp stores date and time information.
Short Answer Questions
1. In how many ways tables can be created in Base?
Ans: Table can be created in two ways
1) In design view
2) Using wizard
2.Why are data types used in DBMS /RDBMS?
Ans : Data types are used to identify which type of data(value) we are going to store in the data-
base.
Fields themselves can be of different types depending on the data they contain.

3.List data types available in Numeric Data type?


Ans. The different types of numeric data types are:
 Boolean
 Tinyint
 Smallint
6
 Integer
 Bigint
 Numeric
 Decimal
 Real
 Float
 Double
4. List data types available in Alphanumeric Data type?
Ans. The different types of Alphanumeric Data Type are:
 Longvarchar
 Char
 Varchar
 Varchar_Ignore Case

5.Define the structure of a table.


Tables
A table is a set of data elements (values) that is organized in vertical columns and horizontal
rows.A table has a defined number of columns, but can have any number of rows.
Each row is identified by a unique key index or the key field or P.K (Primary key)
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.
Rows or Records or Tuples
A row also called a Record or Tuple represent a single ,data item in a table

6.Differentiate between Tuples and Attributes of a table.

Ans. A row is also called a Record or Tuple, represents a single data item in a table.
A column or field is called attribute, which is a set of data values of a particular simple ype.

7.Name different Binary data types.


Ans. The different Binary data types are:

 Longvarbinary
 Binary
 Varbinary

7
SESSION-3: PERFORM OPERATIONS ON TABLE

Fill in the blanks:

1) The types of languages used for creating and manipulating the data in the Database
are DDL & DML.
2) A DDL is a standard for commands that define the different structures in a database.
3) A DML is a language that enables users to access and manipulate data in a database.
4) A SELECT is a part of DML involving information retrieval only.
5) A popular data manipulation language is SQL.
6) Tables are the basic building blocks of a database.
7) There are 3 types of Relationships in a table.
Short Answer Questions:
1. What is the file extension for databases created using OpenOffice.Org Base?
Ans. The extension is .odb

2. List any three file formats that can be managed using OpenOffice.Org Base?
Ans. Three file formats that can be managed using OpenOffice.Org Base.
1. .odb
2. .odf
3. .odt

3. How many types of relationships can be created in Base? Explain each of them.

Ans. There are three types of relationship in Open Office Base.

ONE to ONE : In this relationship, both the tables must have primary key columns.
Example: In the given tables EMP and DEPT, EMP_ID in EMP table and DEPT_ID in
DEPT table are the primary keys.(page No-137 ,fig-33)

ONE to MANY or MANY TO ONE : In this relationship, one of the table must have
primary key column.It signifies that one column of primary key table is associated with all
the columns of associated table.

Example: In the given tables Emp and DEPT ,EMP-ID in EMP table is primary key(page
138,figure 34)

MANY to MANY: In this relationship, no table has the primary key column. It signifies that
all the Columns of primary key table are associated with all the columns of associated table.

Example: IN the given tables EMP and DEPT, there is no primary key (page no-138,fig-35)

8
4. What do you mean by Sorting? In how many ways it can be done?
Ans. Sorting means arranging elements in particular sequence. It can be done in two ways.
1. Increasing order
2. Decreasing Order

5. Explain Referential Integrity with the help of an example.


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 constraints.
For example we have two tables :
Student table has fields Admno, Name, Fname , Mname (Admno is a primary Key)
Teacher table has fields T_id, Admno, Tname, Tsal (T_id is primary key and Admno is
Foreign Key)
Both the above tables can be linked by Common Fields that is : Admno

[ **** points for reference ***** ]

some RDBMS provides Graphical user interface to create queries ,but some RDBMS do not
,so that SQL or Structured Query Language (sequel) is used.
Database languages are also known as query languages or data query language.[ A query is
to collect specific information from the pool of data. A query helps us to join information
from different tables and filter that information
OR
Queries are commands that are used to define the data structure and also to manipulate the
data in the database.]
SQL- is the database language by the use of which we can perform certain operations on the
existing database and also we can use this language to create a database. SQL uses certain
commands like Create, Drop, Insert, etc. to carry out the required tasks.
There are two types of languages:-
1. DDL (Data Definition Language)
2. DML (Data Manipulation Language)

DDL (Data Definition Language)


A data definition language (DDL) is a computer language used to create and modify the
structure of database objects in a database.

9
Common DDL Statements or commands are:-
1. Create: - Used to create database or tables.
2. Alter: - Used to modify/change structure of table.
3. Drop: - Used to delete database objects.

DML (Data Manipulation Language)


A data manipulation language (DML) is a computer programming language used for adding
(inserting), deleting, and modifying (updating) data in a database. .

Common DML Statements are:-


1. SELECT: - Used to retrieves data from the database.
2. INSERT: - Used to insert new record into the database.
3. DELETE: - Used for deletion of records or rows from the database.
4. UPDATE :- Used for modification of information in the database

10
SESSION- 4: RETRIEVE DATA USING QUERY
session-4
Fill in the blanks:
1. A Form helps the user to systematically store information in the database.
2. A form enables users to view, enter, and change data direc in database objects such as tables.
3. SELECT statement retrieves zero or more rows from one or more database tables or database views.
4. By default, data is arranged in ascending order using ORDER BY clause.
5. UPDATE statement is used for modifying records in a database.
6. DELETE statement is used to remove one or more records in a Database.

Short answer Questions.


1. Name DML commands.
Ans:- . DML stands for Data Manipulation Language, DML Commands are:
SELECT-retrieve data from a database.
INSERT-insert data into a table.
UPDATE-updates existing data within a table.
DELETE-deletes all or specific records from a table.

2. What is the purpose of using queries?


Ans :- The purpose of using query is to collect specific information from the pool of
data(TABLE). A query also helps us to extract information from different tables.

3. Which clause of the Select statement helps to display specific data?

Ans:- Where clause of the Select statement helps to display specific data.

4. Differentiate between Where and Orderby clause of SQL.

Ans :-Where clause helps to retrieve specific row from the table and

ORDER BY clause specifies an order in which to return the rows.

5. State the purpose of Update Command with the help of an example.


Ans. Update statement is used for modifying records in a table,for example the following
command will change the Location to Bhubaneswar of the SDetails Table where roolno is 14

update SDetails set Location = ‘Bhubaneswar’ where Rollno = 14;

11
SESSION- 5: CREATE FORMS AND REPORTS USING WIZARD

Fill in the blanks:

1. To create a form you need to select the form option available under Database
section.
2. A query helps to collect specific information from the pool data in the database.
3. Report is used to display the summary of data.
4. Forms are the interfaces with which user the interacts.
5. Data from multiple tables can be stored in a database.

Short answer Questions.

1. Why there is a need to create Forms?


Ans. 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.

2. What is the purpose of creating Reports?


Ans. A report helps to display the data in a summarized manner. It is used to generate the
overall work outcome in a clear format. We can create reports in Open Office Base using
wizard.

3. What are the prerequisites to create a Form and Reports ?


Ans:- Table must be created and selected before creating forms and reports in Open Office

4. Differentiate between Forms and Reports.

A form provides an interface that allows users Reports are used to present data from tables or
to enter, change and view the data in a database queries in a format that can be printed.
table. Forms are made up of elements, such as
textboxes, labels

We can make changes to data. We cannot make changes to the data.

5. Can a form display data from queries?


Ans. Yes

6. In how many ways Forms and Reports can be created in a database?


Ans. Forms and Reports can be created in two ways:
1. Create Form in design View
2. Create Form using wizard

Report is created in wizard view.


12

You might also like