SlideShare a Scribd company logo
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.
The tables required for this system are Boat, Customer , Hire and Damage.
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
Manager CRUD CRUD CRUD
Admin
Assistant
R 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 SELECT,INSERT,UPDATE,DELETE ON Boat TO smith;
 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.
Clustered Indexes
 A clustered index alters the way that the rows are physically stored.
 When you create a clustered index on a column (or a number of
columns), the database server sorts the table’s rows by that column(s).
 It is like a dictionary, where all words are sorted in an alphabetical order.
 (**) Note, that only one clustered index can be created per table i.e.
Primarary Key. It alters the way the table is physically stored, it couldn’t
be otherwise.
Non-Clustered Indexes
 It creates a completely different object within the table, that contains the
column(s) selected for indexing and a pointer back to the table’s rows
containing the data.
 It is like an index in the last pages of a book. All keywords are sorted and
contain a reference back to the appropriate page number. A non-
clustered index on the computer_id column, in the previous example,
would look like the table below:
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.
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;
References
 http://stackoverflow.com/questions/7605707/clustered-vs-non-
clustered
ANY QUESTIONS?
References
 http://rdbms.opengrass.net/2_Database%20Design/2.2_Normalisati
on/2.2.4_1NF%20Repeating%20Attributes.html
 http://rdbms.opengrass.net/2_Database%20Design/2.2_Normalisati
on/2.2.5_2NF-Partial%20Dependancy.html
 http://rdbms.opengrass.net/2_Database%20Design/2.2_Normalisati
on/2.2.6_3NF-Transitive%20Dependency.html
 http://en.wikipedia.org/wiki/Integrity_constraints
 http://www.jkinfoline.com/functional-dependency.html
 http://jcsites.juniata.edu/faculty/rhodes/dbms/funcdep.htm

More Related Content

What's hot

Database Basics
Database BasicsDatabase Basics
Database Basics
Abdel Moneim Emad
 
Database basics
Database basicsDatabase basics
Database basics
prachin514
 
Database Concepts and Terminologies
Database Concepts and TerminologiesDatabase Concepts and Terminologies
Database Concepts and Terminologies
Ousman Faal
 
Systems Analyst and Design - Data Dictionary
Systems Analyst and Design -  Data DictionarySystems Analyst and Design -  Data Dictionary
Systems Analyst and Design - Data Dictionary
Kimberly Coquilla
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
Archit Saxena
 
Dbms
DbmsDbms
Introduction to database & sql
Introduction to database & sqlIntroduction to database & sql
Introduction to database & sql
zahid6
 
Database Basics Theory
Database Basics TheoryDatabase Basics Theory
Database Basics Theory
sunmitraeducation
 
D01 etl
D01 etlD01 etl
D01 etl
Prince Jain
 
Week 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data ModelWeek 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data Model
oudesign
 
Database performance tuning and query optimization
Database performance tuning and query optimizationDatabase performance tuning and query optimization
Database performance tuning and query optimization
Usman Tariq
 
Abap data dictionary
Abap data dictionaryAbap data dictionary
Abap data dictionary
SmartGokul4
 
Data warehouse logical design
Data warehouse logical designData warehouse logical design
Data warehouse logical design
Er. Nawaraj Bhandari
 
Chapter12 designing databases
Chapter12 designing databasesChapter12 designing databases
Chapter12 designing databases
Dhani Ahmad
 
Etl process in data warehouse
Etl process in data warehouseEtl process in data warehouse
Etl process in data warehouse
Komal Choudhary
 
Introduction to data mining and data warehousing
Introduction to data mining and data warehousingIntroduction to data mining and data warehousing
Introduction to data mining and data warehousing
Er. Nawaraj Bhandari
 
Cts informatica interview question answers
Cts informatica interview question answersCts informatica interview question answers
Cts informatica interview question answers
Sweta Singh
 
Final
FinalFinal
Rdbms
RdbmsRdbms
Rdbms
tech4us
 
Database aggregation using metadata
Database aggregation using metadataDatabase aggregation using metadata
Database aggregation using metadata
Dr Sandeep Kumar Poonia
 

What's hot (20)

Database Basics
Database BasicsDatabase Basics
Database Basics
 
Database basics
Database basicsDatabase basics
Database basics
 
Database Concepts and Terminologies
Database Concepts and TerminologiesDatabase Concepts and Terminologies
Database Concepts and Terminologies
 
