SlideShare a Scribd company logo
INTRODUCTION TO
DATABASE
Introduction
◦ DBMS stands for Database Management System.
◦ We can break it like this DBMS = Database + Management System.
◦ Database is a collection of data and Management System is a set of programs to store and retrieve
those data.
◦ Based on this we can define DBMS like this: DBMS is a collection of inter-related data and set
of programs to store & access those data in an easy and effective manner.
Tables
◦ A table is a collection of data elements organized in terms of rows and columns.
◦ A table is also considered as a convenient representation of relations. But a table can have
duplicate row of data while a true relation cannot have duplicate data. Table is the most
simplest form of data storage.
◦ Example of an Employee table.
ID Name Age Salary
1 Adam 34 13000
2 Alex 28 15000
3 Stuart 20 18000
4 Ross 42 19020
Entity
◦ Entity is a person, place, thing or event that we want to store information about.
◦ Example: Employee is an entity.
ID Name Age Salary
1 Adam 34 13000
2 Alex 28 15000
3 Stuart 20 18000
4 Ross 42 19020
Records/Row/Tuple
◦ A single entry in a table is called a Tuple or Record or Row.
◦ A tuple in a table represents a set of related data. For example, the above Employee table has 4
tuples/records/rows.
ID Name Age Salary
1 Adam 34 13000
2 Alex 28 15000
3 Stuart 20 18000
4 Ross 42 19020
Employee table has 4
tuples/records/rows
Attributes
◦ A table consists of several records(row), each record can be broken down into several smaller
parts of data known as Attributes.
ID Name Age Salary
1 Adam 34 13000
2 Alex 28 15000
3 Stuart 20 18000
4 Ross 42 19020
Employee table consist of four
attributes, ID, Name, Age and Salary.
Keys
◦ Keys are used to uniquely identify any record or row of data from the table.
◦ For example: In Student table, ID is used as a key because it is unique for each student. In
PERSON table, passport_number, license_number, SSN are keys since they are unique for each
person.
Types of Keys
Primary key
◦ It is the first key which is used to identify one and only one instance of an entity uniquely.
◦ An entity can contain multiple keys as we saw in PERSON table. The key which is most suitable
from those lists become a primary key.
Multiple unique keys
Candidate Key
◦ A candidate key is an attribute or set of an attribute which can uniquely identify a tuple.
◦ The remaining attributes except for primary key are considered as a candidate key.
Candidate key
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.
◦ For example: In the below EMPLOYEE table, for(EMPLOEE_ID, EMPLOYEE_NAME) the name of
two employees can be the same, but their EMPLYEE_ID can't be the same. Hence, this
combination can also be a key.
Super key
Foreign key
◦ Foreign keys are the column of the table which is used to point to the primary key of another
table.
◦ 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.
Integrity Constraints
◦ Integrity constraints are a set of rules. It is used to maintain the quality of information.
◦ Integrity constraints ensure that the data insertion, updating, and other processes have to be
performed in such a way that data integrity is not affected.
Domain constraints
◦ Domain constraints can be defined as the definition of a valid set of values for an attribute.
◦ The data type of domain includes string, character, integer, time, date, currency, etc. The value
of the attribute must be available in the corresponding domain.
◦ Example:
Entity integrity constraints
◦ The entity integrity constraint states that primary key value can't be null.
◦ This is because the primary key value is used to identify individual rows in relation and if the
primary key has a null value, then we can't identify those rows.
◦ A table can contain a null value other than the primary key field.
◦ Example:
Referential Integrity Constraints
◦ A referential integrity constraint is specified between two tables.
◦ In the Referential integrity constraints, if a foreign key in Table 1 refers to the Primary Key of
Table 2, then every value of the Foreign Key in Table 1 must be null or be available in Table 2.
Key constraints
◦ Keys are the entity set that is used to identify an entity within its entity set uniquely.
◦ An entity set can have multiple keys, but out of which one key will be the primary key. A primary
key can contain a unique and null value in the relational table.
Schema Architecture
◦ This framework is used to describe the structure of a specific database system.
◦ The three schema architecture is also used to separate the user applications and physical
database.
◦ The three schema architecture contains three-levels. It breaks the database down into three
different categories.
Internal Level
◦ The internal level has an internal schema which describes the physical storage structure of the
database.
◦ The internal schema is also known as a physical schema.
◦ It uses the physical data model. It is used to define that how the data will be stored in a block.
◦ The physical level is used to describe complex low-level data structures in detail.
Conceptual Level
◦ The conceptual schema describes the design of a database at the conceptual level. Conceptual
level is also known as logical level.
◦ The conceptual schema describes the structure of the whole database.
◦ The conceptual level describes what data are to be stored in the database and also describes
what relationship exists among those data.
◦ In the conceptual level, internal details such as an implementation of the data structure are
hidden.
◦ Programmers and database administrators work at this level.
External Level
◦ At the external level, a database contains several schemas that sometimes called as subschema.
The subschema is used to describe the different view of the database.
◦ An external schema is also known as view schema.
◦ Each view schema describes the database part that a particular user group is interested and
hides the remaining database from that user group.
◦ The view schema describes the end user interaction with database systems.
Data Independence
◦ Data independence can be explained using the three-schema architecture.
◦ Data independence refers characteristic of being able to modify the schema at one level of the
database system without altering the schema at the next higher level.
Logical Data Independence
◦ Logical data independence refers characteristic of being able to change the conceptual schema
without having to change the external schema.
◦ Logical data independence is used to separate the external level from the conceptual view.
◦ If we do any changes in the conceptual view of the data, then the user view of the data would
not be affected.
◦ Logical data independence occurs at the user interface level.
Physical Data Independence
◦ Physical data independence can be defined as the capacity to change the internal schema
without having to change the conceptual schema.
◦ If we do any changes in the storage size of the database system server, then the Conceptual
structure of the database will not be affected.
◦ Physical data independence is used to separate conceptual levels from the internal levels.
◦ Physical data independence occurs at the logical interface level.
Need for using DBMS
◦ Processing Queries
◦ Controlling redundancy and inconsistency
◦ Efficient memory management and indexing
◦ Concurrency control and transaction management
◦ Access control and ease in accessing data
◦ Integrity constraints

