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 trainingbpatino15
 
Oracle 12 c new-features
Oracle 12 c new-featuresOracle 12 c new-features
Oracle 12 c new-featuresNavneet Upneja
 
Introduction to transaction management
Introduction to transaction managementIntroduction to transaction management
Introduction to transaction managementDr. C.V. Suresh Babu
 
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 DECRim Zaidullin
 
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 ...NGA Human Resources
 
How to analyze_table_through_informatica
How to analyze_table_through_informaticaHow to analyze_table_through_informatica
How to analyze_table_through_informaticasushantbit04
 
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.docxmonicafrancis71118
 
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...Citrix
 
TAG Presents: NetSuite SuiteFlow 101
TAG Presents: NetSuite SuiteFlow 101 TAG Presents: NetSuite SuiteFlow 101
TAG Presents: NetSuite SuiteFlow 101 TAG
 
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 GarntsarikABTO 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.docxamrit47
 
~RepairData Newsletter - Feb 2015
~RepairData Newsletter - Feb 2015~RepairData Newsletter - Feb 2015
~RepairData Newsletter - Feb 2015Gary Harris
 
online mobile phone shopping
online mobile phone shoppingonline mobile phone shopping
online mobile phone shoppingamar patwa
 

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
 
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
 
online mobile phone shopping
online mobile phone shoppingonline mobile phone shopping
online mobile phone shopping
 

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

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

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