SlideShare a Scribd company logo
1 of 26
DATABASE CONCEPTS
1
E-CONTENT PREPARATION FOR
CLASS XI
CHAPTER- 7
DATABASE
� A database is a collection of interrelated data.
� It can serve multiple applications.
� It is computer based recordkeeping system.
� It not only allows to store but also allows us
modification of data as per requirements.
2
FILE SYSTEM
� A file can be understood as a container to store
data in a computer. Files can be stored on the
storage device of a computer system. Contents of a
file can be texts, computer program code, comma
separated values (CSV), etc. Likewise, pictures,
audios/videos, web pages are also files.
� Files stored on a computer can be accessed
directly and searched for desired data.
� But one has to write computer programs for efficient
access of data from files.
3
DBMS
� DBMS refers to Database Management System
� It is a software that can be used for creating,
storing, manipulating, maintaining and retrieving
data from database by users or application
programs.
� The DBMS serves as an interface between the
database and end users or application programs.
� Some examples of open source and commercial
DBMS include MySQL, Oracle, PostgreSQL, SQL
Server, Microsoft Access, MongoDB.
4
NEED OF DBMS
File system becomes difficult to handle when number
of files increases and volume of data also grows.
Following are some of the advantages of database:
� Database reduces redundancy
Redundancy means same data are duplicated in
different places (files). It removes redundancy as the
data are stored at one place and all the application
refers to the centrally maintained database.
� Database controls inconsistency
Data inconsistency occurs when same data maintained
in different places do not match. By controlling
redundancy, the inconsistency is also controlled.
� Database facilitates sharing of data
Data stored in the database can be shared among
several users.
5
NEED OF DBMS
� Database ensures security
Data are protected against accidental or intentional
disclosure to unauthorized person or unauthorized
modification.
� Database maintains integrity
It enforces certain integrity rules to ensure the
validity or correctness of data.
� Database enforces standard
Database is maintained in a standard format which
helps data interchange or migration of data
between two systems.
6
KEY CONCEPTS IN DBMS
� Database Schema
▪ Database Schema is the design of a database.
▪ Database schema is also called the visual or logical
architecture as it tells us how the data are organised in
a database.
� Data Constraint
▪ It is certain restrictions or limitations on data to ensure
its validity and consistency.
� Meta-data or Data Dictionary
▪ The database schema along with various constraints on
the data is stored by DBMS in a database catalogue or
dictionary, called meta-data.
▪ A meta-data is data about the data.
7
KEY CONCEPTS IN DBMS
� Database Instance
The state or snapshot of the database at any given time
is the database instance
� Database Query
A query is a request to a database for obtaining
information in a desired way.
� Data Manipulation
▪ Modification of database
▪ It consists of three operations viz. Insertion, Deletion or
Updating.
� Database Engine
▪ Database engine is the underlying component or set of
programs used by a DBMS 8
RELATIONAL DATA MODEL
� In a relational database model, data is organized
into tables (i.e. rows and columns).
� These tables are also known as relations.
� A row in a table represents relationship among a
set of values.
� A column represents the field/attributes related to
relation under which information will be stored.
� For example: If we want to store the details of
students then Roll_No, Class, Section etc. will be
the column/attributes and the collection of all the
column data will become a Row/Attribute. 9
COMPONENTS COMPRISING A TABLE
� Data Item: smallest unit of named data. It represent
one type of information and often referred to as a
field or column information
� Record: collection of data items which represent a
complete unit of information
� Table: collection of all Rows and Columns.
10
COMMONLY USED TERMINOLOGIES IN
RELATIONAL DATA MODEL
The Relational Model was developed by E. F. Codd of
the IBM in 1970 and is the most widely used Database
Model.
� Relation / Table
A Relation/Table is a tabular structure arranged in
rows and columns. It has the following properties:
▪ All items in a column are homogeneous i.e. they are of
the same data type
▪ Each column is assigned a unique name and has an
atomic(indivisible) value.
11
COMMONLY USED TERMINOLOGIES IN RELATIONAL
DATA MODEL
▪ No attribute can have many data values in one
tuple .
▪ All rows of a relation are distinct i.e. no two identical
rows are present in a relation.
▪ Ordering of rows or columns are immaterial.
▪ A special value “NULL” is used to represent values
that are unknown or non-applicable to certain
attributes.
12
COMMONLY USED TERMINOLOGIES IN
RELATIONAL DATA MODEL
� Domain
It is a set of values from which an attribute can take a value in
each row. Usually, a data type is used to specify domain for
an attribute.
� Tuple / Entity / Record
Each row of data in a relation (table) is called a tuple.
� Attribute / Field
The columns of a relation are the attributes which are also
referred as fields.
� Degree
The number of attributes in a relation is called the Degree of
the relation
� Cardinality
The number of tuples in a relation is called the Degree of the
relation 13
DATABASE TABLE/RELATION
ROLL NAME CLASS
01 VIJETHA 12
02 SINDHU 11
03 GAUTHAMI 12
14
STUDENT
Rows
/
Tuples
Table
/
Relation
Data Item
Records
Table/Relation
Name
Columns / Attributes
KEYS IN A RELATIONAL DATABASE
The tuples within a relation must be distinct. It
means no two tuples in a table should have same
value for all attributes. That is, there should be at
least one attribute in which data are distinct
(unique) and not NULL. That way, we can uniquely
distinguish each tuple of a relation. So, relational
data model imposes some restrictions or
constraints on the values of the attributes and how
the contents of one relation be referred through
another relation. These restrictions are specified
through different types of keys.
15
KEYS IN A RELATIONAL DATABASE
� Primary Key
▪ A set of one or more attribute(s) that can uniquely
identify a record in the relation is called Primary
Key.
▪ There can be only one primary key in a table.
▪ A primary key accepts only distinct (non-duplicate)
values and cannot be left blank.
▪ E.g. Student ID No, Student Admission No, Aadhar
Card No etc. qualifies as Primary Key as the values
of all these are unique.
16
KEYS IN A RELATIONAL DATABASE
� Candidate Key
▪ A table can have one or more attributes that takes
distinct values. Any of these attributes can be used
to uniquely identify the tuples in the relation. Such
attributes are called candidate keys.
▪ A Primary Key is one of the candidate keys.
▪ A table may have more than one candidate keys
but definitely has one and only one primary key.
17
KEYS IN A RELATIONAL DATABASE
� Candidate Key
STUDENT
� In the above given table Stud_ID, Roll_No, Email_ID
can uniquely identify a row in the table and hence they
are candidate keys.
18
Stud_ID Roll_No Name Stream Email_ID
200601 01 Nikitha Science nk@gmail.com
200607 03 Srinidhi Commerce ss@gmail.com
200647 18 Sahana Science sk@gmail.com
Candidate Keys
KEYS IN A RELATIONAL DATABASE
� Composite Primary Key
▪ If 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.
▪ Here a composite Primary Key (CLASS,SECTION) can
be formed together as either of these column in
isolation cannot be used to uniquely identify each row in
the table.
19
CLASS SECTION TOT_STRENGTH
X A 32
XII A 30
XII B 28
KEYS IN A RELATIONAL DATABASE
� Alternate Keys
▪ Only one of the Candidate keys is selected as the
primary key of a table. All other candidate keys are
called Alternate keys.
▪ A Candidate Key which is not a primary key is an
Alternate Key.
▪ Candidate Keys – Primary Key = Alternate Key(s).
▪ E.g. In the table STUDENT mentioned in Page No.
18, if Stud_ID is selected as the Primary Key then
Roll_No and Email_ID will become the Alternate
Keys.
20
KEYS IN A RELATIONAL DATABASE
� Foreign Key
▪ A foreign key is used to represent the relationship
between two tables.
▪ It is a non-key attribute whose value is derived from
the Primary key of another table.
▪ Foreign key column will check for the presence of
value in Primary key of another table, if present then
only entry will be allowed otherwise data will be
rejected.
21
KEYS IN A RELATIONAL DATABASE
▪ In some cases, foreign key can take NULL value if it
is not the part of primary key of the foreign table.
▪ The table containing the foreign key is called the
child table, and the table containing the candidate
key is called the referenced or parent table.
22
KEYS IN A RELATIONAL DATABASE
23
ORDERS
CUSTOMER
▪ From the above given tables we can observe that the CUST_ID column
of ORDERS table is deriving its value from CUST_ID of CUSTOMER
table. So we can say that the CUST_ID of ORDERS table is a foreign key
whose value is dependent upon the Primary key column CUST_ID of
table CUSTOMER.
ORDER_ID ORDER_NO CUST_ID
1 1255 3
2 1690 3
3 1810 2
4 2210 1
CUST_ID NAME ADDRESS
1 HECTOR MADRID
2 MITCHELLE LONDON
3 AUGUSTA COLARADO
Child Table
Parent
Table
REFERENTIAL INTEGRITY
� The property of a relational database which ensures
that no entry in a foreign key column of a table can
be made unless it matches a primary key value in the
corresponding column of the related table is called
referential integrity.
� It also ensures that the user don’t accidentally delete
or change the related data.
� Referential integrity can be applied when:
▪ The master table’s column is a Primary Key or has a
unique index.
▪ The related fields have the same data type.
▪ Both tables must belong to the same database. 24
REFERENTIAL INTEGRITY
� The following rules must be followed if the referential
integrity is enforced using Foreign Key:
▪ We cannot enter a value in Child Table which is not
present in Master Table’s Primary key column.
However, NULL values can be entered in foreign key.
▪ We cannot delete a record from Master Table if
matching record exists in related table/Child Table.
▪ We cannot modify or change the Primary Key value
in Master table if its matching record is present in
related table/Child Table.
25
THANK YOU
26

