SlideShare uma empresa 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

Mais conteúdo relacionado

Semelhante 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
 

Semelhante 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
 

Mais de NiloyHasan12

Mais 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

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
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
 
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
 

Último (20)

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.
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).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
 
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
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

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