SlideShare a Scribd company logo
Chapter Seven
Basic Data Storage
1
Outcome of this chapter
⚫Describes databases and DBMS concepts,
terminology, and architecture
⚫Describes the basic concepts necessary for a good
understanding of databases design and
implementation
⚫Describe the conceptual modeling techniques used in
database systems
⚫Describes the relational data model, its integrity
constraints and update operations, and the operations
of the relational algebra
2
Introduction to Database
⚫A database is an organized collection of data.
⚫It is the collection of schemas, tables, queries,
reports, views and other objects.
⚫Database is a well-arranged and self-defining
collection of data that is used to preserve data and
metadata (Data about Data) and maintain data
stability and integrity.
3
Database Functionalities
⚫Data Storage Management
⚫Data Transformation and Presentation
⚫Security
⚫Multi-user Access Control
⚫Backup and Recovery
⚫Data Integrity
⚫Database Access Language
⚫Database Communication Interface.
4
Applications of databases
⚫Banking: transactions
⚫Airlines: reservations, schedules
⚫Universities: registration, grades
⚫Sales: customers, products, purchases
⚫Online retailers: order tracking, customized
recommendations
⚫Manufacturing: production, inventory, orders, supply
chain
⚫Human resources: employee records, salaries, tax
deductions
5
Advantages & Disadvantages of DB
Advantages:
⚫High data quality, integrity, and consistency
⚫Reduced data redundancy and application maintenance
⚫Easy access and sharing
⚫Scalable
⚫Improved security
⚫Specialized and productive management tool
Major disadvantages:
⚫ Increased complexity
⚫Greater impact of failure
6
Relational Database
⚫A relational database (RDB) is a collective set of
multiple data sets organized by tables, records and
columns.
⚫RDBs also establish a well-defined relationship
between database tables.
⚫In simplest terms, a relational database is one that
presents information in tables with rows and columns
showing relation between them.
7
Database Management System
⚫All the database design and data manipulation tasks
are carried by a Database Management System
(DBMS).
⚫It is computer software designed for the purpose of
managing databases based on a variety of data
models.
8
Schema and Instance
Schema : logical structure of the database is called
Schema.
Instance : The actual content of the database at a
particular point in time is called an Instance.
9
Database table properties
⚫Unique table name.
⚫All values in a row describe
the one instance.
⚫All values in a column are of
the same kind.
⚫Each row is distinct.
⚫A cell of the table holds a
single value.
⚫Each column has a unique
name.
⚫There is no ordering in rows.
⚫NULL value can also be
stored in tables.
10
A simple Database Table
In a database, data are organized in
relations (tables) which may be
linked by some constraints.
Columns contain what
information is needed to be stored
and Rows contain each record.
For example, in a university
database, there can be tables to
store information about courses,
instructors, student, section etc.
Columns are called fields and each
row contains record which stores
value for each field. Here, ID,
name, dept_name and salary are
the fields to store and {2222,
Einstein, Physics, 95000} is a
record.
11
Data Model
⚫A detailed model that captures overall structure of
organizational data while being independent of any
implementation considerations.
⚫Data modeling involves examining the data objects in a
system and identifying the relationship between these
objects.
⚫There are different ways of model a database. They are:
⚫ Relational model
⚫ Entity-Relationship data model (mainly for database design)
⚫ Object-based data models (Object-oriented and Object-
relational)
⚫ Semi structured data model (XML)
12
Entity, Attributes and Relationships
⚫Entity: An entity is an object that exists and is
distinguishable from other objects. It is the primary task
to determine all the entities and their attributes while
modeling a database. Entities are denoted using rectangle.
Example: specific person, company, event, plant.
⚫Attribute: An entity is represented by a set of attributes
that is descriptive properties possessed by an entity.
Attributes are denoted using elliptical shape. Example:
instructor = (ID, name, street, city, salary), course=
(course_id, title, credits)
⚫Relationship: A relationship is an association among
several entities. Entity relationships are denoted using
rhombus shape. Example: students are enrolled in
courses. Instructor teaches courses. 13
Entities & their Attributes with
Relationship in a University Database
14
Primary key
⚫ A primary key is a
candidate key and a
single field that is most
appropriate to be the
main reference key for
the table.
⚫ The primary key must
contain unique values,
must never be null and
uniquely identify each
record in the table.
⚫ For example, in a
Students table, we can
see that, using only
{StudentID} it is
possible to identify each
record distinctly. So,
this is the primary key
for the table.
15
Foreign key
⚫ A foreign key is generally a
primary key from one table
that appears as a field in
another table to establish a
relation between the first and
second table.
⚫ For example, consider the
relationship between Students
and Courses. Student
information is stores in
Students table and course
information is stored in
Courses table. From these two
tables how to show that which
student have which courses?
This is done using a foreign key
field {courseId} in the Students
table, which will contain the
values of {courseId} field of
Courses table. 16
17
Question
⚫ What is database? Why do we use database? What are the advantage and
disadvantage of database?
⚫ What is DBMS? What is schema and instance? What are the properties of
database table? What is Field and Record?
⚫ What is a relational database? Find the tables necessary for a Library
Management System/ Hospital Management System.
⚫ What is a data model? What are entity, attribute and Relationship?
Discuss with example.
⚫ Find all the entities of an online bookshop management database. Find
out all the attributes for each entity.
⚫ Find all the entities of a Shopping Store management database. Find out
all the attributes for each entity.
⚫ What is Primary key? Describe with example.
⚫ What is Foreign Key? Why do we use Foreign Key in a database? Explain
with example.
⚫ For an online book shop database, identify the Primary Key and Foreign
Key in Customers and Orders table.
18
Thank You
19

