0% found this document useful (0 votes)
6 views16 pages

Database Concepts

Uploaded by

sunaina bokolia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views16 pages

Database Concepts

Uploaded by

sunaina bokolia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

DATABASE

CONCEPTS
INFORMATICS
PRACTICES
CLASS XI
EXAMPLES OF
COLLECTION OF DATA…

Telephone Directory
Student Attendance Register
DATABASE : Organized collection of
relevant data. It can be :
Manual / File System / Computerised

Issues with Manual


Databases/ File Systems:
It was very difficult to perform the
following operations on the manual
databases:
1. Updating details in existing data
2. Deleting data from within
3. Adding new Data
4. Searching for information based on
user’s need
5. Extracting
DBMS is a software that helps in
creating, storing, retrieving and
summarizing of bulk data, reducing the
data redundancy, inconsistency and
facilitating data sharing and security.
SIMPLY UNDERSTANDING :
DBMS doesn’t allow to establish relation
between multiple tables as RDBMS
does.
Hence RDBMS is called as
R – Relational
D – Data
B – base
M – Management
S -- System
WHICH RDBMS WE START TO
WORK WITH??

Key Features of MySQL :


Ease of Use Available Free of Cost
Supports standards based SQL
Provides portability High Security
Provides many data types
Handles large database.
HOW DOES A DBMS / RDBMS STORE
DATA ?
A Database Management System
stores data in the form of
databases which is a collection of
tables, indexes, views etc.
 Database : can be defined as an
organized collection of related
data. Example: database of
students, teachers, books, sports
equipments, medicines etc.
RDBMS TERMINOLOGY:
•Relation: Also called a table is the data
arranged in rows and columns ie. in the
tabular form having certain properties.

Row/Record/ ROLL NO NAME CLASS SECTION


Tuple

1001 PIYUSH 11 A

1002 SAMARTH 11 A
Column/Field
/Attribute 1003 SAMAIRA 11 B
•Tuple/Record: One Row of a Relation is called a
tuple.
•Attribute/Field: One column of a relation is
called an attribute.
•Domain: The Pool of values from which the
actual values of a column are selected is called
a domain.
•Degree: Number of attributes in a relation is
called its degree.
•Cardinality: Number of Rows in a relation is
called its cardinality.
•Database Engine: It is the underlying
component or set of programs used by a DBMS to
create database and handle various queries for
data retrieval and manipulation.
• Database Schema:
Database Schema is the design of a database. It is
the skeleton of the database that represents the
structure (table names and their fields/columns),
the type of data each column can hold, constraints
on the data to be stored (if any), and the
relationships among the tables.
• Meta Deta / Data Dictionary:
The database schema along with various
constraints on the data is stored by DBMS in a
database catalog or dictionary called the meta
data.
A meta-data is data about the data.
Three Important Properties of a Relation
1: Rules on an Attribute/Column/Field of the relation.
a) Each attribute in a relation has a unique name.
b) Sequence of attributes in a relation is immaterial.
2. Rules on a Tuple/Record/Row of the relation.
a) Each tuple in a relation is distinct.
b) Sequence of tuples in a relation is immaterial.
3. Rules on the State of a relation.
a) All data values in an attribute must be from the same
domain (same data type)
b) b) Each data value associated with an attribute must be
atomic (cannot be further divisible )
c) c) No attribute can have many data values in one tuple.
d) d) A special value NULL is used to represent values that
are unknown or non-applicable to certain attributes.
NULL means “no value”. Null doesn’t mean Zero.
KEYS IN AN RDBMS ENVIRONMENT

Keys are an important part of a relational database


and a vital part of the structure of a table. They help
enforce referential integrity and help identify the
relationship between tables.
There are four main types of keys –
1. Candidate keys
2. Primary keys
3. Alternate keys
4. Foreign keys.
 Primary Key: A column or set of columns that uniquely identifies
a row within a table is called primary key. In situations where no
single attribute in a relation is able to uniquely distinguish the
tuples, then more than one attribute are taken together as
primary key. Such primary key consisting of more than one
attribute is called Composite Primary key
 Candidate Key: Candidate keys are set of fields (columns
with unique values) in the relation that are eligible to act as a
primary key.

 Alternate Key: Out of the candidate keys, after selecting a


key as primary key, the remaining keys are called alternate
key.

 Foreign Key: A primary key of one table behaves as foreign


key of another table. In other words, a foreign key is a column
or a combination of columns that is used to establish a link
between two tables.
Example:
Relation: Student
Admno Name Class Fname Sec Mobile Perc
101 Anu 12 Mahesh A 981145 89
102 Meeta 12 Suman A 981156 90
103 Prithvi 12 Kumaran A 981148 34
104 Harsh 12 Mahesh B 981149 90

•Field names (Attributes/Columns) :- AdmNo, Name, Class, Fname,


Sec, Mobile and Perc
•Tuples (Rows/Records):
•Domain: Possible values of section are ('A','B','C','D')
•Degree: 7 (Number of columns).
•Cardinality: 4 (Number of rows).
Relation: Student
Admno Name Class Fname Sec Mobile Perc
101 Anu 12 Mahesh A 981145 89
102 Meeta 12 Suman A 981156 90
103 Prithvi 12 Kumaran A 981148 34
104 Harsh 12 Mahesh B 981149 90

 Candidate Key: In the above table, AdmNo and Mobile has unique values.
Therefore, AdmNo and Mobile are candidate keys.
 Primary Key: Out of the AdmNo and Mobile, I set AdmNo as the primary key.
 Alternate Key: Mobile is the Alternate key.
 Non Key Attributes : Name, Class, Sec, Fname, Perc

Note: One table can have only one P.key. A table can have
multiple foreign keys.

You might also like