Systems Analyst and Design - Data Dictionary
Systems Analyst and Design -  Data DictionarySystems Analyst and Design -  Data Dictionary
Systems Analyst and Design - Data Dictionary
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Dbms
DbmsDbms
Dbms
 
Introduction to database & sql
Introduction to database & sqlIntroduction to database & sql
Introduction to database & sql
 
Database Basics Theory
Database Basics TheoryDatabase Basics Theory
Database Basics Theory
 
D01 etl
D01 etlD01 etl
D01 etl
 
Week 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data ModelWeek 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data Model
 
Database performance tuning and query optimization
Database performance tuning and query optimizationDatabase performance tuning and query optimization
Database performance tuning and query optimization
 
Abap data dictionary
Abap data dictionaryAbap data dictionary
Abap data dictionary
 
Data warehouse logical design
Data warehouse logical designData warehouse logical design
Data warehouse logical design
 
Chapter12 designing databases
Chapter12 designing databasesChapter12 designing databases
Chapter12 designing databases
 
Etl process in data warehouse
Etl process in data warehouseEtl process in data warehouse
Etl process in data warehouse
 
Introduction to data mining and data warehousing
Introduction to data mining and data warehousingIntroduction to data mining and data warehousing
Introduction to data mining and data warehousing
 
Cts informatica interview question answers
Cts informatica interview question answersCts informatica interview question answers
Cts informatica interview question answers
 
Final
FinalFinal
Final
 
Rdbms
RdbmsRdbms
Rdbms
 
Database aggregation using metadata
Database aggregation using metadataDatabase aggregation using metadata
Database aggregation using metadata
 

Similar to Transaction

Supporting Transactions
Supporting TransactionsSupporting Transactions
Supporting Transactions
Bhandari Nawaraj
 
Chapter Five Physical Database Design.pptx
Chapter Five Physical Database Design.pptxChapter Five Physical Database Design.pptx
Chapter Five Physical Database Design.pptx
haymanot taddesse
 
online blood bank system design
online blood bank system designonline blood bank system design
online blood bank system design
Rohit Jawale
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answers
LakshmiSarvani6
 
Database testing
Database testingDatabase testing
Database testing
Pesara Swamy
 
Database Testing
Database TestingDatabase Testing
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifah
alish sha
 
Unit iv function and service oriented designs 9
Unit iv function and service oriented designs 9Unit iv function and service oriented designs 9
Unit iv function and service oriented designs 9
kiruthikamurugesan2628
 
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...
Massimo Cenci
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
Sperasoft
 
T-SQL Overview
T-SQL OverviewT-SQL Overview
T-SQL Overview
Ahmed Elbaz
 
PPT SQL CLASS.pptx
PPT SQL CLASS.pptxPPT SQL CLASS.pptx
PPT SQL CLASS.pptx
AngeOuattara
 
SQL Tunning
SQL TunningSQL Tunning
SQL Tunning
Dhananjay Goel
 
Adbms
AdbmsAdbms
Adbms
jass12345
 
When & Why\'s of Denormalization
When & Why\'s of DenormalizationWhen & Why\'s of Denormalization
When & Why\'s of Denormalization
Aliya Saldanha
 
sultana.pptx
sultana.pptxsultana.pptx
sultana.pptx
SameerSameer90
 
Sql interview q&a
Sql interview q&aSql interview q&a
Sql interview q&a
Syed Shah
 
Brad McGehee Intepreting Execution Plans Mar09
Brad McGehee Intepreting Execution Plans Mar09Brad McGehee Intepreting Execution Plans Mar09
Brad McGehee Intepreting Execution Plans Mar09
guest9d79e073
 
Brad McGehee Intepreting Execution Plans Mar09
Brad McGehee Intepreting Execution Plans Mar09Brad McGehee Intepreting Execution Plans Mar09
Brad McGehee Intepreting Execution Plans Mar09
Mark Ginnebaugh
 
BIS06 Physical Database Models
BIS06 Physical Database ModelsBIS06 Physical Database Models
BIS06 Physical Database Models
Prithwis Mukerjee
 

Similar to Transaction (20)

Supporting Transactions
Supporting TransactionsSupporting Transactions
Supporting Transactions
 
Chapter Five Physical Database Design.pptx
Chapter Five Physical Database Design.pptxChapter Five Physical Database Design.pptx
Chapter Five Physical Database Design.pptx
 
