Ch-8 Introduction to DBMS
Ch-8 Introduction to DBMS
Introduction to
DataBase Management System (DBMS)
Database
• A database is an organized collection of data.
• It is considered as a container of information.
• A database is considered as Backend.
• 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, LibreOffice Base, OpenOffice.org Base, and MySQL, to organize the data as per
your business need.
Data Information
1. Data is a raw fact and figure. 1. Information is the processed data
2. Data is Incomplete. 2. Information is complete.
3. Data is meaningless. 3. Information is meaningful.
4. Data is Unstructured. 4. Information is structured.
Databases and DBMS
• A database is a collection of logically related data items stored in an organised manner.
• The information being stored in a database can be added, modified, deleted or displayed
according to the requirements of the user.
• for example, the phone book can be considered a simple database which contains Name
and Mobile number in an orderly manner.
Database Management System (DBMS)
• The software that is used to create, update and retrieve data is known as database
management system (DBMS).
• It facilitates planning and maintenance of the database for the user.
• Some of the common examples of DBMS are MS Access, Open Office or LibreOffice base,
Oracle, MySQL, PostgreSQL SQL Server.
Note: SQL means Structured Query Language
Advantages of Database
1) Organised Storage: The data in the database is stored in an organised manner, so that
retrieval of the required data is fast and accurate.
2) Data Analysis: A database helps in analysis of data based on certain criteria.
3) Reduces Data Redundancy: Database reduces data redundancy (duplication of data)
4) Sharing of Data: In a database, the users of the database can share the data among
themselves.
5) Data Integrity: Data integrity means that the data is accurate and consistent in the database.
6) 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.
7) Privacy: The privacy rule in a database state that only the authorized users can access a
database according to its privacy constraints.
8) Backup and Recovery: Database Management System automatically takes care of backup
and recovery.
Data Models
• A structure of database that describes the manner in which data will be stored and
retrieved is known as data model.
• A data model consists of components for describing the data, relationships among them
and the constraints that hold data.
Designation Employee
Incharge
❖ Primary Key: A primary key or simply a key is a field that uniquely identifies each and
every record in a table.
❖ Foreign key: The foreign key identifies a column or set of columns in one (referencing)
table that refers to a column or set of columns in another (referenced) table.
Student Registration Table
Admission No Student Name Class Date of Birth Date of Admission Fees
023/2024 Ankit Kumar X 12/03/2009 23/09/2024 1200
024/2024 Lisa Samal X 23/03/2009 23/09/2024 1200
NOTE:
In Student Registration Table, ‘Admission_No’ is the primary key and in the Student Marks
Table, 'Roll_Number' is the primary key, whereas Admission No’ is the foreign key.
❖ Difference between Primary Key and Foreign Key
Primary Key Foreign Key
1. A primary key uniquely identifies each 1. Foreign key establishes a link or reference
record in a table between two tables
2. A table can only have one primary key. 2. A table can have more than one foreign key.
3. A table must have a primary key. 3. A table may or may not have a foreign key.
4. A primary key won't accept null values, but 4. Foreign keys can accept null values in
various ways.
❖ 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 Mark, Admission_No and Roll_No 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_No is made as the primary key, Admission_No is the Alternate key.
❖ Composite Primary Key: When primary key constraint is applied on one or more columns
then it is known as Composite Primary Key.
❖ Relational Database: A relational database is a collection of related tables.
❖ Data Values: Data values are the raw data represented in numeric, character or alphanumeric
form. Examples of data values are 'Abhinav Bindra', '26' 'shooting', "Chandigarh", "10-12-
2018", etc.
NOTE:
• A collection of fields makes a record, a collection of records make a table and a collection
of tables make a database.
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 given below
• Table : - A table is the basic unit of any DBMS. The data is first stored in tables in row and
column format.
• 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. 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.
• Reports: - A report is the formatted result of queries which contains data required for
decision-making and analysis.
SUMMARY
1. The raw facts constitutes data.
2. Information is the processed or organised form of data.
3. A database is a collection of logically related data items stored in an organised manner.
4. The software that is used to create, update and retrieve data is known as database management
system (DBMS).
5. Some of the common examples of DBMS are MS Access, Open Office or LibreOffice Base, Oracle,
Ingress, MySQL.
6. Data Model is the structure of database and it describes the manner in which data will be stored and
retrieved.
7. There are different data models, such as hierarchical data model, network data model and relational
data model.
8. In Hierarchical Data Model, the data is organised into a tree like structure. The data is stored in the
form of linked records.
9. In Network Data model, multiple records are linked to same master file.
10. The Relational data model is based on the principle of setting relationships between two or more
tables of the same database.
11. Entity is a real world object about which information is to be stored in a database.
12. The details associated with the entity are called attributes.
13. A table is a collection of logically related records. It is organised as a set of columns, and can have
any number of rows.
14. A field is the smallest entity in the database. These are individual record characteristics and are
presented as columns within a table.
15. Data values are the raw data represented in numeric, character or alphanumeric form.
16. 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.
17. A primary key is a field that uniquely identifies a row in a table.
18. This foreign key helps to build a relation between two or more tables in a database.
19. All the field values that are eligible to be the primary key are the candidate keys for that table.
20. Out of the candidate keys, one or two are made as primary keys. The others are the alternate keys.
21. An object in a database is a structure or a feature that is used to store, represent or retrieve data.
The various objects in a database are tables, forms, reports and queries.
22. A form is a feature of a database using which we can enter data in a table in an easy and user
friendly manner.
23. A query is used to retrieve the desired information from the database.
24. The output of a query may be displayed in the form of reports.
Multiple choice questions
1. Which of the following can be considered as an example of a database?
(a) Dictionary (b) Telephone directory
(c) Marks Register (d) Newspaper
2. Which of the following is NOT a DBMS?
(a) MS Access (b) Open Office Base
(c) MS Excel (d) MySQL
3. DBMS stands for ______________________.
(a) Data and Books Management System (b) Database Management System
(c) Duplicate Books Management System (d) Data Management Multi System
4. Which of the following data models sets a relation between the two or more tables?
(a) Relational Data Model (b) Network Data Model
(c) Hierarchical Data Model (d) Connection Data Model
5. The details associated with an entity are called ____________.
(a) Table (b) Attributes
(c) Records (d) Primary key
A __________ is represented as rows in a table.
(a) field (b) attribute
(c) record (d) candidate key
7. In which of the following forms can a data value be represented?
(a) Numeric (b) Character
(c) Alphanumeric (d) All of the above
8. Which of the following uniquely identifies a row in a table?
(a) Primary key (b) Alternate key
(c) Foreign key (d) Candidate key
9. A ___________is a feature of a database using which we can enter data in a table in an easy and
user friendly manner.
(a) query (b) report
(c) form (d) field
10. A _____________ is a question asked from a database.
(a) query (b) report
(c) form (d) field