More Related Content

Similar to Chapter 7 Basic Data Storage.pptx

Chp-1.pptx
Chp-1.pptxChp-1.pptx
Chp-1.pptx
Dr. Thippeswamy S.
 
DBMS Part 1.pptx
DBMS Part 1.pptxDBMS Part 1.pptx
DBMS Part 1.pptx
Shivammittal880395
 
Database Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdfDatabase Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdf
rsujeet169
 
PPT_DBMS.pptx
PPT_DBMS.pptxPPT_DBMS.pptx
PPT_DBMS.pptx
traderbear1
 
Artifacts, Data Dictionary, Data Modeling, Data Wrangling
Artifacts, Data Dictionary, Data Modeling, Data WranglingArtifacts, Data Dictionary, Data Modeling, Data Wrangling
Artifacts, Data Dictionary, Data Modeling, Data Wrangling
Faisal Akbar
 
DBMS-2.pptx
DBMS-2.pptxDBMS-2.pptx
DBMS-2.pptx
kingVox
 
Db lec 01
Db lec 01Db lec 01
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
Chirag vasava
 
DBMS Lecture1.ppt
DBMS Lecture1.pptDBMS Lecture1.ppt
DBMS Lecture1.ppt
IpsitaSaha9
 
DISE - Database Concepts
DISE - Database ConceptsDISE - Database Concepts
DISE - Database Concepts
Rasan Samarasinghe
 
Bca examination 2017 dbms
Bca examination 2017 dbmsBca examination 2017 dbms
Bca examination 2017 dbms
Anjaan Gajendra
 
data_modelling_101.pptx
data_modelling_101.pptxdata_modelling_101.pptx
data_modelling_101.pptx
oludayo3
 
2. Chapter Two.pdf
2. Chapter Two.pdf2. Chapter Two.pdf
2. Chapter Two.pdf
fikadumola
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdf
TamiratDejene1
 
Week 02 (4).pptx
Week 02                           (4).pptxWeek 02                           (4).pptx
Week 02 (4).pptx
st4132634
 
Database design for HPC
Database design for HPCDatabase design for HPC
Database system
Database system Database system
Database system
Hitesh Mohapatra
 
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
 
Unit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptxUnit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptx
nirajsharmapuneiat
 
DBMS an Example
DBMS an ExampleDBMS an Example
DBMS an Example
Dr. C.V. Suresh Babu
 

Similar to Chapter 7 Basic Data Storage.pptx (20)

Chp-1.pptx
Chp-1.pptxChp-1.pptx
Chp-1.pptx
 
DBMS Part 1.pptx
DBMS Part 1.pptxDBMS Part 1.pptx
DBMS Part 1.pptx
 