More Related Content

What's hot

Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...Dipen Parmar
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relationalJafar Nesargi
 
Slide 6 er strong & weak entity
Slide 6 er  strong & weak entitySlide 6 er  strong & weak entity
Slide 6 er strong & weak entityVisakh V
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagramssadique_ghitm
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSssuser20b618
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity ConstraintsMegha yadav
 
Sql Authorization
Sql AuthorizationSql Authorization
Sql AuthorizationFhuy
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mappingShubham Saini
 
2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architectureKumar
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database ModelShishir Aryal
 
Entity relationship (er) modeling
Entity relationship (er) modelingEntity relationship (er) modeling
Entity relationship (er) modelingDhani Ahmad
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and modelssabah N
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMSPadamNepal1
 
Modelo relacional
Modelo relacionalModelo relacional
Modelo relacionalUTN
 

What's hot (20)

Data models
Data modelsData models
Data models
 
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
 
Nested Queries-SQL.ppt
Nested Queries-SQL.pptNested Queries-SQL.ppt
Nested Queries-SQL.ppt
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relational
 
Slide 6 er strong & weak entity
Slide 6 er  strong & weak entitySlide 6 er  strong & weak entity
Slide 6 er strong & weak entity
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Sql Authorization
Sql AuthorizationSql Authorization
Sql Authorization
 
