SlideShare una empresa de Scribd logo
1 de 19
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

Más contenido relacionado

Similar a Chapter 7 Basic Data Storage.pptx

Database Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdfDatabase Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdf
rsujeet169
 
DISE - Database Concepts
DISE - Database ConceptsDISE - Database Concepts
DISE - Database Concepts
Rasan Samarasinghe
 
Cdocumentsandsettingsuser1desktop2 dbmsexamples-091012013049-phpapp01
Cdocumentsandsettingsuser1desktop2 dbmsexamples-091012013049-phpapp01Cdocumentsandsettingsuser1desktop2 dbmsexamples-091012013049-phpapp01
Cdocumentsandsettingsuser1desktop2 dbmsexamples-091012013049-phpapp01
Raza Baloch
 

Similar a 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
 
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
 
Cdocumentsandsettingsuser1desktop2 dbmsexamples-091012013049-phpapp01
Cdocumentsandsettingsuser1desktop2 dbmsexamples-091012013049-phpapp01Cdocumentsandsettingsuser1desktop2 dbmsexamples-091012013049-phpapp01
Cdocumentsandsettingsuser1desktop2 dbmsexamples-091012013049-phpapp01
 

Más de NiloyHasan12

Más de 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
 

Último

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Último (20)

Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 

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