Database Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdfDatabase Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdf
 
PPT_DBMS.pptx
PPT_DBMS.pptxPPT_DBMS.pptx
PPT_DBMS.pptx
 
Artifacts, Data Dictionary, Data Modeling, Data Wrangling
Artifacts, Data Dictionary, Data Modeling, Data WranglingArtifacts, Data Dictionary, Data Modeling, Data Wrangling
Artifacts, Data Dictionary, Data Modeling, Data Wrangling
 
DBMS-2.pptx
DBMS-2.pptxDBMS-2.pptx
DBMS-2.pptx
 
Db lec 01
Db lec 01Db lec 01
Db lec 01
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
DBMS Lecture1.ppt
DBMS Lecture1.pptDBMS Lecture1.ppt
DBMS Lecture1.ppt
 
DISE - Database Concepts
DISE - Database ConceptsDISE - Database Concepts
DISE - Database Concepts
 
Bca examination 2017 dbms
Bca examination 2017 dbmsBca examination 2017 dbms
Bca examination 2017 dbms
 
data_modelling_101.pptx
data_modelling_101.pptxdata_modelling_101.pptx
data_modelling_101.pptx
 
2. Chapter Two.pdf
2. Chapter Two.pdf2. Chapter Two.pdf
2. Chapter Two.pdf
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdf
 
Week 02 (4).pptx
Week 02                           (4).pptxWeek 02                           (4).pptx
Week 02 (4).pptx
 
Database design for HPC
Database design for HPCDatabase design for HPC
Database design for HPC
 
Database system
Database system Database system
Database system
 
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,...
 
Unit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptxUnit-1-DBMS-SUN-4 everything you need to know.pptx
Unit-1-DBMS-SUN-4 everything you need to know.pptx
 
DBMS an Example
DBMS an ExampleDBMS an Example
DBMS an Example
 

More from NiloyHasan12

Chapter 5 Basic Gates and Boolean Logic.pptx
Chapter 5 Basic Gates and Boolean Logic.pptxChapter 5 Basic Gates and Boolean Logic.pptx
Chapter 5 Basic Gates and Boolean Logic.pptx
NiloyHasan12
 
Chapter 8 Basic concept of e-commerce.pptx
Chapter 8 Basic concept of e-commerce.pptxChapter 8 Basic concept of e-commerce.pptx
Chapter 8 Basic concept of e-commerce.pptx
NiloyHasan12
 
Chapter 10 Basic Networking.pdf
Chapter 10 Basic Networking.pdfChapter 10 Basic Networking.pdf
Chapter 10 Basic Networking.pdf
NiloyHasan12
 
Chapter 2 Basic Hardware.pptx
Chapter 2 Basic Hardware.pptxChapter 2 Basic Hardware.pptx
Chapter 2 Basic Hardware.pptx
NiloyHasan12
 
Basic Software.pptx
 Basic Software.pptx Basic Software.pptx
Basic Software.pptx
NiloyHasan12
 
Chapter 1 Computer Concepts.pptx
Chapter 1 Computer Concepts.pptxChapter 1 Computer Concepts.pptx
Chapter 1 Computer Concepts.pptx
NiloyHasan12
 

More from NiloyHasan12 (6)

Chapter 5 Basic Gates and Boolean Logic.pptx
Chapter 5 Basic Gates and Boolean Logic.pptxChapter 5 Basic Gates and Boolean Logic.pptx
Chapter 5 Basic Gates and Boolean Logic.pptx
 
Chapter 8 Basic concept of e-commerce.pptx
Chapter 8 Basic concept of e-commerce.pptxChapter 8 Basic concept of e-commerce.pptx
Chapter 8 Basic concept of e-commerce.pptx
 
Chapter 10 Basic Networking.pdf
Chapter 10 Basic Networking.pdfChapter 10 Basic Networking.pdf
Chapter 10 Basic Networking.pdf
 
Chapter 2 Basic Hardware.pptx
Chapter 2 Basic Hardware.pptxChapter 2 Basic Hardware.pptx
Chapter 2 Basic Hardware.pptx
 
Basic Software.pptx
 Basic Software.pptx Basic Software.pptx
