SlideShare a Scribd company logo
1 of 23
Er. Nawaraj Bhandari
Topic 10
Supporting Transactions
Transactions
 A transaction is an operation carried out on the database.
 Transactions can generally be identified as retrievals, inserts, updates
and deletes. This is remembered by the acronym CRUD (Create,
Retrieve, Update and Delete).
 Transactions can be made up of one or more operations.
Identify Transactions
What do they do?
What tables do they affect?
What attributes do they affect?
How often do they run?
How many rows do they affect?
Transactions of Appointment System
Transaction 1 – Add a new patient
Transaction 2 – Delete a patient
Transaction 3 – Record a appointment
Transaction 4 – Show a detail list of patient and the appointments they
have had with the doctors
Transaction 5 – Show a list of patients
Transaction 6 – Update a patient record to change their address
 The tables required for this system are Patient, Appointment and
Doctor.
CRUD Matrix of Appointment System (Blank)
Transaction
Relation
Patient Appointment Doctor
T1
T2
T3
T4
T5
T6
CRUD Matrix of Appointment System
Transaction
Relation
Patient Appointment Doctor
T1 C
T2 D
T3 C
T4 R R R
T5 R
T6 U
Transactions in the Boat Hire System
a. Enter the details of all the boats. Update any details for boats. Delete
boats.
b. Enter the details for customers. Update any details for customers.
c. Enter the details for hiring of boats.
d. Enter the details for any damage to boats.
e. List the details of all the boats.
f. List the details of all the customers; their hire and for which boats.
g. List the details for damage, to which boats, during which hire periods and
for which customers.
h. Provide a summary of the hires for a particular period.
Transaction
Relation
Boat Customer Hire Damage
A
B
C
D
E
F
G
H
Blank CRUD Matrix
Transaction
Relation
Boat Customer Hire Damage
A C U D
B C U
C C
D C
E R
F R R R
G R R R R
H R
Completed CRUD Matrix
Literary agent
 Fill in the CRUD matrix below to show the following transactions.
Transaction 1. Add a new Author.
Transaction 2. Create a new agent and set up an appointment for her.
Transaction 3. Delete an author and all the appointments they have
had.
Transaction 4. Show a list of Agents details and the Appointments they
have had and with which Authors.
Transaction 5. Update an Agent’s address
Transaction 6. Delete an Appointment.
Roles in a System
 Not every user is the same.
 Users will need to access different parts of the system and access it
in different ways.
Boat Hire System - Roles
 Manager – should be able to access all parts of the system, because
their role means that they might have to add and delete any data and
be able to see anything.
 Admin Assistant – just carries out routine tasks, such as adding any
new customers and recording damage to boats.
Table/User Boat Customer Rental Damage
Manager CRUD CRUD CRUD CRUD
Admin
Assistant
R CRU CRU CRU
SQL Facilities to Manage Roles
 Grant – gives a particular role or user in the database system access
to an object (such as a table).
 Revoke – removes access to an object (such as a table) from a
particular role or user in the database system.
Grant
 GRANT CREATE ON Boat TO Admin;
This command will give the role of Admin the right to create data on
the table Boat.
 GRANT ALL ON Boat TO Manager;
This command will give the role of Manager the right to carry out any
operation on the table Boat.
Revoke
 REVOKE ALL ON Boat FROM Admin;
– this command will take away any access rights from the role of Admin
on the table Boat.
 REVOKE DELETE ON Boat FROM Manager;
– this command will take away the right to delete data from the Boat
table by the Manager.
Performance
 The term ‘Performance’ is generally used by database professionals to
refer to the way in which a query behaves when run against a
database.
 Increasingly, databases contain large amounts of data...
 The rate at which a query can return an answer can be slowed when it
has to sort though large numbers of records.
 Performance becomes an issue...
Indexes
 An index is a structure in a database that helps queries run more
quickly.
 An index is a data structure that stores the values for a specific
column in a table that makes easier to find a record.
 Improves performance
 Index can also be unique which will prevent a duplicate value from
being added to that column.
Improving Performance with the Use of Views
View of
selected rows
or columns of
these tables
Table 1
Table 2
Table 3
Query
View
 A view is a virtual table which
completely acts as a real table.
 The use of view as a way to improve
performance.
 Views can be used to combine tables,
so that instead of joining tables in a
query, the query will just access the
view and thus be quicker.
View
 We can perform different SQL queries.
 DESC department_worker_view;
De-Normalisation
 Normalising our data model means we will have the minimum amount
of redundancy.
 If we are running a query that joins tables, this will be slower than
running a query against a single table or view. This can have an effect
on performance.
 Denormalisation can be done by including an attribute in a table that
should not be there according to the rules of normalisation.
References
 http://stackoverflow.com/questions/7605707/clustered-vs-non-
clustered
ANY QUESTIONS?

More Related Content

What's hot

Degrees of data abstraction
Degrees of data abstractionDegrees of data abstraction
Degrees of data abstractionMary May Porto
 
Air Line Management System | DBMS project
Air Line Management System | DBMS projectAir Line Management System | DBMS project
Air Line Management System | DBMS projectAniketHandore
 