online blood bank system design
online blood bank system designonline blood bank system design
online blood bank system design
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answers
 
Database testing
Database testingDatabase testing
Database testing
 
Database Testing
Database TestingDatabase Testing
Database Testing
 
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifah
 
Unit iv function and service oriented designs 9
Unit iv function and service oriented designs 9Unit iv function and service oriented designs 9
Unit iv function and service oriented designs 9
 
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...
Recipes 8 of Data Warehouse and Business Intelligence - Naming convention tec...
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
 
T-SQL Overview
T-SQL OverviewT-SQL Overview
T-SQL Overview
 
PPT SQL CLASS.pptx
PPT SQL CLASS.pptxPPT SQL CLASS.pptx
PPT SQL CLASS.pptx
 
SQL Tunning
SQL TunningSQL Tunning
SQL Tunning
 
Adbms
AdbmsAdbms
Adbms
 
When & Why\'s of Denormalization
When & Why\'s of DenormalizationWhen & Why\'s of Denormalization
When & Why\'s of Denormalization
 
sultana.pptx
sultana.pptxsultana.pptx
sultana.pptx
 
Sql interview q&a
Sql interview q&aSql interview q&a
Sql interview q&a
 
Brad McGehee Intepreting Execution Plans Mar09
Brad McGehee Intepreting Execution Plans Mar09Brad McGehee Intepreting Execution Plans Mar09
Brad McGehee Intepreting Execution Plans Mar09
 
Brad McGehee Intepreting Execution Plans Mar09
Brad McGehee Intepreting Execution Plans Mar09Brad McGehee Intepreting Execution Plans Mar09
Brad McGehee Intepreting Execution Plans Mar09
 
BIS06 Physical Database Models
BIS06 Physical Database ModelsBIS06 Physical Database Models
BIS06 Physical Database Models
 

More from Er. Nawaraj Bhandari

Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methods
Er. Nawaraj Bhandari
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data mining
Er. Nawaraj Bhandari
 
Mining Association Rules in Large Database
Mining Association Rules in Large DatabaseMining Association Rules in Large Database
Mining Association Rules in Large Database
Er. Nawaraj Bhandari
 
Data warehouse testing
Data warehouse testingData warehouse testing
Data warehouse testing
Er. Nawaraj Bhandari
 
Classification and prediction in data mining
Classification and prediction in data miningClassification and prediction in data mining
Classification and prediction in data mining
Er. Nawaraj Bhandari
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean Function
Er. Nawaraj Bhandari
 
Chapter 6: Sequential Logic
Chapter 6: Sequential LogicChapter 6: Sequential Logic
Chapter 6: Sequential Logic
Er. Nawaraj Bhandari
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
Er. Nawaraj Bhandari
 
Chapter 4: Combinational Logic
Chapter 4: Combinational LogicChapter 4: Combinational Logic
Chapter 4: Combinational Logic
Er. Nawaraj Bhandari
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
Er. Nawaraj Bhandari
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
Er. Nawaraj Bhandari
 
Introduction to Electronic Commerce
Introduction to Electronic CommerceIntroduction to Electronic Commerce
Introduction to Electronic Commerce
Er. Nawaraj Bhandari
 
Evaluating software development
Evaluating software developmentEvaluating software development
Evaluating software development
Er. Nawaraj Bhandari
 
Using macros in microsoft excel part 2
Using macros in microsoft excel   part 2Using macros in microsoft excel   part 2
Using macros in microsoft excel part 2
Er. Nawaraj Bhandari
 
Using macros in microsoft excel part 1
Using macros in microsoft excel   part 1Using macros in microsoft excel   part 1
Using macros in microsoft excel part 1
Er. Nawaraj Bhandari
 
Using macros in microsoft access
Using macros in microsoft accessUsing macros in microsoft access
Using macros in microsoft access
Er. Nawaraj Bhandari
 
Testing software development
Testing software developmentTesting software development
Testing software development
Er. Nawaraj Bhandari
 
Application software and business processes
Application software and business processesApplication software and business processes
Application software and business processes
Er. Nawaraj Bhandari
 
An introduction to vba and macros
An introduction to vba and macrosAn introduction to vba and macros
An introduction to vba and macros
Er. Nawaraj Bhandari
 
