SlideShare a Scribd company logo
1 of 17
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
Week Target Achieved
1 30 27
2
3
Typing Speed
Jobs Applied
# Company Designation Applied Date Current Status
1
2
3
Database Access Layer
Module &
Database Transaction
Name
@gmail.com
www.facebook.com/userna
me
twitter.com/username
in.linkedin.com/in/profilena
me
Phonenumber
Data Access Layer
• A data access layer follows the idea of
"separation of concerns“.
• DAL consist of the code used to pull data from
a db.
• Its isolated from business logic layer and
presentation layer.
mamanages database
Why???? DAL
• DAL allow us to change more easily the
backend physical data storage technology
without having large impact on business logic
layer.
• Data access layers allow us to access data the
same way for different application in our
program.
DB Transaction
• A transaction is a discrete unit of work that
must be completely processed or not
processed at all.
Transaction states
• Active, the initial state; the transaction stays
in this state until while it is still executing.
• A transition is terminated only if it has either
been committed or aborted.
Transaction States
• Partially committed, After the final statement
has been executed
• At this point failure is still possible since
changes may have been only done in main
memory, a hardware failure could still occur.
Transaction States
• Committed- after successful completion.
• Once committed, the transaction can no
longer be undone by aborting it.
• Its effect could be undone only by a
compensating transaction.
Transaction States
• Failed, after the discovery that normal
execution can no longer proceed.
• Once a transaction can not be completed, any
changes that it made must be undone rolling
it back.
Transaction States
• Aborted, after the transaction has been rolled back the
database has been restored to its state prior to the start
of the transaction.
• The DBMS could either kill the transaction or restart the
transaction.
Create procedure DeleteDepartment ( @DepartmentID int ) AS
BEGIN TRANSACTION
DELETE FROM Employees WHERE DepartmentID = @DepartmentID
IF @@ERROR <> 0
BEGIN ROLLBACK
RAISERROR ('Error in deleting employees in DeleteDepartment.', 16, 1)
RETURN
END
DELETE FROM Departments WHERE DepartmentID =
@DepartmentID
IF @@ERROR <> 0
BEGIN ROLLBACK
RAISERROR ('Error in deleting department in DeleteDepartment.', 16, 1)
RETURN
END
COMMIT
If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com

More Related Content

Similar to DALmodule and sp transaction

Domain separation training
Domain separation trainingDomain separation training
Domain separation training
bpatino15
 
Oracle 12 c new-features
Oracle 12 c new-featuresOracle 12 c new-features
Oracle 12 c new-features
Navneet Upneja
 
How to analyze_table_through_informatica
How to analyze_table_through_informaticaHow to analyze_table_through_informatica
How to analyze_table_through_informatica
sushantbit04
 