Basic Software.pptx
 
Chapter 1 Computer Concepts.pptx
Chapter 1 Computer Concepts.pptxChapter 1 Computer Concepts.pptx
Chapter 1 Computer Concepts.pptx
 

Recently uploaded

Introduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal UseIntroduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal Use
Excellence Foundation for South Sudan
 
Java MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHatJava MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHat
Scholarhat
 
Demonstration module in Odoo 17 - Odoo 17 Slides
Demonstration module in Odoo 17 - Odoo 17 SlidesDemonstration module in Odoo 17 - Odoo 17 Slides
Demonstration module in Odoo 17 - Odoo 17 Slides
Celine George
 
5. Postharvest deterioration of fruits and vegetables.pptx
5. Postharvest deterioration of fruits and vegetables.pptx5. Postharvest deterioration of fruits and vegetables.pptx
5. Postharvest deterioration of fruits and vegetables.pptx
UmeshTimilsina1
 
Devops Interview Question PDF By ScholarHat
Devops Interview Question PDF By ScholarHatDevops Interview Question PDF By ScholarHat
Devops Interview Question PDF By ScholarHat
Scholarhat
 
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Benchmarking Sustainability: Neurosciences and AI Tech Research in Macau - Ke...
Benchmarking Sustainability: Neurosciences and AI Tech Research in Macau - Ke...Benchmarking Sustainability: Neurosciences and AI Tech Research in Macau - Ke...
Benchmarking Sustainability: Neurosciences and AI Tech Research in Macau - Ke...
Alvaro Barbosa
 
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
ALBERTHISOLER1
 
7. Post Harvest Entomology and their control.pptx
7. Post Harvest Entomology and their control.pptx7. Post Harvest Entomology and their control.pptx
7. Post Harvest Entomology and their control.pptx
UmeshTimilsina1
 
React Interview Question PDF By ScholarHat
React Interview Question PDF By ScholarHatReact Interview Question PDF By ScholarHat
React Interview Question PDF By ScholarHat
Scholarhat
 
SQL Server Interview Questions PDF By ScholarHat
SQL Server Interview Questions PDF By ScholarHatSQL Server Interview Questions PDF By ScholarHat
SQL Server Interview Questions PDF By ScholarHat
Scholarhat
 
Mathematics 4 and 7 PD Design.pdf 1234567890
Mathematics 4 and 7 PD Design.pdf 1234567890Mathematics 4 and 7 PD Design.pdf 1234567890
Mathematics 4 and 7 PD Design.pdf 1234567890
liquiganzandyb
 
3. Maturity_indices_of_fruits_and_vegetable.pptx
3. Maturity_indices_of_fruits_and_vegetable.pptx3. Maturity_indices_of_fruits_and_vegetable.pptx
3. Maturity_indices_of_fruits_and_vegetable.pptx
UmeshTimilsina1
 
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdfPRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
nservice241
 
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa
 
7. Post harvest diseases and their control.pptx
7. Post harvest diseases and their control.pptx7. Post harvest diseases and their control.pptx
7. Post harvest diseases and their control.pptx
UmeshTimilsina1
 
2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour International
 
Open and Critical Perspectives on AI in Education
Open and Critical Perspectives on AI in EducationOpen and Critical Perspectives on AI in Education
Open and Critical Perspectives on AI in Education
Robert Farrow
 

Recently uploaded (20)

Introduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal UseIntroduction to Google Productivity Tools for Office and Personal Use
Introduction to Google Productivity Tools for Office and Personal Use
 
Java MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHatJava MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHat
 
Demonstration module in Odoo 17 - Odoo 17 Slides
Demonstration module in Odoo 17 - Odoo 17 SlidesDemonstration module in Odoo 17 - Odoo 17 Slides
Demonstration module in Odoo 17 - Odoo 17 Slides
 
5. Postharvest deterioration of fruits and vegetables.pptx
5. Postharvest deterioration of fruits and vegetables.pptx5. Postharvest deterioration of fruits and vegetables.pptx
5. Postharvest deterioration of fruits and vegetables.pptx
 