Relational Model in dbms & sql database
Relational Model in dbms & sql databaseRelational Model in dbms & sql database
Relational Model in dbms & sql databasegourav kottawar
 
Data abstraction in DBMS
Data abstraction in DBMSData abstraction in DBMS
Data abstraction in DBMSPapan Sarkar
 
data manipulation language
data manipulation languagedata manipulation language
data manipulation languageJananiSelvaraj10
 
CQRS introduction
CQRS introductionCQRS introduction
CQRS introductionYura Taras
 
Introduction to DBMS and SQL Overview
Introduction to DBMS and SQL OverviewIntroduction to DBMS and SQL Overview
Introduction to DBMS and SQL OverviewPrabu U
 
Database Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance AnalysisDatabase Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance AnalysisDAGEOP LTD
 
Introduction to database & sql
Introduction to database & sqlIntroduction to database & sql
Introduction to database & sqlzahid6
 
Bank mangement system
Bank mangement systemBank mangement system
Bank mangement systemFaisalGhffar
 
database management system
database  management systemdatabase  management system
database management systemVivek Kumar
 

What's hot (20)

Degrees of data abstraction
Degrees of data abstractionDegrees of data abstraction
Degrees of data abstraction
 
RDBMS.ppt
RDBMS.pptRDBMS.ppt
RDBMS.ppt
 
Database Design
Database Design Database Design
Database Design
 
Data Abstraction
Data AbstractionData Abstraction
Data Abstraction
 
Air Line Management System | DBMS project
Air Line Management System | DBMS projectAir Line Management System | DBMS project
Air Line Management System | DBMS project
 
Relational Model in dbms & sql database
Relational Model in dbms & sql databaseRelational Model in dbms & sql database
Relational Model in dbms & sql database
 
Data abstraction in DBMS
Data abstraction in DBMSData abstraction in DBMS
Data abstraction in DBMS
 
data manipulation language
data manipulation languagedata manipulation language
data manipulation language
 
Database Languages.pptx
Database Languages.pptxDatabase Languages.pptx
Database Languages.pptx
 
CQRS introduction
CQRS introductionCQRS introduction
CQRS introduction
 
Introduction to DBMS and SQL Overview
Introduction to DBMS and SQL OverviewIntroduction to DBMS and SQL Overview
Introduction to DBMS and SQL Overview
 
Database Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance AnalysisDatabase Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance Analysis
 
Db4 th
Db4 thDb4 th
Db4 th
 
Dbms viva questions
Dbms viva questionsDbms viva questions
Dbms viva questions
 
Introduction to database & sql
Introduction to database & sqlIntroduction to database & sql
Introduction to database & sql
 
Bank mangement system
Bank mangement systemBank mangement system
Bank mangement system
 
Rdbms
RdbmsRdbms
Rdbms
 
Data Models
Data ModelsData Models
Data Models
 
database management system
database  management systemdatabase  management system
database management system
 
Dbms
DbmsDbms
Dbms
 

Similar to Supporting Transactions

Similar to Supporting Transactions (20)

Transaction
TransactionTransaction
Transaction
 
Sdd 4
Sdd 4Sdd 4
Sdd 4
 
Day01 01 software requirement concepts
Day01 01 software requirement conceptsDay01 01 software requirement concepts
Day01 01 software requirement concepts
 
Teradata 13.10
Teradata 13.10Teradata 13.10
Teradata 13.10
 
Trigger in DBMS
Trigger in DBMSTrigger in DBMS
Trigger in DBMS
 
Database Testing
Database TestingDatabase Testing
Database Testing
 
Data Dictionary Similarities Discussion.docx
Data Dictionary Similarities Discussion.docxData Dictionary Similarities Discussion.docx
Data Dictionary Similarities Discussion.docx
 
SQL
SQLSQL
SQL
 
22827361 ab initio-fa-qs
22827361 ab initio-fa-qs22827361 ab initio-fa-qs
22827361 ab initio-fa-qs
 
Chapter Five Physical Database Design.pptx
Chapter Five Physical Database Design.pptxChapter Five Physical Database Design.pptx
Chapter Five Physical Database Design.pptx
 
Teradata Tutorial for Beginners
Teradata Tutorial for BeginnersTeradata Tutorial for Beginners
Teradata Tutorial for Beginners
 
Potter’S Wheel
Potter’S WheelPotter’S Wheel
Potter’S Wheel
 
sultana.pptx
sultana.pptxsultana.pptx
sultana.pptx
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answers
 
BA371deliv3
BA371deliv3BA371deliv3
BA371deliv3
 
New folderIMAG2318.jpgNew folderIMAG2319.jpgNew folder.docx
New folderIMAG2318.jpgNew folderIMAG2319.jpgNew folder.docxNew folderIMAG2318.jpgNew folderIMAG2319.jpgNew folder.docx
New folderIMAG2318.jpgNew folderIMAG2319.jpgNew folder.docx
 
online blood bank system design
online blood bank system designonline blood bank system design
online blood bank system design
 
transaction management, concept & State
transaction management, concept & Statetransaction management, concept & State
transaction management, concept & State
 
