DALmodule and sp transaction
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 (20)

PPT
Domain separation training
PPTX
Data base Users and Administrator pptx
PPTX
PPTX
Database management system normalization
PDF
Oracle 12 c new-features
PPTX
E-Business Information System BBA AVI.pptx
PPTX
Introduction to transaction management
PPTX
Transation.....thanveeer
PDF
Building data pipelines at Shopee with DEC
PPTX
Top Tips for Getting the Best from SuccessFactors Q2 2016 Release Universal ...
DOCX
How to analyze_table_through_informatica
PPTX
Grails Services
PPTX
Vj courier
PPTX
DBMS-Module - 5 updated1onestructure of database.pptx
DOCX
COMPANY Disaster Recovery Plan (DRP) for [PRODU.docx
PDF
Excalibur: best practices for virtual desktop operations leveraging Citrix Di...
PPTX
TAG Presents: NetSuite SuiteFlow 101
 
Domain separation training
Data base Users and Administrator pptx
Database management system normalization
Oracle 12 c new-features
E-Business Information System BBA AVI.pptx
Introduction to transaction management
Transation.....thanveeer
Building data pipelines at Shopee with DEC
Top Tips for Getting the Best from SuccessFactors Q2 2016 Release Universal ...
How to analyze_table_through_informatica
Grails Services
Vj courier
DBMS-Module - 5 updated1onestructure of database.pptx
COMPANY Disaster Recovery Plan (DRP) for [PRODU.docx
Excalibur: best practices for virtual desktop operations leveraging Citrix Di...
TAG Presents: NetSuite SuiteFlow 101
 
Ad

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

PPTX
Agile methodology and scrum development
PDF
Acquiring new skills what you should know
PDF
Baabtra.com programming at school
PDF
99LMS for Enterprises - LMS that you will love
PPTX
Chapter 6 database normalisation
PPTX
Chapter 5 transactions and dcl statements
PPTX
Chapter 4 functions, views, indexing
PPTX
PPTX
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
PPTX
Chapter 1 introduction to sql server
PPTX
Chapter 1 introduction to sql server
Agile methodology and scrum development
Acquiring new skills what you should know
Baabtra.com programming at school
99LMS for Enterprises - LMS that you will love
Chapter 6 database normalisation
Chapter 5 transactions and dcl statements
Chapter 4 functions, views, indexing
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 1 introduction to sql server
Chapter 1 introduction to sql server
Ad

Recently uploaded (20)

PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
IGGE1 Understanding the Self1234567891011
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
Weekly quiz Compilation Jan -July 25.pdf
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PPTX
Virtual and Augmented Reality in Current Scenario
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
Share_Module_2_Power_conflict_and_negotiation.pptx
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
IGGE1 Understanding the Self1234567891011
History, Philosophy and sociology of education (1).pptx
AI-driven educational solutions for real-life interventions in the Philippine...
Paper A Mock Exam 9_ Attempt review.pdf.
Weekly quiz Compilation Jan -July 25.pdf
Cambridge-Practice-Tests-for-IELTS-12.docx
Environmental Education MCQ BD2EE - Share Source.pdf
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
Virtual and Augmented Reality in Current Scenario
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Hazard Identification & Risk Assessment .pdf
TNA_Presentation-1-Final(SAVE)) (1).pptx
ChatGPT for Dummies - Pam Baker Ccesa007.pdf

DALmodule and sp transaction

  • 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