DALmodule and sp transaction
Upcoming SlideShare
Loading in...5

DALmodule and sp transaction

DALmodule and sp transaction



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds


Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

DALmodule and sp transaction DALmodule and sp transaction Presentation Transcript

  • 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