•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 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'