2. Class – X
Subject: Information Technology(402)
Teacher’s name: Meenakshi Sharma
Vocational Skills
Unit – 4
DBMS(Part-1)
3. SESSION 1: APPRECIATE THE CONCEPT OF DATABASE MANAGEMENT
SYSTEM
A database is an organized collection of data. It is considered as a container of
information. In the manual system, you would maintain several files with different
bits of information while in the computerized system you would use database
programs such as Microsoft Access, OpenOffice.org Base, and MySQL, to organize
the data as per your business need.
Database Management System :
A database management system is a software package with computer programs that
controls the creation, maintenance, and use of a database. for example Oracle, IBM
DB2, Microsoft SQL Server, Microsoft Access, PostgreSQL, MySQL, FoxPro, and
SQLite.
4. 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.
5. Advantages of Database :
1) Reduces Data Redundancy : Database reduces data redundancy (duplication of data)
2) Sharing of Data : In a database, the users of the database can share the data among
themselves.
3) Data Integrity : Data integrity means that the data is accurate and consistent in the
database.
4) Data Security : Database provides data security as only authorized users are allowed
to access the database and their identity are authenticated by using a username and
password.
5) Privacy : The privacy rule in a database states that only the authorized users can
access a database according to its privacy constraints.
6) Backup and Recovery : Database Management System automatically takes care of
backup and recovery.
Some key features of a database:
1) A database can have one or many tables.
2) Each table in a database contains information about one type of item.
3) Every table has a key field which ensures that there are 100% unique values
throughout the database.
6. Application Areas of Database System
Sector -- Uses of DBMS
Banking-For customer information, account activities, payments, deposits, loans, etc.
Airlines-- For reservations and schedule information.
Universities- For student information, course registrations, colleges and grades.
Telecommunication --It helps to keep call records, monthly bills, maintaining
balances, etc.
Finance--For storing information about stock, sales, and purchases of financial
instruments like stocks and bonds.
Sales--Use for storing customer, product & sales information.
Manufacturing-- It is used for the management of the supply chain and for tracking
the production of items. Inventories status in warehouses.
HR Management For information about employees, salaries, payroll, deduction,
generation of pay checks etc.
7. Components of DBMS
DBMS has several components, each performing very significant tasks in the database
management system environment. The term database system refers to an
organization of components that define and regulate the collection, storage,
management, and use of data within a database environment. Below is a list of
components within the database and its environment.
Hardware- Consists of a set of physical electronic devices such as computers, I/O
devices, storage devices, etc., this provides the interface between computers and the
real-world systems.
Software - This is the set of programs used to control and manage the overall
database. This includes the DBMS software itself, the Operating System, the network
software being used to share the data among users, and the application programs
used to access data in the DBMS.
Procedures - These are the instructions and rules that assist on how to use the DBMS,
and in designing and running the database, using documented procedures, to guide
the users that operate and manage it.
Data - DBMS exists to collect, store, process and access data, the most important
component. The database contains both the actual or operational data and the
metadata.
8. Data Manager - Also called the cache manager, this is responsible for the handling of
data in the database, providing a recovery to the system that allows it to recover
the data after a failure.
Database Engine - The core service for storing, processing, and securing data, this
provides controlled access and rapid transaction processing to address the
requirements the most demanding data-consuming applications. It is often used to
create relational databases for online transaction processing or online analytical
processing data
Components of Database Management System (DBMS) with diagram
9. Database Server
Database server is a computer system that provides other computers with services
related to accessing and retrieving data from a database. Access to the database
server may occur via a "front end" running locally a user's machine or "back end"
running on the database server itself, accessed by a remote shell. After the
information in the database is retrieved, it is outputted to the user requesting the
data.
10. ASSESSMENT
1. Database management system is software.
2. application area of database system used for storing information about stock,
sale and purchases of financial instruments like stocks and bonds.
3. Banking application area is used for purpose in Database system.
4. Data is represented with the help of and
5. Information is the data on which decisions and actions are based.
6. Information measured in meaningful units like and
7. A table has and
8. Name the characteristics of information?
9. Difference between Data, Database, and Database management system?
10. Differentiate between data and information?
11. Define various advantages of DBMS?
12. Define the components of DBMS?
13. Define database server?
11. Session-2: Data Storage
Relational Data Model (RDM)
The relational data model is the primary data model, which is used widely around the world for
data storage and processing. This model is simple and it has all the properties and capabilities
required to process data with storage efficiency.
RDBMS
A relational database management system (RDBMS) is a database management system that is
based on the relational model as introduced by E. F. Codd, of IBM's San Jose Research
Laboratory. The most popular databases currently in use are based on the relational database
model. The relational model for database management is a database model based on first-
order predicate logic, first formulated and proposed in 1969 by Edgar F. Codd. In the relational
model of a database, all data is represented in terms of tuples, grouped into relations.
Concepts
Tables − In the relational data model, relations are saved in the format of Tables. This format
stores the relationships among entities. A table has rows and columns, where rows represent
records and columns represent the attributes.
Tuple − A single row of a table, which contains a single record for that relation is called a tuple.
Relation instance − A finite set of tuples in the relational database system represents relation
instance. Relation instances do not have duplicate tuples.
Relation schema − A relation schema describes the relation name (table name), attributes, and
their names.
12. Relation key − Each row has one or more attributes, known as relation key, which can
identify the row in the relation (table) uniquely.
Attribute domain − Every attribute has some pre-defined value scope, known as attribute
domain.
Data types
Data types are used to identify which type of data (value) we are going to store in the
database. Fields themselves can be of different types depending on the data they contain.
Data types in the Open Office base is broadly classified into five categories listed below.
1. Numeric Types
2. Alphanumeric Types
3. Binary Types
4. Date time
5. Other Variable types
Numeric Types
Numeric data types are used for describing numeric values for the field used in the table of a
database. Numeric data types in a database can be used for storing information such as
mobile number, roll number, door number, year of school admission, true or false statements,
statistical values, etc. The different types of numeric data types available are listed here.
14. Alphanumeric Types
Binary Types
Binary data types are used for storing data in binary formats. Binary data types in a
database can be used for storing photos, music files, etc. In general, files of any
format can be stored using the binary data type. The different types of binary data
types available are listed here.
15. Date Time Type
Date time data types are used for describing date and time values for the field used in
the table of a database. Date time data types in a database can be used for storing
information such as date of birth, date of admission, date of product sale, etc. The
different types of date-time data types available are listed here.
16. Database Keys
Keys play a very important role in DBMS. They are crucial for the arrangement of tables in the
database. Any attribute in the table which uniquely identifies each record in the table is called a
key. It can be a single attribute or a combination of attributes. Database keys are also useful in
establishing a relationship between one table with other tables. For example, in STUDENT table,
STUDENT_ID is a key, since it is unique for each student. In PERSON table, his passport number,
driving license number, phone number, SSN, email address is keys since they are unique for each
person
Primary Key
The primary key is the most important key in the database. There can be only one primary key in a
table. It will not accept duplicate or null values. Primary key contains unique values. It can be a
single attribute or a combination of attributes
For example, for an employee EMPLOYEE-ID. is a primary key.
17. Foreign Key
A foreign key can be a common key in two database table. Using a
foreign key, we can identify records from multiple tables. It accepts
duplicate values as well as null values. Foreign key also helps you to reduce the data
redundancy.
For example, we add the primary key of the DEPARTMENT table, Department_Id as a
new attribute in the EMPLOYEE table. Now in the EMPLOYEE table, Department_Id
is the foreign key, and both the tables are related.
18. Candidate key
A candidate key is a set of one or multiple columns in a database table.
It can identify a record uniquely just like a primary key. These are other unique
columns that can become a primary key. The candidate keys are as strong as the
primary key. For example, in employee table, EMPLOYEE_ID is best suited for
primary key as its from his own employer. Rest of the attributes like passport
number, SSN, license Number etc. are considered as candidate key.
Alternate Key
The alternate key can be an alternative or a candidate for primary key when needed
but it is not the primary key. An alternate key is a function of all candidate keys
except the primary key. For Example, In Employee table, Employee_PhoneNumber
will have unique values thus it can be used as an alternate key but it is not a
primary key.
19. Super Key
Super key is a set of an attribute which can uniquely identify a tuple. Super key is a
superset of a candidate key. A super key is not restricted to have any specific number
of attributes. Thus, a super key may consist of any number of attributes.
Composite Key
A key that consists of more than one attribute to uniquely identify rows (also known as
records & tuples) in a table is called composite key. In other words, when a record
cannot be uniquely identified by a single field, in such cases a composite key is used.
ASSESSMENT
1. Full form of RDBMS is
2. In Relation key, every row has one, two or multiple
3. Every attribute has some pre-defined value and scope which is known as
4. Foreign key also helps you to reduce the data _
5. A key that consists of more than one attribute to uniquely identify rows in a table
is Called
6. An alternate key is a function of all candidate keys except the key.
7. Primary key contains values.
20. True and false: -
1. The total number of attributes which in the relation is called the degree of the
relation.
2. The tuple contains multiple records in the table.
3. Total number of rows present in the table called Cardinality.
Answer the following questions: -
1. Define RDBMS?
2. Difference between Primary and foreign key?
3. Foreign key accepts duplicate values as well as null values.
4. A candidate key is a set of one or multiple columns in a database table.
5. Foreign key we cannot identify records from multiple tables.
6. Keys are not crucial for the arrangement of tables in the database.
7. Define the Candidate key and Alternate key?
8. Define the Super key and Composite key
9.