COMPANY Disaster Recovery Plan (DRP) for [PRODU.docx
COMPANY    Disaster Recovery Plan (DRP) for [PRODU.docxCOMPANY    Disaster Recovery Plan (DRP) for [PRODU.docx
COMPANY Disaster Recovery Plan (DRP) for [PRODU.docx
monicafrancis71118
 
Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
Microsoft Sync Framework (part 1) ABTO Software Lecture GarntsarikMicrosoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
ABTO Software
 
PURPOSE of the project is Williams Specialty Company (WSC) reque.docx
PURPOSE of the project is Williams Specialty Company (WSC) reque.docxPURPOSE of the project is Williams Specialty Company (WSC) reque.docx
PURPOSE of the project is Williams Specialty Company (WSC) reque.docx
amrit47
 
~RepairData Newsletter - Feb 2015
~RepairData Newsletter - Feb 2015~RepairData Newsletter - Feb 2015
~RepairData Newsletter - Feb 2015
Gary Harris
 

Similar to DALmodule and sp transaction (20)

Domain separation training
Domain separation trainingDomain separation training
Domain separation training
 
Transactions
TransactionsTransactions
Transactions
 
Stored procedures in_mysql
Stored procedures in_mysqlStored procedures in_mysql
Stored procedures in_mysql
 
Oracle 12 c new-features
Oracle 12 c new-featuresOracle 12 c new-features
Oracle 12 c new-features
 
3 tier architecture
3 tier architecture3 tier architecture
3 tier architecture
 
E-Business Information System BBA AVI.pptx
E-Business Information System BBA AVI.pptxE-Business Information System BBA AVI.pptx
E-Business Information System BBA AVI.pptx
 
Introduction to transaction management
Introduction to transaction managementIntroduction to transaction management
Introduction to transaction management
 
Transation.....thanveeer
Transation.....thanveeerTransation.....thanveeer
Transation.....thanveeer
 
Building data pipelines at Shopee with DEC
Building data pipelines at Shopee with DECBuilding data pipelines at Shopee with DEC
Building data pipelines at Shopee with DEC
 
Top Tips for Getting the Best from SuccessFactors Q2 2016 Release Universal ...
Top Tips for Getting the Best from SuccessFactors Q2 2016 Release Universal ...Top Tips for Getting the Best from SuccessFactors Q2 2016 Release Universal ...
Top Tips for Getting the Best from SuccessFactors Q2 2016 Release Universal ...
 
How to analyze_table_through_informatica
How to analyze_table_through_informaticaHow to analyze_table_through_informatica
How to analyze_table_through_informatica
 
Sql transacation
Sql transacationSql transacation
Sql transacation
 
Grails Services
Grails ServicesGrails Services
Grails Services
 
Vj courier
Vj courier Vj courier
Vj courier
 
COMPANY Disaster Recovery Plan (DRP) for [PRODU.docx
COMPANY    Disaster Recovery Plan (DRP) for [PRODU.docxCOMPANY    Disaster Recovery Plan (DRP) for [PRODU.docx
COMPANY Disaster Recovery Plan (DRP) for [PRODU.docx
 
Excalibur: best practices for virtual desktop operations leveraging Citrix Di...
Excalibur: best practices for virtual desktop operations leveraging Citrix Di...Excalibur: best practices for virtual desktop operations leveraging Citrix Di...
Excalibur: best practices for virtual desktop operations leveraging Citrix Di...
 
TAG Presents: NetSuite SuiteFlow 101
TAG Presents: NetSuite SuiteFlow 101 TAG Presents: NetSuite SuiteFlow 101
TAG Presents: NetSuite SuiteFlow 101
 
Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
Microsoft Sync Framework (part 1) ABTO Software Lecture GarntsarikMicrosoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
 
PURPOSE of the project is Williams Specialty Company (WSC) reque.docx
PURPOSE of the project is Williams Specialty Company (WSC) reque.docxPURPOSE of the project is Williams Specialty Company (WSC) reque.docx
PURPOSE of the project is Williams Specialty Company (WSC) reque.docx
 
~RepairData Newsletter - Feb 2015
~RepairData Newsletter - Feb 2015~RepairData Newsletter - Feb 2015
~RepairData Newsletter - Feb 2015
 

More from baabtra.com - No. 1 supplier of quality freshers

More from baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
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
 

Recently uploaded (20)

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.
 
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Ữ Â...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
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
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
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
 
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
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
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
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
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
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
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.
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
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...
 
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
 

DALmodule and sp transaction

  • 1.
  • 2. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 3. Week Target Achieved 1 30 27 2 3 Typing Speed
  • 4. Jobs Applied # Company Designation Applied Date Current Status 1 2 3
  • 5. Database Access Layer Module & Database Transaction Name @gmail.com www.facebook.com/userna me twitter.com/username in.linkedin.com/in/profilena me Phonenumber
  • 6. Data Access Layer • A data access layer follows the idea of "separation of concerns“. • DAL consist of the code used to pull data from a db. • Its isolated from business logic layer and presentation layer.
  • 8. Why???? DAL • DAL allow us to change more easily the backend physical data storage technology without having large impact on business logic layer. • Data access layers allow us to access data the same way for different application in our program.
  • 9. DB Transaction • A transaction is a discrete unit of work that must be completely processed or not processed at all.
  • 10. Transaction states • Active, the initial state; the transaction stays in this state until while it is still executing. • A transition is terminated only if it has either been committed or aborted.
  • 11. Transaction States • Partially committed, After the final statement has been executed • At this point failure is still possible since changes may have been only done in main memory, a hardware failure could still occur.
  • 12. Transaction States • Committed- after successful completion. • Once committed, the transaction can no longer be undone by aborting it. • Its effect could be undone only by a compensating transaction.
  • 13. Transaction States • Failed, after the discovery that normal execution can no longer proceed. • Once a transaction can not be completed, any changes that it made must be undone rolling it back.
  • 14. Transaction States • Aborted, after the transaction has been rolled back the database has been restored to its state prior to the start of the transaction. • The DBMS could either kill the transaction or restart the transaction.
  • 15. Create procedure DeleteDepartment ( @DepartmentID int ) AS BEGIN TRANSACTION DELETE FROM Employees WHERE DepartmentID = @DepartmentID IF @@ERROR <> 0 BEGIN ROLLBACK RAISERROR ('Error in deleting employees in DeleteDepartment.', 16, 1) RETURN END DELETE FROM Departments WHERE DepartmentID = @DepartmentID IF @@ERROR <> 0 BEGIN ROLLBACK RAISERROR ('Error in deleting department in DeleteDepartment.', 16, 1) RETURN END COMMIT
  • 16. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 17. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com