0% found this document useful (0 votes)
27 views8 pages

Notes (DBMS)

The document provides an overview of Relational Database Management Systems (RDBMS), explaining key concepts such as databases, DBMS, and their advantages, including data redundancy reduction and data integrity. It details various database terminologies like tables, fields, primary keys, and foreign keys, as well as the types of data and languages used in databases. Additionally, it outlines data types and common commands in Data Definition Language (DDL) and Data Manipulation Language (DML).
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views8 pages

Notes (DBMS)

The document provides an overview of Relational Database Management Systems (RDBMS), explaining key concepts such as databases, DBMS, and their advantages, including data redundancy reduction and data integrity. It details various database terminologies like tables, fields, primary keys, and foreign keys, as well as the types of data and languages used in databases. Additionally, it outlines data types and common commands in Data Definition Language (DDL) and Data Manipulation Language (DML).
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

CLASS 10(IT )

UNIT-3 : Relational Database Management System (RDBMS)

Database – A database is an organized collection of data. For example:-


In a stationary shop, detailed records of the materials available in the shop
is database. Similarly in a computerized system, we need to maintain
several files, we would use database programs such as Microsoft Access,
OpenOffice.org Base, and MySQL. These database programs are used to
organize the data as per our needs in the computer system.

Database Management System (DBMS) - A database management


system is a software package with computer programs that controls the
creation, maintenance and use of a database. A DBMS allows different
user application programs to concurrently access the same database.
Some of the DBMSs are Oracle, IBM DB2, Microsoft SQL server, Microsoft
Access, PostgreSQL, MySQL, FoxPro and
SQLite.

Advantages of Database

Reduces Data Redundancy : no chance of encountering duplicate data


Sharing of Data : the users of the database can share the data among
themselves
Data Integrity : Data integrity means that the data is accurate and consistent
in the database
Data Security : Only authorized users are allowed to access the database and
their identity is authenticated using a username and password

Privacy : The privacy rule in a database states that only the authorized
users can access a database according to its privacy constraints
Backup and Recovery : Database Management System automatically
takes care of backup and recovery.
Data Consistency : It ensures that the same data is available across all
related systems, applications, and databases.
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.

RDBMS:- A relational database management system (RDBMS) is a


database management system that is based on the relational model. In the
relational model of a database, all data is represented in terms of tuples
(rows), grouped into relations (tables). A database organized in terms the
relational model is a relational database.
Relational Database Terminology
• Entity – It is a real world object about which information is to be stored in
a database. For example, if we want to store information about an entity
Student in a school, then we need to have his admission number, roll
number, name, father’s name, date of birth, etc.
• Table – A table is a collection of logically related records. It is organised
as a set of columns, and can have any number of rows.
• Field or Columns or attributes – A field is the smallest entity in the
database. A collection of fields make a record, a collection of records make
a table and a collection of tables make a database.Fields are individual
record characteristics and are presented as columns within a table.
Data values are stored in a database as fields. A field holds the data
values of one type of data for several persons. For example, in the
Employee table the field “Emp Name” will hold the names of
employees of an organisation.

• Record or Row – The data values for all the fields related to a person or
object is called a record. It is presented as rows within a table. A record
holds the data values of all the fields for a single person or object in a
table.
• Primary Key – A primary key or simply a key is a field that uniquely
identifies a row in a table. The key identifier can be the value of a single
column or of multiple columns. The primary key is a unique identifier for the
table. The column or combinations of columns that form the primary key
have unique values. At any time, no two rows in the table can neither have
the same values for the primary key nor can data values for such fields be
left blank. For example, in a student table, each student has a unique roll
no., which forms the primary key. If, in a table we use more than one field
to identify a record, it is known as a composite key. For example, we may
form a composite key consisting of fields roll no. and name.
• Foreign Key – If a field or a combination of fields of one table can be
used to uniquely identify records of another table, then that particular field
is known as the foreign key. This foreign key helps to build a relation
between two tables. Consider the example given below. In the Student
Registration Table, ‘Enrolment_Number’ is the primary key and in the
Student Marks Table, ‘Roll_Number’ is the primary key, whereas
‘Enrollment_ Number’ is the foreign key. This foreign key can be used to
set a relation between two tables.
• Candidate Key – All the field values that are eligible to be the primary
key are the candidate keys for that table. Such fields can neither be left
blank nor can have duplicate values. So in the table Student Marks,
Enrollment Number and Roll Number both are candidate keys.
• Alternate Key – Out of the candidate keys, one or two are made as
primary keys. The others are the alternate keys. Hence, if Roll Number is
made as the primary key, Admission Number is the Alternate key.