An introduction to end user software development
An introduction to end user software developmentAn introduction to end user software development
An introduction to end user software development
Er. Nawaraj Bhandari
 

More from Er. Nawaraj Bhandari (20)

Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methods
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data mining
 
Mining Association Rules in Large Database
Mining Association Rules in Large DatabaseMining Association Rules in Large Database
Mining Association Rules in Large Database
 
Data warehouse testing
Data warehouse testingData warehouse testing
Data warehouse testing
 
Classification and prediction in data mining
Classification and prediction in data miningClassification and prediction in data mining
Classification and prediction in data mining
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean Function
 
Chapter 6: Sequential Logic
Chapter 6: Sequential LogicChapter 6: Sequential Logic
Chapter 6: Sequential Logic
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
Chapter 4: Combinational Logic
Chapter 4: Combinational LogicChapter 4: Combinational Logic
Chapter 4: Combinational Logic
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
 
Introduction to Electronic Commerce
Introduction to Electronic CommerceIntroduction to Electronic Commerce
Introduction to Electronic Commerce
 
Evaluating software development
Evaluating software developmentEvaluating software development
Evaluating software development
 
Using macros in microsoft excel part 2
Using macros in microsoft excel   part 2Using macros in microsoft excel   part 2
Using macros in microsoft excel part 2
 
Using macros in microsoft excel part 1
Using macros in microsoft excel   part 1Using macros in microsoft excel   part 1
Using macros in microsoft excel part 1
 
Using macros in microsoft access
Using macros in microsoft accessUsing macros in microsoft access
Using macros in microsoft access
 
Testing software development
Testing software developmentTesting software development
Testing software development
 
Application software and business processes
Application software and business processesApplication software and business processes
Application software and business processes
 
An introduction to vba and macros
An introduction to vba and macrosAn introduction to vba and macros
An introduction to vba and macros
 
An introduction to end user software development
An introduction to end user software developmentAn introduction to end user software development
An introduction to end user software development
 

Recently uploaded

在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
v7oacc3l
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
Sm321
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
g4dpvqap0
 
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
74nqk8xf
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
AlessioFois2
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
roli9797
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
Timothy Spann
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
vikram sood
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
manishkhaire30
 
University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
soxrziqu
 
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
74nqk8xf
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
nyfuhyz
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Aggregage
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
Social Samosa
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
nuttdpt
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Kiwi Creative
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
AndrzejJarynowski
 

Recently uploaded (20)

在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
 
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
 
University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
 
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
 

Transaction

  • 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. The tables required for this system are Boat, Customer , Hire and Damage.
  • 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 Manager CRUD CRUD CRUD Admin Assistant R 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 SELECT,INSERT,UPDATE,DELETE ON Boat TO smith;  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. Clustered Indexes  A clustered index alters the way that the rows are physically stored.  When you create a clustered index on a column (or a number of columns), the database server sorts the table’s rows by that column(s).  It is like a dictionary, where all words are sorted in an alphabetical order.  (**) Note, that only one clustered index can be created per table i.e. Primarary Key. It alters the way the table is physically stored, it couldn’t be otherwise.
  • 19. Non-Clustered Indexes  It creates a completely different object within the table, that contains the column(s) selected for indexing and a pointer back to the table’s rows containing the data.  It is like an index in the last pages of a book. All keywords are sorted and contain a reference back to the appropriate page number. A non- clustered index on the computer_id column, in the previous example, would look like the table below:
  • 20. 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.
  • 21. Improving Performance with the Use of Views View of selected rows or columns of these tables Table 1 Table 2 Table 3 Query
  • 22. 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.
  • 23. View  We can perform different SQL queries.  DESC department_worker_view;
  • 26. References  http://rdbms.opengrass.net/2_Database%20Design/2.2_Normalisati on/2.2.4_1NF%20Repeating%20Attributes.html  http://rdbms.opengrass.net/2_Database%20Design/2.2_Normalisati on/2.2.5_2NF-Partial%20Dependancy.html  http://rdbms.opengrass.net/2_Database%20Design/2.2_Normalisati on/2.2.6_3NF-Transitive%20Dependency.html  http://en.wikipedia.org/wiki/Integrity_constraints  http://www.jkinfoline.com/functional-dependency.html  http://jcsites.juniata.edu/faculty/rhodes/dbms/funcdep.htm

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
  5. clustered index determines the physical order of the rows in the database
  6. clustered index determines the physical order of the rows in the database