QBE.pptx
QBE.pptxQBE.pptx
QBE.pptx
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mapping
 
2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architecture
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
 
Data model and entity relationship
Data model and entity relationshipData model and entity relationship
Data model and entity relationship
 
Entity relationship (er) modeling
Entity relationship (er) modelingEntity relationship (er) modeling
Entity relationship (er) modeling
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
 
Relational model
Relational modelRelational model
Relational model
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
 
enhanced er diagram
enhanced er diagramenhanced er diagram
enhanced er diagram
 
Modelo relacional
Modelo relacionalModelo relacional
Modelo relacional
 

Similar to Database Concepts.pptx

Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems incMuthu Natarajan
 
DEE 431 Database keys and Normalisation Slide 2
DEE 431 Database keys and Normalisation Slide 2DEE 431 Database keys and Normalisation Slide 2
DEE 431 Database keys and Normalisation Slide 2YOGESH SINGH
 
DATABASE CONCEPTS AND PRACTICAL EXAMPLES
DATABASE CONCEPTS AND PRACTICAL EXAMPLESDATABASE CONCEPTS AND PRACTICAL EXAMPLES
DATABASE CONCEPTS AND PRACTICAL EXAMPLESNathRam2
 
database concepts.pptx
database concepts.pptxdatabase concepts.pptx
database concepts.pptxslavskrillex
 