More Related Content

PPT
Basic DBMS ppt
PPTX
07. Virtual Functions
PPT
Database Management System Introduction
PPTX
Introduction to Database
PPT
1. Introduction to DBMS
PPTX
Introduction to database
PPT
Html basics
PPT
Virtual memory
Basic DBMS ppt
07. Virtual Functions
Database Management System Introduction
Introduction to Database
1. Introduction to DBMS
Introduction to database
Html basics
Virtual memory

What's hot (20)

PPTX
PPTX
Basic Concept Of Database Management System (DBMS) [Presentation Slide]
PDF
Chapter 2 Relational Data Model-part1
PPT
Database management system presentation
PPTX
Integrity Constraints
PPTX
Database Management System, Lecture-1
PPTX
Functional dependencies in Database Management System
PPTX
Key and its different types
PPT
Files Vs DataBase
PPS
Data models
PPT
Data Base Management System
PPTX
Data warehouse architecture
PPTX
Relational Database Design
PPT
Lecture 01 introduction to database
PPTX
The Relational Database Model
PPT
Object Oriented Database Management System
PPTX
File organization
PPT
Database Chapter 3
PPTX
Multidimensional data models
Basic Concept Of Database Management System (DBMS) [Presentation Slide]
Chapter 2 Relational Data Model-part1
Database management system presentation
Integrity Constraints
Database Management System, Lecture-1
Functional dependencies in Database Management System
Key and its different types
Files Vs DataBase
Data models
Data Base Management System
Data warehouse architecture
Relational Database Design
Lecture 01 introduction to database
The Relational Database Model
Object Oriented Database Management System
File organization
Database Chapter 3
Multidimensional data models
Ad

Similar to Introduction to database (20)

PPTX
Unit 2 DBMS.pptx
DOCX
RELATIONAL DATABASE PURPOSE OF DATABASE SYSTEM
PPTX
Database Management System
PDF
RDBMS NOTES 1.pdf BWSBFDGFEDRHHYGTRFEDCWXSDFRGTHYUJ7IK89O8IJUY7HGTR
PDF
Chapter 2 Database System Architecture.pdf
PPTX
Database Concepts.pptx
PPTX
DATABASE-1.pptx
PPTX
PPTX
RDMS AND SQL
PPTX
DBMS for beginners with examples.pptx
PPTX
DATABASE DESIGN.pptx
PDF
ans_dbms.pdf
DOCX
Dbms important questions and answers
DOCX
Dbms interview ques
PPTX
DBMS (1).pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPT
ER Digramms by Harshal wagh
PPTX
PPT_DBMS.pptx
PDF
Chapter 02.pdf databse schema architecture
PDF
RDBMS Unit-2.pdf Entity Relationship Diagram
Unit 2 DBMS.pptx
RELATIONAL DATABASE PURPOSE OF DATABASE SYSTEM
Database Management System
RDBMS NOTES 1.pdf BWSBFDGFEDRHHYGTRFEDCWXSDFRGTHYUJ7IK89O8IJUY7HGTR
Chapter 2 Database System Architecture.pdf
Database Concepts.pptx
DATABASE-1.pptx
RDMS AND SQL
DBMS for beginners with examples.pptx
DATABASE DESIGN.pptx
ans_dbms.pdf
Dbms important questions and answers
Dbms interview ques
DBMS (1).pptx
MYSQL Presentation for SQL database connectivity
ER Digramms by Harshal wagh
PPT_DBMS.pptx
Chapter 02.pdf databse schema architecture
RDBMS Unit-2.pdf Entity Relationship Diagram
Ad