RDB - Repairable Database Systems
RDB - Repairable Database SystemsRDB - Repairable Database Systems
RDB - Repairable Database Systems
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
 

Recently uploaded

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
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.pdfNirmal Dwivedi
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
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 FellowsMebane Rash
 
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...Poonam Aher Patil
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
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.pptxheathfieldcps1
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 

Recently uploaded (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
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
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
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
 
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...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
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
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .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
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 

Supporting Transactions

  • 1. Er. Nawaraj Bhandari Topic 10 Supporting Transactions
  • 2. Transactions  A transaction is an operation carried out on the database.  Transactions can generally be identified as retrievals, inserts, updates and deletes. This is remembered by the acronym CRUD (Create, Retrieve, Update and Delete).  Transactions can be made up of one or more operations.
  • 3. Identify Transactions What do they do? What tables do they affect? What attributes do they affect? How often do they run? How many rows do they affect?
  • 4. Transactions of Appointment System Transaction 1 – Add a new patient Transaction 2 – Delete a patient Transaction 3 – Record a appointment Transaction 4 – Show a detail list of patient and the appointments they have had with the doctors Transaction 5 – Show a list of patients Transaction 6 – Update a patient record to change their address  The tables required for this system are Patient, Appointment and Doctor.
  • 5. CRUD Matrix of Appointment System (Blank) Transaction Relation Patient Appointment Doctor T1 T2 T3 T4 T5 T6
  • 6. CRUD Matrix of Appointment System Transaction Relation Patient Appointment Doctor T1 C T2 D T3 C T4 R R R T5 R T6 U
  • 7. Transactions in the Boat Hire System a. Enter the details of all the boats. Update any details for boats. Delete boats. b. Enter the details for customers. Update any details for customers. c. Enter the details for hiring of boats. d. Enter the details for any damage to boats. e. List the details of all the boats. f. List the details of all the customers; their hire and for which boats. g. List the details for damage, to which boats, during which hire periods and for which customers. h. Provide a summary of the hires for a particular period.
  • 8. Transaction Relation Boat Customer Hire Damage A B C D E F G H Blank CRUD Matrix
  • 9. Transaction Relation Boat Customer Hire Damage A C U D B C U C C D C E R F R R R G R R R R H R Completed CRUD Matrix
  • 10. Literary agent  Fill in the CRUD matrix below to show the following transactions. Transaction 1. Add a new Author. Transaction 2. Create a new agent and set up an appointment for her. Transaction 3. Delete an author and all the appointments they have had. Transaction 4. Show a list of Agents details and the Appointments they have had and with which Authors. Transaction 5. Update an Agent’s address Transaction 6. Delete an Appointment.
  • 11. Roles in a System  Not every user is the same.  Users will need to access different parts of the system and access it in different ways.
  • 12. Boat Hire System - Roles  Manager – should be able to access all parts of the system, because their role means that they might have to add and delete any data and be able to see anything.  Admin Assistant – just carries out routine tasks, such as adding any new customers and recording damage to boats. Table/User Boat Customer Rental Damage Manager CRUD CRUD CRUD CRUD Admin Assistant R CRU CRU CRU
  • 13. SQL Facilities to Manage Roles  Grant – gives a particular role or user in the database system access to an object (such as a table).  Revoke – removes access to an object (such as a table) from a particular role or user in the database system.
  • 14. Grant  GRANT CREATE ON Boat TO Admin; This command will give the role of Admin the right to create data on the table Boat.  GRANT ALL ON Boat TO Manager; This command will give the role of Manager the right to carry out any operation on the table Boat.
  • 15. Revoke  REVOKE ALL ON Boat FROM Admin; – this command will take away any access rights from the role of Admin on the table Boat.  REVOKE DELETE ON Boat FROM Manager; – this command will take away the right to delete data from the Boat table by the Manager.
  • 16. Performance  The term ‘Performance’ is generally used by database professionals to refer to the way in which a query behaves when run against a database.  Increasingly, databases contain large amounts of data...  The rate at which a query can return an answer can be slowed when it has to sort though large numbers of records.  Performance becomes an issue...
  • 17. Indexes  An index is a structure in a database that helps queries run more quickly.  An index is a data structure that stores the values for a specific column in a table that makes easier to find a record.  Improves performance  Index can also be unique which will prevent a duplicate value from being added to that column.
  • 18. Improving Performance with the Use of Views View of selected rows or columns of these tables Table 1 Table 2 Table 3 Query
  • 19. View  A view is a virtual table which completely acts as a real table.  The use of view as a way to improve performance.  Views can be used to combine tables, so that instead of joining tables in a query, the query will just access the view and thus be quicker.
  • 20. View  We can perform different SQL queries.  DESC department_worker_view;
  • 21. De-Normalisation  Normalising our data model means we will have the minimum amount of redundancy.  If we are running a query that joins tables, this will be slower than running a query against a single table or view. This can have an effect on performance.  Denormalisation can be done by including an attribute in a table that should not be there according to the rules of normalisation.

Editor's Notes

  1. Added Slide
  2. Added Slide
  3. Added Slide
  4. clustered index determines the physical order of the rows in the database