Relational Database Management System part II
Relational Database Management System part IIRelational Database Management System part II
Relational Database Management System part IIKavithaA19
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational modelChirag vasava
 
COMPUTERS Database
COMPUTERS Database COMPUTERS Database
COMPUTERS Database Rc Os
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to databasePradnya Saval
 
Data Base Management System.pdf
Data Base Management System.pdfData Base Management System.pdf
Data Base Management System.pdfTENZING LHADON
 

Similar to Database Concepts.pptx (20)

DATABASE-1.pptx
DATABASE-1.pptxDATABASE-1.pptx
DATABASE-1.pptx
 
Unit 2 DBMS.pptx
Unit 2 DBMS.pptxUnit 2 DBMS.pptx
Unit 2 DBMS.pptx
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
 
DEE 431 Database keys and Normalisation Slide 2
DEE 431 Database keys and Normalisation Slide 2DEE 431 Database keys and Normalisation Slide 2
DEE 431 Database keys and Normalisation Slide 2
 
DBMS-Unit-2.pptx
DBMS-Unit-2.pptxDBMS-Unit-2.pptx
DBMS-Unit-2.pptx
 
NMEC RD_UNIT 1.ppt
NMEC RD_UNIT 1.pptNMEC RD_UNIT 1.ppt
NMEC RD_UNIT 1.ppt
 
Codds rules & keys
Codds rules & keysCodds rules & keys
Codds rules & keys
 
PPT_DBMS.pptx
PPT_DBMS.pptxPPT_DBMS.pptx
PPT_DBMS.pptx
 
Database.pptx
Database.pptxDatabase.pptx
Database.pptx
 
DATABASE CONCEPTS AND PRACTICAL EXAMPLES
DATABASE CONCEPTS AND PRACTICAL EXAMPLESDATABASE CONCEPTS AND PRACTICAL EXAMPLES
DATABASE CONCEPTS AND PRACTICAL EXAMPLES
 
database concepts.pptx
database concepts.pptxdatabase concepts.pptx
database concepts.pptx
 
Relational Database Management System part II
Relational Database Management System part IIRelational Database Management System part II
Relational Database Management System part II
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
DBMS.pptx
DBMS.pptxDBMS.pptx
DBMS.pptx
 
DBMS.pptx
DBMS.pptxDBMS.pptx
DBMS.pptx
 
COMPUTERS Database
COMPUTERS Database COMPUTERS Database
COMPUTERS Database
 
Keerty rdbms sql
Keerty rdbms sqlKeerty rdbms sql
Keerty rdbms sql
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
RDBMS
RDBMSRDBMS
RDBMS
 
Data Base Management System.pdf
Data Base Management System.pdfData Base Management System.pdf
Data Base Management System.pdf
 

Recently uploaded

Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 

Recently uploaded (20)

Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 