More from Pradnya Saval (20)

PPTX
Erp implementation and lifecycle
PPTX
Electronic customer relationship management (e crm)
PPTX
Data warehouse and data mining
PPTX
Concepts of erp
PPTX
Understanding major functional systems
PPTX
Supply chain management (scm)
PPTX
Knowledge process outsourcing
PPTX
Erp softwares
PPTX
Deep Learning - RNN and CNN
PPTX
Integrated services - IntServ
PPTX
WAN Technology - ATM
PPTX
Data Communication and Optical Network
PDF
WAN Technology : ATM - Forouzan
PDF
Data Communications and Optical Network - Forouzan
PDF
Integrated services and RSVP - Protocol
PDF
Differentiated services - Advance Routing
PPTX
Protocol and Interfaces - IPv4, IPv6, X.25 Protocol, X.75 Protocol
PPTX
Protocols and Interfaces - IPv4, IPv6, X.25, X.75
PPTX
X.75 Internetworking protocol
PPTX
Theory of operations - Mature Packet Switching Protocols
Erp implementation and lifecycle
Electronic customer relationship management (e crm)
Data warehouse and data mining
Concepts of erp
Understanding major functional systems
Supply chain management (scm)
Knowledge process outsourcing
Erp softwares
Deep Learning - RNN and CNN
Integrated services - IntServ
WAN Technology - ATM
Data Communication and Optical Network
WAN Technology : ATM - Forouzan
Data Communications and Optical Network - Forouzan
Integrated services and RSVP - Protocol
Differentiated services - Advance Routing
Protocol and Interfaces - IPv4, IPv6, X.25 Protocol, X.75 Protocol
Protocols and Interfaces - IPv4, IPv6, X.25, X.75
X.75 Internetworking protocol
Theory of operations - Mature Packet Switching Protocols

Recently uploaded (20)

PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Institutional Correction lecture only . . .
PDF
Insiders guide to clinical Medicine.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Basic Mud Logging Guide for educational purpose
PDF
Complications of Minimal Access Surgery at WLH
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
GDM (1) (1).pptx small presentation for students
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Pre independence Education in Inndia.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Institutional Correction lecture only . . .
Insiders guide to clinical Medicine.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Final Presentation General Medicine 03-08-2024.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
TR - Agricultural Crops Production NC III.pdf
Basic Mud Logging Guide for educational purpose
Complications of Minimal Access Surgery at WLH
Abdominal Access Techniques with Prof. Dr. R K Mishra
GDM (1) (1).pptx small presentation for students
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
human mycosis Human fungal infections are called human mycosis..pptx
Pre independence Education in Inndia.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
102 student loan defaulters named and shamed – Is someone you know on the list?
Supply Chain Operations Speaking Notes -ICLT Program
O7-L3 Supply Chain Operations - ICLT Program