Devops Interview Question PDF By ScholarHat
Devops Interview Question PDF By ScholarHatDevops Interview Question PDF By ScholarHat
Devops Interview Question PDF By ScholarHat
 
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
BỘ ĐỀ THI HỌC SINH GIỎI CÁC TỈNH MÔN TIẾNG ANH LỚP 9 NĂM HỌC 2023-2024 (CÓ FI...
 
Benchmarking Sustainability: Neurosciences and AI Tech Research in Macau - Ke...
Benchmarking Sustainability: Neurosciences and AI Tech Research in Macau - Ke...Benchmarking Sustainability: Neurosciences and AI Tech Research in Macau - Ke...
Benchmarking Sustainability: Neurosciences and AI Tech Research in Macau - Ke...
 
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
Brigada Eskwela 2024 PowerPoint Update for SY 2024-2025
 
7. Post Harvest Entomology and their control.pptx
7. Post Harvest Entomology and their control.pptx7. Post Harvest Entomology and their control.pptx
7. Post Harvest Entomology and their control.pptx
 
React Interview Question PDF By ScholarHat
React Interview Question PDF By ScholarHatReact Interview Question PDF By ScholarHat
React Interview Question PDF By ScholarHat
 
UM “ATÉ JÁ” ANIMADO! . .
UM “ATÉ JÁ” ANIMADO!                        .            .UM “ATÉ JÁ” ANIMADO!                        .            .
UM “ATÉ JÁ” ANIMADO! . .
 
SQL Server Interview Questions PDF By ScholarHat
SQL Server Interview Questions PDF By ScholarHatSQL Server Interview Questions PDF By ScholarHat
SQL Server Interview Questions PDF By ScholarHat
 
Mathematics 4 and 7 PD Design.pdf 1234567890
Mathematics 4 and 7 PD Design.pdf 1234567890Mathematics 4 and 7 PD Design.pdf 1234567890
Mathematics 4 and 7 PD Design.pdf 1234567890
 
3. Maturity_indices_of_fruits_and_vegetable.pptx
3. Maturity_indices_of_fruits_and_vegetable.pptx3. Maturity_indices_of_fruits_and_vegetable.pptx
3. Maturity_indices_of_fruits_and_vegetable.pptx
 
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdfPRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
 
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
Dr. Nasir Mustafa CERTIFICATE OF APPRECIATION "NEUROANATOMY"
 
7. Post harvest diseases and their control.pptx
7. Post harvest diseases and their control.pptx7. Post harvest diseases and their control.pptx
7. Post harvest diseases and their control.pptx
 
2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx
 
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
Codeavour 5.0 International Impact Report - The Biggest International AI, Cod...
 
Open and Critical Perspectives on AI in Education
Open and Critical Perspectives on AI in EducationOpen and Critical Perspectives on AI in Education
Open and Critical Perspectives on AI in Education
 

Chapter 7 Basic Data Storage.pptx

  • 2. Outcome of this chapter ⚫Describes databases and DBMS concepts, terminology, and architecture ⚫Describes the basic concepts necessary for a good understanding of databases design and implementation ⚫Describe the conceptual modeling techniques used in database systems ⚫Describes the relational data model, its integrity constraints and update operations, and the operations of the relational algebra 2
  • 3. Introduction to Database ⚫A database is an organized collection of data. ⚫It is the collection of schemas, tables, queries, reports, views and other objects. ⚫Database is a well-arranged and self-defining collection of data that is used to preserve data and metadata (Data about Data) and maintain data stability and integrity. 3
  • 4. Database Functionalities ⚫Data Storage Management ⚫Data Transformation and Presentation ⚫Security ⚫Multi-user Access Control ⚫Backup and Recovery ⚫Data Integrity ⚫Database Access Language ⚫Database Communication Interface. 4
  • 5. Applications of databases ⚫Banking: transactions ⚫Airlines: reservations, schedules ⚫Universities: registration, grades ⚫Sales: customers, products, purchases ⚫Online retailers: order tracking, customized recommendations ⚫Manufacturing: production, inventory, orders, supply chain ⚫Human resources: employee records, salaries, tax deductions 5
  • 6. Advantages & Disadvantages of DB Advantages: ⚫High data quality, integrity, and consistency ⚫Reduced data redundancy and application maintenance ⚫Easy access and sharing ⚫Scalable ⚫Improved security ⚫Specialized and productive management tool Major disadvantages: ⚫ Increased complexity ⚫Greater impact of failure 6
  • 7. Relational Database ⚫A relational database (RDB) is a collective set of multiple data sets organized by tables, records and columns. ⚫RDBs also establish a well-defined relationship between database tables. ⚫In simplest terms, a relational database is one that presents information in tables with rows and columns showing relation between them. 7
  • 8. Database Management System ⚫All the database design and data manipulation tasks are carried by a Database Management System (DBMS). ⚫It is computer software designed for the purpose of managing databases based on a variety of data models. 8
  • 9. Schema and Instance Schema : logical structure of the database is called Schema. Instance : The actual content of the database at a particular point in time is called an Instance. 9
  • 10. Database table properties ⚫Unique table name. ⚫All values in a row describe the one instance. ⚫All values in a column are of the same kind. ⚫Each row is distinct. ⚫A cell of the table holds a single value. ⚫Each column has a unique name. ⚫There is no ordering in rows. ⚫NULL value can also be stored in tables. 10
  • 11. A simple Database Table In a database, data are organized in relations (tables) which may be linked by some constraints. Columns contain what information is needed to be stored and Rows contain each record. For example, in a university database, there can be tables to store information about courses, instructors, student, section etc. Columns are called fields and each row contains record which stores value for each field. Here, ID, name, dept_name and salary are the fields to store and {2222, Einstein, Physics, 95000} is a record. 11
  • 12. Data Model ⚫A detailed model that captures overall structure of organizational data while being independent of any implementation considerations. ⚫Data modeling involves examining the data objects in a system and identifying the relationship between these objects. ⚫There are different ways of model a database. They are: ⚫ Relational model ⚫ Entity-Relationship data model (mainly for database design) ⚫ Object-based data models (Object-oriented and Object- relational) ⚫ Semi structured data model (XML) 12
  • 13. Entity, Attributes and Relationships ⚫Entity: An entity is an object that exists and is distinguishable from other objects. It is the primary task to determine all the entities and their attributes while modeling a database. Entities are denoted using rectangle. Example: specific person, company, event, plant. ⚫Attribute: An entity is represented by a set of attributes that is descriptive properties possessed by an entity. Attributes are denoted using elliptical shape. Example: instructor = (ID, name, street, city, salary), course= (course_id, title, credits) ⚫Relationship: A relationship is an association among several entities. Entity relationships are denoted using rhombus shape. Example: students are enrolled in courses. Instructor teaches courses. 13
  • 14. Entities & their Attributes with Relationship in a University Database 14
  • 15. Primary key ⚫ A primary key is a candidate key and a single field that is most appropriate to be the main reference key for the table. ⚫ The primary key must contain unique values, must never be null and uniquely identify each record in the table. ⚫ For example, in a Students table, we can see that, using only {StudentID} it is possible to identify each record distinctly. So, this is the primary key for the table. 15
  • 16. Foreign key ⚫ A foreign key is generally a primary key from one table that appears as a field in another table to establish a relation between the first and second table. ⚫ For example, consider the relationship between Students and Courses. Student information is stores in Students table and course information is stored in Courses table. From these two tables how to show that which student have which courses? This is done using a foreign key field {courseId} in the Students table, which will contain the values of {courseId} field of Courses table. 16
  • 17. 17
  • 18. Question ⚫ What is database? Why do we use database? What are the advantage and disadvantage of database? ⚫ What is DBMS? What is schema and instance? What are the properties of database table? What is Field and Record? ⚫ What is a relational database? Find the tables necessary for a Library Management System/ Hospital Management System. ⚫ What is a data model? What are entity, attribute and Relationship? Discuss with example. ⚫ Find all the entities of an online bookshop management database. Find out all the attributes for each entity. ⚫ Find all the entities of a Shopping Store management database. Find out all the attributes for each entity. ⚫ What is Primary key? Describe with example. ⚫ What is Foreign Key? Why do we use Foreign Key in a database? Explain with example. ⚫ For an online book shop database, identify the Primary Key and Foreign Key in Customers and Orders table. 18