Database Concepts.pptx

  • 2. DATABASE � A database is a collection of interrelated data. � It can serve multiple applications. � It is computer based recordkeeping system. � It not only allows to store but also allows us modification of data as per requirements. 2
  • 3. FILE SYSTEM � A file can be understood as a container to store data in a computer. Files can be stored on the storage device of a computer system. Contents of a file can be texts, computer program code, comma separated values (CSV), etc. Likewise, pictures, audios/videos, web pages are also files. � Files stored on a computer can be accessed directly and searched for desired data. � But one has to write computer programs for efficient access of data from files. 3
  • 4. DBMS � DBMS refers to Database Management System � It is a software that can be used for creating, storing, manipulating, maintaining and retrieving data from database by users or application programs. � The DBMS serves as an interface between the database and end users or application programs. � Some examples of open source and commercial DBMS include MySQL, Oracle, PostgreSQL, SQL Server, Microsoft Access, MongoDB. 4
  • 5. NEED OF DBMS File system becomes difficult to handle when number of files increases and volume of data also grows. Following are some of the advantages of database: � Database reduces redundancy Redundancy means same data are duplicated in different places (files). It removes redundancy as the data are stored at one place and all the application refers to the centrally maintained database. � Database controls inconsistency Data inconsistency occurs when same data maintained in different places do not match. By controlling redundancy, the inconsistency is also controlled. � Database facilitates sharing of data Data stored in the database can be shared among several users. 5
  • 6. NEED OF DBMS � Database ensures security Data are protected against accidental or intentional disclosure to unauthorized person or unauthorized modification. � Database maintains integrity It enforces certain integrity rules to ensure the validity or correctness of data. � Database enforces standard Database is maintained in a standard format which helps data interchange or migration of data between two systems. 6
  • 7. KEY CONCEPTS IN DBMS � Database Schema ▪ Database Schema is the design of a database. ▪ Database schema is also called the visual or logical architecture as it tells us how the data are organised in a database. � Data Constraint ▪ It is certain restrictions or limitations on data to ensure its validity and consistency. � Meta-data or Data Dictionary ▪ The database schema along with various constraints on the data is stored by DBMS in a database catalogue or dictionary, called meta-data. ▪ A meta-data is data about the data. 7
  • 8. KEY CONCEPTS IN DBMS � Database Instance The state or snapshot of the database at any given time is the database instance � Database Query A query is a request to a database for obtaining information in a desired way. � Data Manipulation ▪ Modification of database ▪ It consists of three operations viz. Insertion, Deletion or Updating. � Database Engine ▪ Database engine is the underlying component or set of programs used by a DBMS 8
  • 9. RELATIONAL DATA MODEL � In a relational database model, data is organized into tables (i.e. rows and columns). � These tables are also known as relations. � A row in a table represents relationship among a set of values. � A column represents the field/attributes related to relation under which information will be stored. � For example: If we want to store the details of students then Roll_No, Class, Section etc. will be the column/attributes and the collection of all the column data will become a Row/Attribute. 9
  • 10. COMPONENTS COMPRISING A TABLE � Data Item: smallest unit of named data. It represent one type of information and often referred to as a field or column information � Record: collection of data items which represent a complete unit of information � Table: collection of all Rows and Columns. 10
  • 11. COMMONLY USED TERMINOLOGIES IN RELATIONAL DATA MODEL The Relational Model was developed by E. F. Codd of the IBM in 1970 and is the most widely used Database Model. � Relation / Table A Relation/Table is a tabular structure arranged in rows and columns. It has the following properties: ▪ All items in a column are homogeneous i.e. they are of the same data type ▪ Each column is assigned a unique name and has an atomic(indivisible) value. 11
  • 12. COMMONLY USED TERMINOLOGIES IN RELATIONAL DATA MODEL ▪ No attribute can have many data values in one tuple . ▪ All rows of a relation are distinct i.e. no two identical rows are present in a relation. ▪ Ordering of rows or columns are immaterial. ▪ A special value “NULL” is used to represent values that are unknown or non-applicable to certain attributes. 12
  • 13. COMMONLY USED TERMINOLOGIES IN RELATIONAL DATA MODEL � Domain It is a set of values from which an attribute can take a value in each row. Usually, a data type is used to specify domain for an attribute. � Tuple / Entity / Record Each row of data in a relation (table) is called a tuple. � Attribute / Field The columns of a relation are the attributes which are also referred as fields. � Degree The number of attributes in a relation is called the Degree of the relation � Cardinality The number of tuples in a relation is called the Degree of the relation 13
  • 14. DATABASE TABLE/RELATION ROLL NAME CLASS 01 VIJETHA 12 02 SINDHU 11 03 GAUTHAMI 12 14 STUDENT Rows / Tuples Table / Relation Data Item Records Table/Relation Name Columns / Attributes
  • 15. KEYS IN A RELATIONAL DATABASE The tuples within a relation must be distinct. It means no two tuples in a table should have same value for all attributes. That is, there should be at least one attribute in which data are distinct (unique) and not NULL. That way, we can uniquely distinguish each tuple of a relation. So, relational data model imposes some restrictions or constraints on the values of the attributes and how the contents of one relation be referred through another relation. These restrictions are specified through different types of keys. 15
  • 16. KEYS IN A RELATIONAL DATABASE � Primary Key ▪ A set of one or more attribute(s) that can uniquely identify a record in the relation is called Primary Key. ▪ There can be only one primary key in a table. ▪ A primary key accepts only distinct (non-duplicate) values and cannot be left blank. ▪ E.g. Student ID No, Student Admission No, Aadhar Card No etc. qualifies as Primary Key as the values of all these are unique. 16
  • 17. KEYS IN A RELATIONAL DATABASE � Candidate Key ▪ A table can have one or more attributes that takes distinct values. Any of these attributes can be used to uniquely identify the tuples in the relation. Such attributes are called candidate keys. ▪ A Primary Key is one of the candidate keys. ▪ A table may have more than one candidate keys but definitely has one and only one primary key. 17
  • 18. KEYS IN A RELATIONAL DATABASE � Candidate Key STUDENT � In the above given table Stud_ID, Roll_No, Email_ID can uniquely identify a row in the table and hence they are candidate keys. 18 Stud_ID Roll_No Name Stream Email_ID 200601 01 Nikitha Science nk@gmail.com 200607 03 Srinidhi Commerce ss@gmail.com 200647 18 Sahana Science sk@gmail.com Candidate Keys
  • 19. KEYS IN A RELATIONAL DATABASE � Composite Primary Key ▪ If 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. ▪ Here a composite Primary Key (CLASS,SECTION) can be formed together as either of these column in isolation cannot be used to uniquely identify each row in the table. 19 CLASS SECTION TOT_STRENGTH X A 32 XII A 30 XII B 28
  • 20. KEYS IN A RELATIONAL DATABASE � Alternate Keys ▪ Only one of the Candidate keys is selected as the primary key of a table. All other candidate keys are called Alternate keys. ▪ A Candidate Key which is not a primary key is an Alternate Key. ▪ Candidate Keys – Primary Key = Alternate Key(s). ▪ E.g. In the table STUDENT mentioned in Page No. 18, if Stud_ID is selected as the Primary Key then Roll_No and Email_ID will become the Alternate Keys. 20
  • 21. KEYS IN A RELATIONAL DATABASE � Foreign Key ▪ A foreign key is used to represent the relationship between two tables. ▪ It is a non-key attribute whose value is derived from the Primary key of another table. ▪ Foreign key column will check for the presence of value in Primary key of another table, if present then only entry will be allowed otherwise data will be rejected. 21
  • 22. KEYS IN A RELATIONAL DATABASE ▪ In some cases, foreign key can take NULL value if it is not the part of primary key of the foreign table. ▪ The table containing the foreign key is called the child table, and the table containing the candidate key is called the referenced or parent table. 22
  • 23. KEYS IN A RELATIONAL DATABASE 23 ORDERS CUSTOMER ▪ From the above given tables we can observe that the CUST_ID column of ORDERS table is deriving its value from CUST_ID of CUSTOMER table. So we can say that the CUST_ID of ORDERS table is a foreign key whose value is dependent upon the Primary key column CUST_ID of table CUSTOMER. ORDER_ID ORDER_NO CUST_ID 1 1255 3 2 1690 3 3 1810 2 4 2210 1 CUST_ID NAME ADDRESS 1 HECTOR MADRID 2 MITCHELLE LONDON 3 AUGUSTA COLARADO Child Table Parent Table
  • 24. REFERENTIAL INTEGRITY � The property of a relational database which ensures that no entry in a foreign key column of a table can be made unless it matches a primary key value in the corresponding column of the related table is called referential integrity. � It also ensures that the user don’t accidentally delete or change the related data. � Referential integrity can be applied when: ▪ The master table’s column is a Primary Key or has a unique index. ▪ The related fields have the same data type. ▪ Both tables must belong to the same database. 24
  • 25. REFERENTIAL INTEGRITY � The following rules must be followed if the referential integrity is enforced using Foreign Key: ▪ We cannot enter a value in Child Table which is not present in Master Table’s Primary key column. However, NULL values can be entered in foreign key. ▪ We cannot delete a record from Master Table if matching record exists in related table/Child Table. ▪ We cannot modify or change the Primary Key value in Master table if its matching record is present in related table/Child Table. 25