Data Base Management System.pdf

tenzingLhadon1 1,229 views 53 slides Jan 12, 2023
Slide 1
Slide 1 of 53
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53

About This Presentation

Class X CBSE ,IT 402


Slide Content

Office packages

DBMS
DATA BASE MANAGEMENT SYSTEM

•DATA: MEANINGLESS (10,20,30, TASHI)
•INFORMATION: MEANINGFUL (TASHI HAS
SCORED 10, 20 AND 30 MARKS IN EXAM)
DATA??????process ??????INFORMATION ??????
DATABASE (Collection of information & data)

For example
Library
•The system or program where all the data
regarding the books and its entries are stored in
database.
School Record :
Storage of student record

Data Base
•Data is a collection of data, which is stored in
a systematic manner, i.e. , in the form of
tables so that we can retrieve and manipulate
the information quickly and efficiently from a
large set of data.
•A database consists of one or more tables. A
table holds information in the form of rows
and columns.

ROLL
NO
NAME MARKS
1 Tashi 25
2 Lhamo 35
3 Nyima 45
Fields/ Attributes/Column Headings
Records/
Tuples/ rows
Data

Database
•Rowsare referred to as records. A record is a set
of related information that belongs to a
particular object. A single record is also known
as tuple
•Columnsare referred to as fields. A fields
describes a specific property of a record, that is
why a field is also known as an attribute.
•A set of characters that represents a valid values
are known as data.

