0 ratings 0% found this document useful (0 votes) 9 views 27 pages Adobe Scan 27-May-2025
The document discusses various SQL data types such as DATE, DATETIME, and TIMESTAMP, along with practical examples of querying and updating employee data in a database. It also covers the use of semaphores for process synchronization and the management of buffers in concurrent programming. Additionally, the document touches on file management techniques and directory structures in programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Go to previous items Go to next items
Save Adobe Scan 27-May-2025 For Later gen WIth Does th mysge
WYSGL rdotes ane handled using the DATE , DATETIME
ag TIMESTAMP dota Lycos ance o 4
ing the curtent Peto and t3me
Dott only +
se ect corrENT DATE CD;
&:
2 CORPENT DATE
Dae R TIME +
Dekes 40 a NYSBL- table
woovking with tables, you often. sieve and rartpul
wing DATE, DATETIME , ov TIMESTAMP columns .
GB2 Some practical BOE :gese empbyees \5
_gneoengy pokes Meo ‘the Table
seer TNTO Employers Cname, decke- of-gorntng)
yawes Co Tohn Dre’ > S2026-03-18)5
‘ * ;
es from employcess 5
ls, Retvfeving pakes foom the Table
gorneng Few) emt loyeest
| select name, doke &
Pes _|
; Formaccing, Dates IN Quettes *
_ FLEct name, DATE FORMAT (hate of fort ng”
tole cof Merle Y YAS Ass matted
F RoW employeess 5J, etter Data wstng Dates
| rd employees who qrined often a cpectfte date:
cect * ¢e0M anployses where Jote _& Jarrarg -orsersh
ode of ining
9096-03-15
pind employees who yoned &n wach 9096:
eELECT FEROM employees 4 wiEPE mount Cd
foining) =3 Avo
NEAR Cante-of gorrting) = 2096;
ep es |
ate OP
6 Updaking a Data WW a Toble
vepare employees
SET dose —ot fo!
were
Li goles + 4P™ employeS1;J: _—
ate
3 1 _|_aahm me] 9696-040)
nq eov0S goed on 0 pode
ne reom employerss where dete. of nn
LZ \9654- vet's
+ gelock * fom employees 4Page Nos YO
k C scedué :
jae 0 Collechn ef
: ) precompiled Sgro
i Sat Matenente
er P * — TA ww Stubradtne ov @ Sub pages
qegles Computing Language. a procedure ‘
a rame , pawameder sts ed ca rains
7 , . ANd SAE ctatemen th We
oe ee by wetng Latggeas othe
< an re ® such as Tava, pytior PHP eM
os Rs qrettodued & MYSGL yerston 5.
ye procedure proceduac name [eewi vor} vor
parmetet-
datatype L parareted datatypePage No.: (
4:
HO tld
“el . toae \ scove!
a). 2? so]
ya! a}!
3 set (o-00 Sec)
Baws 8?
c ]
% 3 )
: wow on set (CE)
am ot , 0 wows affeted Coo Sec)
wentt i045
age | score |nase 30 database %S construct whch otloo you-to
ye (rooverso) the records of table. Tn Mysg t yal
we curses with ing staed program such a9
ceduves function etc.
sollable + using these CUBS os$ you can vebyone
from a table in oe drectin top ‘to bottom.
Os These canes ave inlensitive to the
thet awe made mm the -table.
g Whe -cwesss using Declare ctaternent
“durtstials values (2, Yrdactal, "Bam’, bol9=03-01")5
_tutodols values (3, ‘cantandea’, ‘peuthvt?,
F vawchaws (Yo),D tine
°9
nee
Ate
OMaktds Avhirs Aytged Dake.
Vaarkan 3S),
PKA S,
tow $24 hong zt;
OE tween toe ytees 2 Bian te
GE Varden to, nigh,
Ws ace é e
OF WOME Chutent=n tutend Tie,
i. “i
' ie tution , txtrtas Oct4);(AFFILIATED TO JNT UNIVERSITY, TS,
_ VINAY NAGAR COLONY, SAIDABAD, HYDERABAD - 59.pay coren (Feo FILE 0
yO_RDONLY):
: goad (Pd +, bullion, Stee oe ants
: ntt (has been Sent b Ss
atte (th butter, Street Clulseay e
close (fds Ee
pertwan 05
+
. qesntl !
os pf 700d -c_o ffo-sead
e./ tty ead
petreR DATA tos been Se at by wetter
.
Feared
*
ae ata wrdtec—0 Sfo_wottesgregeam do athuteate rp
ce code :
tenelude actdio As
a include Cuntstd hy
at snelude Csys/ypenh »
# Snclude ¢ sys /ucattn s
at srelude.
Int main’)
es (tec mechartsws)
bat Fd{2J childs,
chaz atj=‘grecws
Pipe Gd);
chatd
ay include ¢ f ent pe
gy anclude estving b>
aanelude ¢untekdh>
ay dettne FIFO-FILE “My FIFO
gd maine?
Anu Ad.
char butters (od;
444 e092 (Fito Atle ,o-rdonly
mod Cede, butler ste of Chuttens);
printf (Hhas been sent by uortlen)
wrt le (1, bulter , size Chutter),
close (eds), :
welusn 05
FIFO wotant A45
char bultes BI "WRITER pag as;
Seto CHEO-FILE 5 066 6°);
geope” (FIO -FILE , 0 Lweow ay);
rite Gd , butter size Qutfesd),
WRITER DATA bos been sent by waiter
+ pouyorn evecnked Successtally for fifo.4 agroclude egy [shmsh>
ganclude eskving -h>
P ant main) $
yey yet tok (Sshmagle"s 60);
ante sh eShnge® (tery, to 24,0666 rpc -cREATE):
chan ® S46 = Coham )shamoct Comte Carer d¥) 0 0°,
chaeey (stv Mello from watkes ih,
prnbt Cake werttes 40 shased mmprnoed + Ant) 49;
shmat C&O),
weUIN 05
qrelude esys-(tpe-h>
anclude
¢ yt key < 4 ¥9
4 shmid eshmget (1 UY
sks 2 Chea© ste & POYTM ty Amplement menage Gueue
= code’
ages
aricdude zskdto.h>
a ig. grctude 2845 [Rpc-b>
| geandtude S45 (meq.n>
| apgnelude 2 Satrg.b>
— gtmck meg —bubterf
ong meg types
chow mq -Aex tLe],
: a WAN {
| Fey + Fey,
ink wsqgads
Neus tok (sprog ttle”, 6f);
msgid ewaggek (roy, voce fipe CREAT);
— Seruck meg —butles message;
MeSAge meg - typens |;
Mo thas a¢ of bab,
magend (ragtd & meade , Size of (message . mgr),% A>
Aho 29y3 [msg
.. was qvutten {
tng "9 Anre’
: ta 84 tert Ceo];
Ee
B : morn CD Y
| yoy -4 Fey 5
| tnt msaid 5
} toys # tok Comgitle’, co,
/ msgtd eentgget (rey 066 6 /ipe _coran)s
| glauck mg— buses Message 5
msg sc (meg td a messege etze of (message meg sex}
D Me
grant Cressage secerye d reg \n¥ ae ee
oe ee
msq ctl Cmsgid, tee, On ip woud,
eetusn 05
$
ur put: gee read ¢
ale Qeoud
rraseene, 2d zhello this o¢ bb.
messagePage No,:
consumes proble
ce Problem UWsFng. semaphares
>
~
a
duces ConSure® Problem 49 g anaitc
«e ok process SYnchroorizcel’ an ,
] pookees ewcotes data and puts Ht into a buffer.
cartes 4ares dota from the bret Por and
| used ak
qo averd gecblemt ke data (ose 1 ovenwrt ting
joc crashes We WE Kemmaphsses to antinl access
to ghomad buctfers -
‘pote
“Tip paducers choul) not add after data +f the
butter 46 full.
I The consumes chould aot wemsve date. “+ the
builes “empty.
hoses used:
muder @rrtial vilue=().
“Allows ony one parcess 40 access the
o& a ire+
phy Gretta value sbubfen
* Conunts a
Gre-b8ad
Counts‘ gemaplores work
He i Ceerraphore"):
po pecacases the value .
R signe! (semaphove’):
+ TNCEANe the value.
Compty <=0)
| Locks buber ung mule ry
2 Adds dacta
|, Concunnds *
Po wntes wt buen 18 empty Cutt. =0)
FP WKS butter using mutex
| > Removes dota.
Advontoges of osing Smaphores .
avotds woltang in loops.
= prevents too pancosges m ascends roy but err
oF the same Ym
Ensures emookh and sade data shoring .4 yate ace genqaan +o Imp kment
tS wy Se nonin
“etude pte
ap anette 2ctdlth-h>
aparclude epbheeod .h>
at include 2 semoghove -h>
ge arclude.
a deine S22 5
gant ino , ourt=0 ;
sem-+ empky, Fall;
word wot
sem wert SO;
bed signal Gen a Ot
Sern —poss(s)i
a 4 teorsunet (hd * oc) t
woh lec) fa Fk CRAG 8: 0);
god muh e ent & Coamutey , uct);
en ie eet tnd —thrread , NULL } produces pid;
ae comme Cetons tread \WuLL onsumer , wut);
j_ Jin (etd —Ahrvend WULL)5
g — Jor nCeons trend NuLt);
gem —destmy Ce.empty),
gern dost 00 Ca Rl,
piiread ~ mudeX _dpstasy Co mugs
a 0}
phen
, J scrsfally uatng +0. program to stimulate 6
s i -techrigue the smgk.- Level Drrectsay
gant zat ov) nique .
_ Level pirectowy systeyn val frles ave contarnes
here are no subdryectortes,
and straight tos ward: This
ut can become
leading -to potenti
!
aa ginglt
sange drvectory -
2 Stauctnre carpe
as easy to arrpurtan implement b
at the no. of Mles TMCVEALCS ,
spice and dttculky tn fre management «
file nares should be wrique *
came. anfoomagtAe font =05
A Gentes name of dnectosy”),
~ geant C's", dv. drame) ;
while yz
gat ("Wn \n 5. creade rvle (4, 2. Delete fr lebs.stavch Frle?;
print? Cn 4 Display Frles Kk S.Exttln Enters yours choice
scant Cd”, ech)s
Sutteh (ch) ft
cose 4
paint Center the name of the 42's
want Cefest, dry. fname [dts- font'l)s
dis. fenttat 5
break;
cage 2° :
patel C*enter Se nome oe the filer;
scons Cts" );
fox (az 0392 die ent 3 etd) £
4f Cstocmp Ce, dts. Snot D== oF
pintt Celebs 1s doleted "> 5 :
excpy (dor Aramenys rds tnarrelery font);,
: Page No.:
; (oereent C4, di Arome (11)== 0) I
ae > 4 "
antl Cale Js ound" 4),
f ;
jaeok
‘
$ eee ata. 4nd)
v partt Crale $s Yt found", £'),
yneak 5
ease a
sf (av gent 229)
pur Cpreectory Empty);
else t
pintt (othe fies ane!)
Pox Geo, ie dis tent 584)
prnte Clb6s", des-dnome td;
y
boeak
def ante:
petwon 05Abe rane d the file: ¢
yan chris &
RS OWES A Bc
your chetce : 3
‘ = & the fer aecpc Hage Was 62,
& gengnann \o ctulade Abe Twa Level
aeathor Techntque ste ere ”
ma we level Ctirctony yetem each usen hat thets
pon Weer EI Dtowelooy COLD he tyctem matelatn’ 4
pases (HE Precteny (MEDD thal camlarng panbens te
uae ¢ ero:
anlages !
yes Cur have Flag Undh the fame rare Po
detteaend dhreclater
prandvantages |
sured cannot Sawe oft
(ec eosilyPage No.; 6?
£ (*\n 4. Seaach FPlel
| prt ¢ CHENG 6. Dts pay Hg. in Enea
grt Od /&ch)} gour cho’ ce");
mach (oh )t
ts
CoH aint ("Err rame of dectrys
sean Cts", doe ldentl + drone);
dentat 5
pintt (oprrectory crwated")}
breaks
coye Lt
Opt (Pier nome
scant Cabs" ds
for (4205 12 dent» tet)
44 (stwemp Gy
the draectooy
pint Center oe
scant Oho" nt i
diols Fenttt5
patrol CAE cronted)s
Treat
(4 == dent)anacae os % urd" £5;
yet cmp ts
f
Hak (pale “ro nob dound A);
pt? yop Si
'
: ed CORrveetse] fos nok found *, 4),
yop i
break}
defoutts
petum 05
a
yds 4 create nase] > C1 pik 3 pole fle
TLegeanch Pile S- Ofeplay C-ExtE
Enkes your ddice'
entes aane 4 drreectery> Die!
Drvectory crested