Introduction to database

  • 2. Introduction ◦ DBMS stands for Database Management System. ◦ We can break it like this DBMS = Database + Management System. ◦ Database is a collection of data and Management System is a set of programs to store and retrieve those data. ◦ Based on this we can define DBMS like this: DBMS is a collection of inter-related data and set of programs to store & access those data in an easy and effective manner.
  • 3. Tables ◦ A table is a collection of data elements organized in terms of rows and columns. ◦ A table is also considered as a convenient representation of relations. But a table can have duplicate row of data while a true relation cannot have duplicate data. Table is the most simplest form of data storage. ◦ Example of an Employee table. ID Name Age Salary 1 Adam 34 13000 2 Alex 28 15000 3 Stuart 20 18000 4 Ross 42 19020
  • 4. Entity ◦ Entity is a person, place, thing or event that we want to store information about. ◦ Example: Employee is an entity. ID Name Age Salary 1 Adam 34 13000 2 Alex 28 15000 3 Stuart 20 18000 4 Ross 42 19020
  • 5. Records/Row/Tuple ◦ A single entry in a table is called a Tuple or Record or Row. ◦ A tuple in a table represents a set of related data. For example, the above Employee table has 4 tuples/records/rows. ID Name Age Salary 1 Adam 34 13000 2 Alex 28 15000 3 Stuart 20 18000 4 Ross 42 19020 Employee table has 4 tuples/records/rows
  • 6. Attributes ◦ A table consists of several records(row), each record can be broken down into several smaller parts of data known as Attributes. ID Name Age Salary 1 Adam 34 13000 2 Alex 28 15000 3 Stuart 20 18000 4 Ross 42 19020 Employee table consist of four attributes, ID, Name, Age and Salary.
  • 7. Keys ◦ Keys are used to uniquely identify any record or row of data from the table. ◦ For example: In Student table, ID is used as a key because it is unique for each student. In PERSON table, passport_number, license_number, SSN are keys since they are unique for each person.
  • 9. Primary key ◦ It is the first key which is used to identify one and only one instance of an entity uniquely. ◦ An entity can contain multiple keys as we saw in PERSON table. The key which is most suitable from those lists become a primary key. Multiple unique keys
  • 10. Candidate Key ◦ A candidate key is an attribute or set of an attribute which can uniquely identify a tuple. ◦ The remaining attributes except for primary key are considered as a candidate key. Candidate key
  • 11. 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. ◦ For example: In the below EMPLOYEE table, for(EMPLOEE_ID, EMPLOYEE_NAME) the name of two employees can be the same, but their EMPLYEE_ID can't be the same. Hence, this combination can also be a key. Super key
  • 12. Foreign key ◦ Foreign keys are the column of the table which is used to point to the primary key of another table. ◦ 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.
  • 13. Integrity Constraints ◦ Integrity constraints are a set of rules. It is used to maintain the quality of information. ◦ Integrity constraints ensure that the data insertion, updating, and other processes have to be performed in such a way that data integrity is not affected.
  • 14. Domain constraints ◦ Domain constraints can be defined as the definition of a valid set of values for an attribute. ◦ The data type of domain includes string, character, integer, time, date, currency, etc. The value of the attribute must be available in the corresponding domain. ◦ Example:
  • 15. Entity integrity constraints ◦ The entity integrity constraint states that primary key value can't be null. ◦ This is because the primary key value is used to identify individual rows in relation and if the primary key has a null value, then we can't identify those rows. ◦ A table can contain a null value other than the primary key field. ◦ Example:
  • 16. Referential Integrity Constraints ◦ A referential integrity constraint is specified between two tables. ◦ In the Referential integrity constraints, if a foreign key in Table 1 refers to the Primary Key of Table 2, then every value of the Foreign Key in Table 1 must be null or be available in Table 2.
  • 17. Key constraints ◦ Keys are the entity set that is used to identify an entity within its entity set uniquely. ◦ An entity set can have multiple keys, but out of which one key will be the primary key. A primary key can contain a unique and null value in the relational table.
  • 18. Schema Architecture ◦ This framework is used to describe the structure of a specific database system. ◦ The three schema architecture is also used to separate the user applications and physical database. ◦ The three schema architecture contains three-levels. It breaks the database down into three different categories.
  • 19. Internal Level ◦ The internal level has an internal schema which describes the physical storage structure of the database. ◦ The internal schema is also known as a physical schema. ◦ It uses the physical data model. It is used to define that how the data will be stored in a block. ◦ The physical level is used to describe complex low-level data structures in detail.
  • 20. Conceptual Level ◦ The conceptual schema describes the design of a database at the conceptual level. Conceptual level is also known as logical level. ◦ The conceptual schema describes the structure of the whole database. ◦ The conceptual level describes what data are to be stored in the database and also describes what relationship exists among those data. ◦ In the conceptual level, internal details such as an implementation of the data structure are hidden. ◦ Programmers and database administrators work at this level.
  • 21. External Level ◦ At the external level, a database contains several schemas that sometimes called as subschema. The subschema is used to describe the different view of the database. ◦ An external schema is also known as view schema. ◦ Each view schema describes the database part that a particular user group is interested and hides the remaining database from that user group. ◦ The view schema describes the end user interaction with database systems.
  • 22. Data Independence ◦ Data independence can be explained using the three-schema architecture. ◦ Data independence refers characteristic of being able to modify the schema at one level of the database system without altering the schema at the next higher level.
  • 23. Logical Data Independence ◦ Logical data independence refers characteristic of being able to change the conceptual schema without having to change the external schema. ◦ Logical data independence is used to separate the external level from the conceptual view. ◦ If we do any changes in the conceptual view of the data, then the user view of the data would not be affected. ◦ Logical data independence occurs at the user interface level.
  • 24. Physical Data Independence ◦ Physical data independence can be defined as the capacity to change the internal schema without having to change the conceptual schema. ◦ If we do any changes in the storage size of the database system server, then the Conceptual structure of the database will not be affected. ◦ Physical data independence is used to separate conceptual levels from the internal levels. ◦ Physical data independence occurs at the logical interface level.
  • 25. Need for using DBMS ◦ Processing Queries ◦ Controlling redundancy and inconsistency ◦ Efficient memory management and indexing ◦ Concurrency control and transaction management ◦ Access control and ease in accessing data ◦ Integrity constraints