A database is basically used by developer ,
administrator , and the end users.
Database
DBMS
END USER
ADMINISTRATOR
DESIGNER Person who design the database
Person who provides manage, access to others (
The person who uses

REVISION
•Data (raw facts and figures, unprocessed,
meaningless)
•Information (meaningful/ processed
•Database (place where data are stored,
collection of tables, table of combination of
records and tuples)
•Databse management system (software to
handles the data)

Database Management System
•Database Management system (DBMS) is a
computerised record keeping system or a
software that enabls you to create, store,
modify and extract information from a
database.
•It allows different use application program to
access the same database, concurrently.
•Data handling using becomes fast and
efficient

Advantages
•Enforcement of data standards (use standard
formats, e.g. dd/mm/yyyy)
•Data availability
•Reduced data redundancy (duplication)
•Minimized data inconsistency (accuracy)
•Data concurrency (accessing data simultaneously)
•Ensure data security
•Backup and recovery management

Different types of Database
Management System
•Relational Database Management System
(MS Access program, Data stored in table)
•Network Database Management System
(data connected in different area via links)
•Hierarchical Database Management System
(tree link structure arranged)
•Object Oriented Database Management System
(data recorded in object form used in other
programming language)

Relational Databse Mangement
System
●Relational database management system (RDBMS) is a
type of DBMS software that uses the Relational
Database (RDB) model for its database.
●RDBMS provides the features to create update, and
administer a relational database. this makes it easy to
search and retrieve the data within the database and
ensures that data integrity is maintained.
●the relational structure makes it possible to run
queries across multiple tables at once. some examples
of RDBMS are Oracle, LibreOfficeBase, MS Access,
Sybase, MySQLand MS SQL.

Concept of Keys
●a key plates an important role in relational
database. it is used for identifying unique
records (rows or tuples) from a table.
●it also establishes a relationship among
the tables.
●relationships are links that associate a
field in one table with a field in another
table.

Primary Key
●a primary key is a set of one of more fields
that uniquely identifies each record in a
table
●it does not contain any duplicate data
●a table can have only one primary key.
●the value in the primary key field is
different for every tuplethis helps in
uniquely identifying the records

●primary key field should be unique
●the primary key field cannot be NULL, i.e.
every row must have a value
●the value in a primary key field can never be
modified or updated if any foreign key refers
to the primary key.
Rules of primary key

Composite key
Acomposite key or composite primary key refers
to a combination of two or more attributes
(fields) that uniquely identify the records in a
table . it may be a candidate key or primary key.
Customer_ID Product_ID Product count
001 p001 158
002 p002 356
001 p003 65

Foreign key
●in other words, it consists of one or
more fields whose value matches
with a primary keyin another table.
●basically, a foreign key in one table
is use to point at a primary key in
another table. it acts as a cross-
reference between the tables.

Candidate Key
A table might have one or more fields may
uniquely identify the records(tuples). Such fields
are called candidate key as they are eligible to
become a primary key. Thus, a table can have
more than one candidate key.

Ms Access
•TABLE : to store the complete data
•QUERIES : to ask questions from the
records
•FORMS: accepts data from the user and
inserts in the corresponding table or
query.
•REPORTS: to display the selected data in a
printable format

CREATING AND USING TABLE
GO TO MS ACCESS
EXTENSIONS ARE
•Open office: .odb
•Ms access: .accdb

Creating tables
Design View
Datasheet View
Data type
Field Name

REFERENTIAL INTEGRITY-rule
•It states that a foreign key must have a primary
key, i.e, all its references must be valid and the
users cannot accidently delete or modify data

• table can have only one matching
record and vice versa
• a record of one table is associated
with several matching records.
• multiple records of one table are
associated with several records.

One to One

One to Many

Many to Many

Using Queries
•Retrieve data using Queries
•Queries are based on tables and the result of
a query is also displayed in the form of table.
•Using Query Wizard
•Using Query Design

Query using Design View

WILDCARDS
Wild cards are the special characters that are used
as substitutes for one or more characters in a
string(text value).
Two wildcards often used are
* and ?
*
?
[ ]
!
-

Using Likekeyword

Type here
An then click on run Option
CRITERIA

BUILT IN FUNCTIONS

STRUCTURED QUERY LANGUAGE(SQL)
SQL is the language used in RDBMS for
writing queries. Using SQL , a user can
create queries to fetch and manipulate the
data of the database.
Two types
•Data Definition Language (DDL)commands
•Data Manipulation Language(DML)
commands

•Go to SQL VIEW

SELECT * FROMSTUDENT;
SELECT* FROMSTUDENT ORDER BY
std_name ASC;
SELECT* FROMSTUDENT ORDER BY
std_nameDESC;
Names and other details in ascending order
Names and other in descending order

SELECT
SELECT
std_roll,
Std_name,
std_DOBfromSTUDENT;

SELECT stud_roll,stud_name,stud_fee from
STUDENTS;
SELECTstud_roll,stud_name,stud_fee FROMSTUDENTS
WHEREstud_birthplace='Delhi';
WHERE clause
ORDER BY clause
SELECTstud_roll,stud_name,stud_fee FROM
STUDENTS WHEREstud_fee=(5000);

USING LIKE COMMAND
select
stud_roll,stud_name
from students where
stud_namelike'T*';

DATA TYPES
•VARCHAR(size)
A VARIABLE length string (can contain letters,
numbers, and special characters).
Thesizeparameter specifies the maximum string
length in characters -can be from 0 to 65535
•INTEGER(size)
Equal to INT(size)
•DATE
A date. Format: YYYY-MM-DD. The supported
range is from '1000-01-01' to '9999-12-31'

CREATE TABLE table_name
(
Field_name1 Datatype,
Field_name2 Datatype
Field_name3 Datatype,
);
Table_name
Field_name1Fieldname_2
101 Dolma

To create a table
create table student
(
fnamevarchar(20),
mnamevarchar(20)
);
create table student
(
stud_idinteger not null primary key,
stud_fathervarchar(20),
stud_mothervarchar(20),
address varchar(20),
result varchar(20)
)

INSERT values in table
insertinto students(stud_roll,stud_name)
values(1001,’Tsering Dolma');
Table name
Field name

UpdateSTUDENTS
Set stud_name=Lhamodolmawhere
stud_id=103;
UPDATE values in table

Deletefrom STUDENTS
Wherestud_id=103;
DELETEvalues in table

ALTER
altertable students
addlastschool
varchar(20);

Drop table STUDENTS
DROP

FORMS
Tags