1. Part A: Answerthe followingquestions:
1. What istransactionisolationandwhyitisimportant?
Ans. Transactionisolationisanimportantpartof any transactional system.Itdealswithconsistency
and completenessof dataretrievedbyqueries unaffectingauserdataby otheruseractions.A
database acquireslocksondata to maintaina highlevel of isolation. Isolation,inthe contextof
databases,specifieswhenandhowthe changesimplementedinanoperationbecome visibleto
otherparallel operations.Transactionisolationisanimportantpart of any transactional system.It
dealswithconsistencyandcompletenessof dataretrievedbyqueriesunaffectingauserdata by
otheruseractions.A database acquireslocksondata to maintainahigh level of isolation.
2. What are the three basictechniques tocontrol deadlocks?
Ans.The three basictechniquestocontrol deadlocksare:
Deadlockpresentation:A transactionrequestinganew lockisabortedwhenthere isthe
possibilitythatadeadlockcan occur. if the transactionisaborted,all changesmade bythis
transactionare rolledbackandall locksobtainedbythe transactionare released.The
transactionisthenrescheduledforexecution.
Deadlockdetection:The DBMSperiodicallyteststhe database fordeadlocks.if adeadlockis
foundone of the transactionsisaborted(rolledbackandrestarted) andthe other
transactionare continuing.
Deadlockavoidance:The transactionmustobtainall of the locksitneedsbefore itcanbe
executed.Thistechniqueavoidsthe rollbackof conflictingtransactionsbyrequiringthat
locksbe obtainedinsuccession
Part B: Businessrulesand ERD
Question1: Draw the followingDoctorandAppointmentERDusingLucidchart/Visio/draw.io
Ans.
Question2:Identifythe type of relationshipbetweenthe twoentitiesasshownbelow:
Ans.Type of relationship:One toManyRelationship
2. Question3:Write the businessrule(s)thatgovernthe relationshipbetweenAGENTandCUSTOMER.
Ans.Each customerhas one and only one agent,buteach agentcouldhave manycustomers.
Question4:Write the businessrule(s)thatgovernthe relationshipbetweenCOURSEandCLASS.
Ans. Each class couldhave one and onlyone course,buteachcourse couldhave beentaughtin
manyclasses.
Question5:Suppose youhave the ERD shownas in figure below.How wouldyouconvertthismodel
intoan ERM that displaysonly1:Mrelationships?(Make sure youcreate the revisedERD.)
Ans. 1:M relationships
Duringsome time interval,aDRIVER can drive manyTRUCKs and a TRUCK cab be drivenbyone
DRIVER.