Objects of an RDBMS: An object in a database is a structure or a feature


that is used to store, represent or retrieve data. In fact a database is a
collection of these objects that work on multiple sets of data related to each
other.
Various objects in a database are as discussed below:
• Table – As mentioned before, a table is the basic unit of any DBMS.
• Forms – A form is a feature of a database using which we can enter data
in a table in an easy and user friendly manner. A form consists of text
boxes, labels, radio buttons, list boxes, check boxes etc. that give a user
friendly interface for entering data. The data entered through the forms is
stored in tables.
• Queries – A query is used to retrieve the desired information from the
database. In simple terms, it is a question asked from the database. For
example, if we want to view the names of only those students who have
scored more than 50 marks, then we post a query. The data set matching
the given criterion is retrieved from the table and displayed on the screen.
• Reports – The output of a query may be displayed in the form of reports.
The usual result of the query is in the form of rows and columns. But if we
want the report to be formal and in proper layout, then we can use the
Reports feature of RDBMS.

For example, Table : Employee

Emp_Code Emp_Name Emp_Addres Emp_Design Emp_ContactNo Emp_Salar


s at io y

E001 ABC Meerut Manager 9876543210 Rs.500


00

Item : Employee
Field : Emp_Code , Emp_Name , Emp_Address , Emp_Designation ,
Emp_ContactNo , Emp_Salary
Record :
E001 ABC Meerut Manager 98765432 Rs.
1 50,000

Value : E001 , ABC , Meerut , Manager , 9876543210 , Rs. 50,000

DATA TYPES :- Datatypes are used to identify the type of data we are
going to store in the database.
Categories of data types:- Data types can be broadly classified into
five categories:-
1. Numeric Types
2. Alphanumeric Types
3. Binary Types
4. Date Time
5. Other variable Types

NUMERIC TYPES:- They are used for describing numeric values like
mobile number, age, etc.
The different types of numeric data types available are-

1. Boolean (Yes / No) 6. Numeric


2. TinyInt (Tiny Integer) 7. Decimal
3. SmallInt (Small Integer) 8. Real
4. Integer 9. Float
5. BigInt (Big Integer) 10. Double

ALPHANUMERIC TYPES:-
The list of different datatypes available in alphanumeric types are
1. LongVarChar (Memo) (Long Text)
2. Char (Text-fix) (Small Text)
3. VarChar (Text) (Text of specified Length)
4. VarChar_IgnoreCase (Text) (Comparisions are not case
sensitive)

BINARY TYPES:-

Binary types are used for storing data in binary formats. It can be used for
storing photos, music files or (in general file of any format) etc.
The list of different datatypes available in Binary types are :-

1. LongVarBinary (Image)
2. Binary (Binary (fix)
3. VarBinary (Binary)

DATE TIME:-

Date time data types are used for describing date and time values for the
field used in the table of a database. It can be used for storing information
such as date of birth, date of admission etc.
The list of different data types available in Date Time type are :-

1. Date (Stores month, day and year information)


2. Time (Store hour , minute and second information)
3. Timestamp (Stores date and time information)

There are two types of languages:-


1. DDL (Data Definition Language)
2. DML (Data Manipulation Language)

DATA DEFINITION / DESCRIPTION LANGUAGE:- It is a

standard for commands that define the different structures in a


database. DDL statements create,modify and remove database
objects such as tables, indexes and users.

Common DDL Statements are:-

1. Create :- Used to create database objects.


2. Alter :- Used to modify database objects.
3. Drop :- Used to delete database objects.

DATA MANIPULATION LANGUAGE:- It is a standard for commands


that enables users to access and manipulate data in a database.
Common DML Statements are:-

1. SELECT :- Used for retrieval of information from the database.


2. INSERT :- Used for insertion of new information into the
database.
3. DELETE :- Used for deletion of information in the database.
4. UPDATE :- Used for modification of information in the database.

You might also like