nyuuzyou/kompy huggingface dataset:
Compound nouns - Efl prepare Teacher's Book Grade 8

|
Efl prepare Teacher's Book Grade 8 Pdf ko'rish
|
bet | 77/255 | Sana | 14.06.2024 | Hajmi | 18,95 Mb. | | #263803 |
Bog'liq {teacherscom library} EFL Grade 8 TBCompound nouns
4
Write
cycle tour
on the board, say the word and elicit
which word we stress (
the first
). Then, ask them to listen
and underline the stressed word in all the compound
nouns in Exercise 2.
Then, ask ‘Which word do we usually stress in
compounds nouns?’ Finally, ask them to listen again and
repeat.
Answers
The answers are recorded for students to listen and underline,
then repeat.
cycle tour, police station, walking tour, town centre, bus
station, post office, petrol station, train station, sports centre
The stress usually falls on the first word.
LISTENING
1
Students listen to two people talking and they have to
match the times to the places. They may hear two or
more words from the list of answers for each question,
but only one will be correct. There will be three options
from the list A–H that are not answers to any of the
questions.
106
107
108
Ask the students to look at the places first and find them
on the map in Exercise 1 page 86 before they listen. Play
the recording once.
Answers
Students are given answers after Exercise 2.
2
Encourage the students to compare their answers, saying
why they think their answer is correct before they listen
again.
MIXED ABILITY
With a
mixed ability class, pair up a stronger student
with a weaker student for this stage and encourage the
stronger student to explain to their partner why they think
their answer is correct. Play the recording again.
Answers
1 Saturday morning F 2 Saturday afternoon A 3 Saturday
evening C 4 Sunday morning E 5 Sunday afternoon D
AUDIOSCRIPT TB PAGE 274
WRITING
PREPARE TO WRITE
|
| |
Jason:
I agree! So it’s your turn to choose an album. Which 
one do you want to play?
Mia

267
STUDENT’S BOOK AUDIOSCRIPTS
Conversation 4
Girl 1:
Where were you on Saturday?
Boy 1:
I was at my sister’s wedding.
Girl 1:
Oh, wonderful!
Boy 1
: Yes, it was a really lovely day. There was music and
dancing, and the food was really good.
Boy 2:
Where were you yesterday afternoon? You weren’t
in class.
Girl 2:
I was in a football match.
Boy 2:
Really? Was it good?
Girl 2:
No, it was terrible. Usually I love playing with my
team, but yesterday it was horrible! I hate losing!
Conversation 6
Boy 3:
Where were you last night? You weren’t at the
party.
Girl 3:
No, I was at home – I wasn’t very well. Was it fun?
Boy 3:
Yes, it was. It was great. Hope you can come next
time!
Unit 4, Student’s Book page 31
1
What was Bella happy with at the party?
Boy 1:
How was the party Bella?
Bella:
It was OK. The food was excellent, but the music
wasn’t great.
Boy 1:
Oh, what a shame!
Bella:
Yes. And there weren’t many people there.
Martha:
I hope so!
Interviewer

|
Martha:
I hope so!
Interviewer Pdf ko'rish
|
bet | 216/255 | Sana | 14.06.2024 | Hajmi | 18,95 Mb. | | #263803 |
Bog'liq {teacherscom library} EFL Grade 8 TBMartha:
I hope so!
Interviewer:
That’s all the time we have today. Many
thanks for joining us Martha and good luck to
you.
Martha:
Thank you.
Unit 3, Student’s Book page 25
Mia:
That was fantastic. I really loved it. It’s her new
album, right?
Jason
: Yes, it is. And I think it’s her best album. What other
types of music do you like?
Mia:
Well, I love listening to rap and jazz
.
We often listen
to jazz at home. My parents and my older brother
like it.
Jason:
Really?
Jazz is ok, but it’s not my favourite type
of music. I like rock and hip-hop best. I don’t like
listening to opera. But my parents love it! They
listen to it all the time.
Mia:
Well, I think a lot of older people like classical
music, but it’s not so popular with young people.
Jason:
Some like it. My sister plays the violin in an
orchestra and in a band. So she likes playing
classical music
and
rock.
Mia:
Oh, I’d love to see her play. Tell me when she’s got
her next concert.
Jason:
Ok. We can go together.
Mia:
Great!
Can
you
play the violin?
Jason:
No, I hate playing the violin. I tried but it’s so
difficult!
Mia:
So what’s your favourite instrument then?
Jason:
Well, I really love playing the electric guitar. It’s a
great instrument. I like playing the keyboard as
well. What about you?
Mia:
My favourite instrument is the saxophone … I love
playing the saxophone. I quite like playing the
piano, too.
Jason:
What about the drums?
Mia:
No way. I hate listening to the drums – they’re too
loud – and I certainly don’t want to learn to play
them!
|
| |
Efl prepare Teacher's Book Grade 8 - bet 80

|
Efl prepare Teacher's Book Grade 8 Pdf ko'rish
|
bet | 80/255 | Sana | 14.06.2024 | Hajmi | 18,95 Mb. | | #263803 |
Bog'liq {teacherscom library} EFL Grade 8 TB
2
Saturday afternoon
3
Saturday evening
4
Sunday morning
5
Sunday afternoon
A
Scottish Parliament
B
Old Town
C
Theatre
D
New Town
E
Museum
F
Edinburgh Castle
G
Cathedral
H
Holyroodhouse
2
In pairs, compare your answers. Listen again and
check.
LISTENING
108
108
WRITING
PREPARE TO WRITE
An article
GET READY
Look at the article about Edinburgh
again and find all the examples of
this
and
these
.
Then complete the paragraph about London with
this
or
these
.
London is the capital city of England, and has
lots of interesting buildings you can visit. One of
1
is Buckingham Palace, the Queen’s
London home. From here you can walk to St
James’s Park.
2
is a lovely place to
stop for a rest and a picnic. Many people like to
see shows when they are in London. You can
get tickets for
3
online or in Leicester
Square. And don’t forget about Harrods!
4
shop is famous around the world.
PLAN
Make a list of interesting and famous places
in a city you know well. Choose three, and make
notes about them. You could include information
such as:
• where they are
• what you can do there
• why they are interesting.
WRITE
Write 50–60 words about your city. Use
this
/
these
in your paragraph.
IMPROVE
In pairs, read your own text and your
|
| |
“MP 1804” o’quv stendi asosida seksiyali MP komplektlarini tadqiq

“MP 1804” o’quv stendi asosida seksiyali MP komplektlarini tadqiq
etish
(1 soat)
MP seksiyasining ichki tuzilishi va ishlash prinsipi bilan 1-
rasmda
keltirilgan 1804 seriyadagi seksiyali mikroprotsessor komplektiga mansub 1804
BC1 - 4 razryadli markaziy protsessor elementi yordamida tanishamiz.
1 - rasm. K1804BC1
– 4 razryadli MP seksiyasining ichki strukturasi.
Bu yerda: UFRB- umumiy
foydalanish registorlari bloki,
A va B adreslar
uchun kirish signallari. RA, RB- operandlar registorlari; DI- bevosita ma`lumotlar
kirishi; 0000- 4 razryadli
«0» soni; SS1 va SS2- chapga(boshqarish signallari L1,
L2) va
ơngga(boshqarish signallari R1, R2) surish uchun xizmat qiladigan (mos
ravishda 1 va 2 razryadga surish) sxemalari; RQ- natija registri; MP- mul`tipleksor;
C0, C1-
ơtish razryadining kirish va chikishi; P, V- tez uzatish sxemasi(TUS) bilan
bog’lanish signallari; Z- natija nolga teng yoki teng emasligini kơrsatuvchi chiqish;
ChM- chikish mul`tipleksori - natijani ma`lumotlar buferiga uzatadi; U1 va U2- MP
va ChM mul`tipleksorlarini
boshqarish signallari;
KD- komanda deshifratori -
komanda kodi asosida MP seksiyasini ishlashini boshqaruvchi signallarni uzatadi;
SS1
UFRB
RA RB
МР
ALU
SS2
RQ
Ch
М
КD
R
1
L
1
L
2
R
2
А
В
U
2
ДO
ДI
Komanda
kodi
U
1
С
1
С
0
Z
P
V
0000
ma`lumotlar kirishi DI va ma`lumotlar chikishi D0 mikroprotsessorli sistemaning
ma`lumotlar shinasiga shina formirovateli yordamida ulanadi.
Seksiyali MP kompleklari asosida loyixalanadigan
mikroprotsessor bloki
boshqarish qismining struktura sxemasi 2- rasmda keltirilgan:
2 - rasm. Seksiyali MP komplektlari asosida qurilgan mikroprotsessor bloki
boshqarish qismining struktura sxemasi.
BMU- mikroprogrammali boshqarish bloki; AR- adres registori; MPX-
mikroprogrammalar xotirasi bloki; MKR- mikrokomanda registri.
Mikroprogramma xotirasi yacheykasining va mikrokomanda registrining
formati quyidagi bir qator k
ơrsatkichlar bilan aniqlanadi.
3- rasm. Mikrokomanda formati.
Sharxlash maydoni - Kompyuterlashgan loyihalash tizimlari fakulteti

Bu yerda V=11, K=8.
DS psevdobuyru
g’i uchun
M2: DB 0 F1H;
DBK+ 1 0, 1 FN-
ZF2, ‘A’.
Makrobuyruqlar. Makrobuyruqlar,
assembler
tilidagi
shunday
operatorki,
ular
translyatsiya davomida tilni boshqa operatorlar ketma-ketligi bilan almashtiradi. Bunday ketma-
ketlikni mak-robuyruqni makrokengaytirish deyiladi. Bundan tashqari har bir makrobuyruqqa
makroaniqlash to’g’ri keladi. Makroaniqlash makrobuyruq yoki makroaniqlash bibliotekasi
joylashgan
programma modulida
bo’lishi mumkin.
Sharxlash.
Berilgan (boshlang’ich) programmaning tekstiga tushuntirish berish uchun
kerak. Sharxlash operatori ayrim ajratilgan ishora bilan boshlanadi. Masalan, «.» yoki «.» belgiliri
orqali. Bu belgilardan keyin erkin tekst kelishi mumkin.
Kompyuterlashgan loyihalash tizimlari fakulteti - bet 90

Xar bir mikrokomanda: BMU uchun novbatdagi komandaga
ơtish usulini
(shartli,
shartsiz, oddiy ketma-ketlik) xamda
ơtish
adresini, operasion qisimga
uzatiluvchi mikrokomanda
bơlagini (bajarilishi zarur bơlgan operatsiya kodi);
operatsiyada ishtirok etuvchi umumiy foydalanish registri(UFR)ning adresini;
chapga yoki
ơnga surishni
boshqarish signallarini; operatsiyada ishtirok etuvchi
bevosita ma`lumot kodini;
qisman yoki
tơliqligicha adreslar shinasini;
xotira va
interfeyslarga ma`lumotlarni yozish va
ơqish jarayonlarini boshqarish signallariga
ega
bơladi.
Nazorat savollari
1.
Mikroprotsessorlarni buyruqlar sistemasini qanday guruhlarga bo’lsa bo’ladi?
2. Arifmetik buyruqlar guruhiga kiruvchi buyruqlarni keltiring.
3. Logik buyruqlar guruhiga kiruvchi buyruqlarni keltiring.
4.
Yuklash (o’tkazish) buyruqlar guruhiga kiruvchi buyruqlarni keltiring.
5. Boshqarish, maxsus buyruqlar guruhiga kiruvchi buyruqlarni keltiring.
6. Stekli buyruqlar guruhiga kiruvchi buyruqlarni keltiring.
7. Shartli
va shartsiz o’tkazish buyruqlar guruhiga kiruvchi buyruqlarni keltiring.
8. Assembler tilida programmani tuzush nimani yozishdan boshlanadi?
9.
Mikroprotsessorlarda buyruqlarni tashkil etish uchun qanday til, so’z bo’lagi
ishlatiladi?
Ikkinchi turdagi buyruqlar

Klaviatura monitori operator bilan birgalikda ishlash vazifasini bajaradi, buning eng asosiysi
yuqorida qaralgan (aytib o’tilgan) klavishalarning buyruqlarini interpritasiyalashdir. Faylni
boshqarish sistemali monitorning muhim qismini tashkil etadi. Fayl ma’lum (belgilangan)
vazifasiga ega bo’lgan va qator ob’ektlarni bashorat qiluvchi bir jinsli ma’lumotlarning fizik
ko’rinishidir.
Qo’shish va ko’paytirish programmalarini tuzishga misollar

Qo’shish funksiyasini hisoblash kabi arifmetik
amalni bajarishda quyida
keltirilgan qism programmasidan foydalanish mumkin [3,8].
Beshta sonni qo’shish programmasi.
3-jadval
Mashina
kodi
Belgi
Mnemokod
21 000V
MAIN LXI H,
0B00
06 05
MYI B, 05
CD 0908
CALL
ADDB
CF
RST 1
AF
ADDB XRA A
4F
MOS C, A
86
CNT
ADD M
D2 1008
JNC TRM
OC
INR C
23
TRM
INX H
05
DCR B
D2 0B08
JNC CNT
C9
RET
Izoh, programmaga sharh
4 -jadval
LXI
H,
0B00
H, L regist
riga qo’shiluvchining
birinchi
qiymatini adresini yozish.
MYI B,05
V registrini sonlar miqdori bilan to’ldirish.
CALL
ADDB
Qo’shish qism programasini chaqirish
RST 1
Programmani
bajarishni
vaqtincha
to’xtatish.
XRA A
Akkumlyatorning tozalash.
MOV C,A
Ma’lumotlarni A dan S ga uzatish
ADD M
Akkumlyatorning
qiymatiga massivdagi
qo’shiluvchilarning sonini qo’shish.
JNC TRM
Ko’chirish yo’q bo’lsa, u holda ko’rsatilgan
adresga borish.
INR C
S registrining qiymatii 1 ga
oshirish
INX
Qo’shiluvchining
keyingi
adresini
ko’rsatish.
DCR B
Qo’shiluvchi o’lchagichning
qiymatini
kamaytirish.
JNC CNT
Agar hamma qiymatlar bo’lmasa,
u holda
ko’rsatilgan adresga o’tilsin.
RET
Qism programmadan qaytish.
Ko’paytirish funksiyasini hisoblash kabi arifmetik amalni bajarishda quyida
keltirilgan qism programmasidan foydalanish mumkin.
Ikki sonni ko’paytirish qism programmasi.
5-jadval.
Mashina kodi
Belgi
Mnemokod
AF
SBN
XRA A
IA
CNT
LDAX D
9E
SBB M
77
MOV M,A
23
INX H
13
INX D
0D
DCR C
C2 0109
JNZ CNT
D0
RNC
CD 1200
CALL BEEP
CF
RST 1
Assemblerni boshqaradigan buyruqlar quyidagi ishlarni bajarishi mumkin

4.7-ras
m. Redaktorlashda programma ta’minotini sozlash sistemasining rezidentli sxemasining
konfiguratsiyasi.
Redaktorlaydigan programmalar programmaga o’zgartirish kiritishlari
kabi imkoniyatlari
bilan farq qiladilar. Masalan, ayrim redaktorlovchi programmalar programmani faqatgina butun
qatorlari
bilan ishlashi mumkin, shu paytda boshqalari esa programmada
xohlagan ketma-ket
belgilarni qo’shishi,
olib tashlashi, almashtirishi mumkin.
Modellashtiradigan programmalar

Kross assemblerlar bu kross EHM uchun mo’ljallangan (asosiy)
mikroEHM ni programma
bilan ta’minlash maqsadida ob’ektning programmalarini yaratadi.
Sozlovchi
programmalar.
Sozlovchi programmalar mikroEHM da ob’ektning
programmasini sozlashni yengillashtiradigan rezidentli programmalardir. Ular foydalanuvchidan
quyidagi vazifalarni bajarish uchun buyruqlar qabul qiladilar:
– doimiy xotiradagi yoki mikroEHM ning erkin o’zgaruvchan xotirasidagi qiymatlarni
hamda markaziy protsessorni registrlarining qiymatlarini displeyga (pechatga)
chiqarish uchun;
– o’zgaruvchan xotira qurilmasini o’zgartirish uchun:
– programmani ko’rsatilgan (belgilangan) adresdan bajarish uchun:
– qo’yilgan shart bajarilganda yoki programmani bajarilishi ma’lum xotira qurilmasidagi
buyruqqa yetganda programmani bajarilishini to’xtatish uchun.
Sozlovchi programma yordamida programmani bajarilishini uning ishlashga ta’sir etmasdan
(aralashmasdan) haqiqiy vaqt oralig’ida kuzatish mumkin. Foydalanuvchining programmasini
bajarilishi tugayotganda (vaqtincha to’xtatilayotganda) bu modulning
qiymati programmalash
vositalari orqali tiklanishi va programmani logik bloki yoki operator orqali o’zgaruvchan qiymat
bilan solishtirilishi mumkin. Vaqtincha to’xtatuvchi registrga murojaat qilish,
u bilan ishlash,
kiritish-chiqarish qurilmalari bilan birga ishlas
h, ularga murojaat qilishga o’xshashdir. Vaqtincha
to’xtatuvchi registr, MP ni boshqarish shinalari holatini nazorat qilishga imkon beradi.
Assembler va kompilyatorlar

4.8-rasm. Programmani translyatsiyalovchi sistemaning sxemasini konfiguryatsiyasi.
MRL
– kompilyator
boshlang’ich
programmani
assembler
tiliga
o’tkazadi.
R1UM
– kompilyator esa birdaniga mashina darajasidagi ob’ektning modulini beradi.
Yuklovchilar
– bular shunday programmalarki, ular ob’ektning programmalarini,
ma’lumotlarini tashqi tashuvchilardan (saqlovchilardan) magnit diski, magnit lentasi aloqa
yo’lidan mikroEHM ni hohlagan xotirasiga olib kiradilar.
Yuklovchi, ob’ektni programmasini, boshqaruchi ma’lumot asosida o’zgartirishi mumkin.
Yuklovchi, boshqaruvchi ma’lumotni, bevosita programmistdan yoki tillarni translyatsiya
qiluvchidan (assembler yoki kompilyator) olishi mumkin.
Masalan, programma EHM ni xotirasida nolinchi adresdan boshlab joylashtirilishi mumkin.
Mabodo, ob’ektning programmasi suriladigan bo’lsa, programmist yuklovchiga programmaning
yangi adresini ko’rsatishi mumkin. Shundan keyin yuklovchi kerakli tarzda ob’ektning
programmasini hamma adresini o’zgartiradi.
IMR
– 16 mikroEHM ning yuklovichisi programma va ularni sigmentlari joylashgan
xotiraning kartasini berish kabi qo’shimcha vazifani bajaradi.
Rezident tilidagi yuklovchilar, odatda
programmalashtiriladigan DXQ larida va sh.o’xsh.
tayyorlanadi.
Kompyuterlashgan loyihalash tizimlari fakulteti - bet 78

.
.
.
8
МSh
ДП
3
ДП
2
ДП
1
BSh
АSh
Т
OUT
0
OUT
1
OUT
2
U
cc
GND
Д0
.
.
.
Д7
А0
А1
CS
RD
WR
С
0
У
0
С
1
У
1
С
2
У
2
DUK
INT
IR0
IR1
IR2
IR3
IR4
IR5
IR6
IR7
U
cc
GND
Д0
.
.
.
Д7
А0
CS
RD
WR
INTA
CASO
CAS1
CAS2
MS
Zamonaviy mikrokontrollerlar asosidagi bitta va ko‘p ob’ektlarning
parametrlarini nazorat qiluvchi va boshqaruvchi tizimlarini ishlash
algoritmlari va dasturiy ta’minotlarini tuzish prinsiplarini o‘rganish. (1
soat)
Kontrollerlarni, mikrokontrollerlarni programmalashtirish tillari
Programma bilan ta’minlash (PBT) deganda – bu mikrokontrollerlarda (MK),
kontrollerlarda masalalarni yechishni, programmalarni sozlashni, MK boshqarish
sistemasini ishlashini ta’minlashga, tekshirishga, ko’rsatmalar, imkon beruvchi
programmalar yig’indisi tushuniladi .
Apparatli va mikroprogrammali vositalar orqali MK, kontrollerlarga ichki til
hamda foydalanuvchiga tavsiya etiladigan tashqi programmalar joriy qilinadi.
MK kirish tili bo’lib, PZU, PPZU, REPZU, EPROM, EEPROM, ... direktivalar
yig’indisi va programma tili xizmat qiladi.
MK asosan lokal sistemalarni, ya’ni kichikroq ob’ektlarni ishlashini nazorat
qi
lish va boshqarish uchun mo’ljallanganligi uchun ularni ichki xotira sxemalariga
ob’ektni ishlashini nazorat qiladigan va boshqaradigan direktiv buyruqlarini
bajaruvchi qism programmalari, konstantalar, boshqarish va hisoblash qism
programmalari yozilgan b
o’ladi. Bulardan tashqari MK ning xotirasiga MK ning
o’zini ishlashini tekshiruvchi testli programmalar o’rnatilgan bo’ladi.
MK ning xotira qurilmasiga yozilgan programma apparat, foydalanuvchi va
datchiklar oralig’ida xuddi interfeys kabi vazifani bajaradi.
MK larni ishlatish uchun quyidagi programmalash tillaridan foydalanish
mumkin: mashina tili, Assembler tili, yuqori darajadagi til, Step-5 va Step-7
programmalash tillari.
Kontrollerlarni programma ta’minoti, protsessorni tarkibida kiritilgan rezident
p
rogrammani o’z ichiga oladi. Rossiyadan chiqarilayotgan KR-300M; KR-300; KR-
300I turidagi kontrollerlarni modulini tarkibiga 3 ta kanalli tashqi to’rni (setni)
programma ta’minoti o’rnatilgan (MODBUS, ADAP-400, BUSO-1, 1-7000 va
boshqalar). Bu yerda bittasi kontrollerlarni zahirali (rezervli) kanali va bitta
qo’shimcha shlyuzli kanal ishlatiladi. Magnitli yoki CD-ROM tashuvchilarida
Leona kontrollerlarini programmalash sistemalari taklif qilinadi. Leona (Windows-
95/98/2000/2004), Istok (Dos) OPC Data Access Automation Specification 2.0
standartidagi SCADA sistemasidagi OPC aloqa serveri va shunga o’xshagan tillar.
|
Nazorat savollari - Kompyuterlashgan loyihalash tizimlari fakulteti

|
Kompyuterlashgan loyihalash tizimlari fakultetiBog'liq AMV majmuaNazorat savollari
1.
Programma bilan ta’minlash deganda nimani tushunasiz?
2. Programmalarning turlarini ayting.
3. Foydalanuvchini programmasiga tushuncha bering.
4. Sistemali programmaga tushuncha bering.
5. Maxsus programmaga tushuncha bering.
6. Rezidentli va krossli programmalarga tushuncha bering.
7.
Universal EHM da kirish tili bo’lib nimalar xizmat qiladi?
8.
Tizimli dasturiy ta’minotni tarkibini keltiring.
9. Operas
ion tizimni tarkibiga kiruvchi programma ta’minotlarini keltiring.
10. Servisli tizimlarni tarkibiga kiruvchi tizimlarga tushuncha bering.
11. Instrumental dasturli vositalarga tushuncha bering.
12.
Texnik xizmat ko’rsatish tizimlariga tushuncha bering.
13.
Amaliy dasturiy ta’minotni turlari va vazifalarini keltiring.
14. UNIX operasion tizimi qaerda, nimaga ishlatiladi?
15. Windows-NT operasion tizimini vazifasi nima?
16. Servis tizimlariga tushuncha bering.
17. Mikroprotsessorlarni programmalash tillarini keltiring.
18. Mashina tilida programma yozishga tushuncha bering va misol keltiring.
19. Assembler tilida programma yozishga tushuncha bering va misol keltiring.
20. Yuqori darajali tilda programma yozishga tushuncha bering va misol keltiring.
21. Assembler tilida programma nima asosida yozilishini tushuntiring.
22. Mashina kodi tili nima?
23. Mashina tilida programma nima asosida yozilishini tushuntiring.
24.
Mikroprotsessorlarni buyruqlar sistemasini qanday guruhlarga bo’lsa bo’ladi?
25. Arifmetik buyruqlar guruhiga kiruvchi buyruqlarni keltiring.
|
| |
Select name as Name_ talaba, 2* stipend AS yangi St

59
ma‟lumotni chiqarish uchun quyidagi so`rov yoziladi.
Select distinct student_ID From exam_marks A where Exits (select
* from EXAM-MARKS B) where mark<3 and B Student_ID= A
student_ID;
Ma`lumotlar bazasi jadvallardan tashkil topadi. Jadvallar alohida fayl
ko„rinishida yoki birorta faylni bo„lagi bo„lishi mumkin.
Ma‟lumki
Select operatori yordamida
virtual jadvallar yaratish,
Ya‟ni vaqtinchalik jadvallar yaratish mumkin. Bunday jadvallar
vaqtinchalik bo„lib, yaratgan foydalanuvchi o„zi
undan foydalanishi
mumkin.
Tasavurlar ham vaqtinchalik jadvallar bo„lib, ular ko`p
foydalanuvchilar murojat qilishi mumkin va u ma‟lumot bazasidan
majburan olib tashlanguncha mavjud bo„ladi.
Tasavurlar MB oddiy jadvallariga o„xshash bo„lib, ma‟lumotlar
saqlovchi fizik ob‟ekt hisoblanmaydi. Tasavurlarda ma‟lumotlar
jadvallardan tanlab olinadi. Tasavurlar foydalanuvchilardan jadvallarni
ba‟zi ustunlarini yashirish uchun yoki ko„pincha
foydalanuvchiga
kerakli bo„lgan bir nechta jadvaldan bitta yaratish kerak bo„ladi. Misol
sifatida 3 ta jadvaldan tashkil topgan oddiy ma‟lumot
bazasini qarab
chiqildi.
Tovarlar ( ID -tovar , nomi, narxi, tavsifi)
Mijozlar(ID - mijoz, ismi, manzili, telefon)
Sotish(ID- tovar,soni, mijoz)
Tashkil qilish nuqtai nazaridan bu ma‟lumot bazasi yomon
loyihalanmagan. Lekin ba‟zi masalarni
yechishda foydalanuvchini
mijoz va tovar identifikatorlari qiziqtirmaydi. Aniqroq aytganada unga
bitta jadval kerak bo„ladi. Masalan bu jadval “sotish_taxlili (tovar,
soni,bag„osi, narxi, mijoz)”. Bu jadvalni
berilgan uchta jadvaldan
quyidagi so„rov yordamida hosil qilish mumkin.
3>
SELECT Customers.*, Salepeople.* FROM Salepeople

61
Masalan: beritlgan shaxardagi sotuvchilar
va buyurtmachilar
ixtiyoriy kombinatsiyasini ko„rish uchun quyidagini kiritish lozim:
SELECT
Customers.CName,
Salepeople.SName,
Salepeople.City
FROM
Salepeople,
Customers
WHERE
Salepeople.City = Customers.City;
Jamlashda SQL bir necha jadval satrlari kombinatsiyasini
predikatlar bщyicha solishtirishdir. Asosoan ma‟lumotlar
ilovali
yaxlitlik asosida tekshirilib, ajratib olinadi.
Misol: xar bir sotuvchiga mos keluvchi buyurtmachilar ro„yxati:
SELECT
Customers.CName,
Salepeople.SName
FROM
Customers,
Salepeople
WHERE
Salepeople.SNum=Customers.SNum;
Tenglikka asoslangan predikatlardan foydalanuvchi jamlanmalar,
tenglik bo„yicha
jamlanma deb atalib, jamlanmalarning eng umuiy
ko„rinishidir. Shu Bilan birga ixtiyoriy
relyasion operatordan
foydalanish mumkin.
Ichki va tashqi jamlashlar
Jamlashlar bir jadval satriga ikkinchi jadval satrlarini mos
qo„yishga imkon beradi. Jamlashlar asosiy turi bu ichki jamlashdir.
Jadvallarni ichki jamlash ikki jadval usutunlarini
tenglashtirishga
asoslangandir:
SELECT book, title, author, name FROM author, book
WHERE book, author = author, id
MySQL jamlashning kuchliroq tipi Ya‟ni chap tashqi jamlash(yoki
tashqi jamlash) dan foydalanishga imkon beradi. Jamlash bu turitning
ichki jamlashdan farqi shundaki natijaga o„ng jadvalda mos ustunga ega
bo„lmagan chap jadval ustunlari qo„shiladi.
Agar avtorlar va kitoblar
misoliga e‟tibor bersangiz atijaga ma‟lumotlar bazasida kitoblarga ega
bo„lmagan kitoblar kirmagan edi.
Ko„p xollarda o„ng jadvalda mosi bo„lmagan
chap jadvaldagi
satrlarni chiqarish kerak bo„ladi. Buni tashqi jamlash yordamida amalga
oshirish mumkin:
DTD Basics—The How Tos - Microsoft Word Applied xml a toolkit for Programmers Wiley doc

- 66 -
Now we’re ready to take a closer look at what XML DTDs are made of and how to make
your own custom DTD.
A DTD can consist of the following parts:
•
Element type declarations
•
Attribute list declarations
•
Entity declarations
•
Notations declarations
Let’s take a more detailed look at each of these declarations and their subsections, which
we’ve illustrated with many examples for your convenience. If some sound silly, bear with
us.
What Is an Object Model? - Microsoft Word Applied xml a toolkit for Programmers Wiley doc

What Is an Object Model? An object model represents a document by providing a set of interfaces (methods and
properties) to the programmer. This set of interfaces completely shields a programmer
from the actual syntax of the data behind this interface. The data behind the interface can
be an XML document, legacy database, or an application that provides an XML stream.
In the case of an XML document, a parser is used to check a document’s validity, to build
an in-memory representation of the document, and to expose the object model to the
programmer. For a legacy database, an object that can read the database in its native
form sits on top of the database, allowing programmers to use the DOM to access the
original data. This method allows an existing database to provide on-the-fly conversion to
XML.
An analogy of the object model in the car industry is how every car is used in a similar
fashion. Each car has a steering wheel, gas pedal, and brake pedal. The number of
cylinders, the number valves, and the horsepower rating of the engine don’t matter to the
interface; the way a driver uses a car remains the same. All compliant XML DOM
implementations expose the same set of classes to the programmer, regardless of the
internals. Of course, some cars have air bags, CD players, and other features. In the
XML world, as we see later on, some parsers have included additional functionality that
you can’t guarantee in every parser.
A standard object model is necessary to alleviate the many problems that occurred when
Netscape and Microsoft provided different implementations of the HTML object model
known as Dynamic HTML (DHTML). Web sites that make heavy usage of DHTML through
scripting engines often need to have multiple versions of the Web site—one for Navigator
and one for Internet Explorer. Also, a standard object model allows developers to write
programs that use XML without committing themselves to one company’s parser.
- 101 -
Types of DOM The DOM also addresses the need for an Object Model in HTML as well as in XML. A
well formed HTML document is also an XML document. This relationship is shown in the
DOM, where the XML DOM is referred to as the Core DOM, and the HTML DOM is an
extension to the Core specification.
a social activity with lots of people
4

|
a social activity with lots of people
4 Pdf ko'rish
|
bet | 86/255 | Sana | 14.06.2024 | Hajmi | 18,95 Mb. | | #263803 |
Bog'liq {teacherscom library} EFL Grade 8 TB
a social activity with lots of people
4
a type of instrument, like the bagpipes, flute or clarinet
5
trying to win something or get points for something
TALKING POINTS
Would you like to visit Scotland? Why? / Why not?
6
Listen to Emma talking to her friend about the summer
holidays. What does she decide to do with her family?
a
visit a castle
b
watch the Highland Games
110
7
Listen to the conversation again. Are the
sentences are right (
✓
) or wrong (
✗
)?
1
Emma and her family have plans to go
to Scotland and Ireland.
2
Emma needs to choose two activities.
3
Emma really likes geography.
4
You can see 14 castles on the tour.
5
The castle tour leaves the hotel before
eight in the morning.
6
They can watch and listen to music
and dance in the afternoon at the
Highland Games.
7
Emma needs to bring her friend fudge.
8
Listen again and complete the table.
Things to do or see
Castle Tour
Highland Games
9
Which of the two tours would you like to
do? Why?
110
110
10
NOW WATCH THE CULTURE VIDEO
89
SCOTLAND
176 UNIT 15
AND
Geographical features
1
Match photos A–H to the words in the box.
Use each word once only.
cliff field island lake mountain
river snow water
|
| |
Scenario: Specifying an Element to Contain Subelements: Exactly

- 72 -
The parser would interpret this declaration as follows: Elements of type
name
must
consist of exactly two subelements called
first_name
and
last_name
in that order
and nothing else
.
first_name
elements can contain character data.
last_name
elements can contain character data.
As expected, a legal XML expression of the
name
type of elements would look like this:
Faraz
Hoodbhoy
Although the actual content of the names can differ (that is, Faraz and Hoodbhoy),
nothing else could be changed with this declaration. For example,
Hoodbhoy
Faraz
would not work because the order is not as declared.
Also,
Faraz Hoodbhoy
would not work because the element type name was declared to explicitly have element
content only.
A few notes about PCDATA usage:
•
All PCDATA type content models are called
mixed content
models regardless of
whether they have other elements specified.
•
The (#PCDATA) content model inherently implies zero or more characters. For
example, for our above example, both first_name and last_name elements could be
left blank and the parser would not be upset. It would get upset if the either the
first_name or the last_name or both element tags were omitted.
character data only]]>
     
- 64 -
Figure 3.8

- 65 -
Alex, Faraz
Similarly, for external subsets, the syntax found in the XML document is:
...
To exemplify this, we need to have two documents: the external DTD and the XML
document. The XML document looks like this:
Alex, Faraz
while the DTD, good_guys.dtd looks like this:
A document can have
both
internal and external document type declarations so that you
can further define your structure. In keeping with the same theme as above, our
good_guys.dtd should look like this:
If we further wanted to define the structure of our good_guy element, our good_guys.xml
XML file could look like this:
]>
Alex, Faraz
Hold on to your hats; it gets worse before it gets better. But rest assured—it does get
better!
DOM Level 2 (working draft)

|
DOM Level 2 (working draft)Bog'liq Ceponkus, Hoodbhoy - Applied XML - Toolkit for ProgrammersDOM Level 2 (working draft).
At the time of writing, this specification was a working
draft. Its main purpose is to give a glimpse into what the future holds for the DOM. There
is no implementation of this specification; the disclaimer at the top of the spec states that
the contents are guaranteed to change. Rather than risk having you get mad at us for
covering a nonstandard specification, we won’t be covering this document. Rest
assured, when the new DOM is standardized, we will have a revised version.
DOM Level 1 Core.
This specification defines the methods and properties that can be
used to manipulate XML. This specification outlines the XML DOM that is covered in later
chapters.
DOM Level 1 HTML.
This specification extends the Level 1 Core specification to provide
additional functionality for HTML, known as Dynamic HTML. Script authors can use these
interfaces to manipulate an HTML page.
DOM Level 0.
This specification doesn’t exist, but the title refers to the combination of
the HTML DOMs exposed in Microsoft Internet Explorer 3 and Netscape Navigator 3.
The Tree Model
XML is a hierarchical language: The tags contained within an XML document have
parent-child relationships (see Figure 4.1). The hierarchical nature of an XML document
naturally leads to a tree for the representation of an XML document. The DOM
specification does not state that the internal structure of the XML document should be a
tree; rather the set of interfaces that are presented leads directly to a conceptual model of
a tree. In other words, the parser uses whatever internal structure programmers see fit.
On the other hand, users of this parser see a tree representation of the XML document
as provided by the DOM interfaces. Each construct in an XML document, such as an
element or an attribute, is represented as a node in the tree. This tree representation is
designed with object-oriented principles. The nodes that represent the XML document
constructs each have their own set of properties and methods, and share functionality
from a base class. Some of the functionality present in all nodes includes the mechanism
to navigate through the tree and the ability to manipulate the contents of nodes.
|
| |
Character Data Sections - Microsoft Word Applied xml a toolkit for Programmers Wiley doc

|
Microsoft Word Applied xml a toolkit for Programmers Wiley docBog'liq Ceponkus, Hoodbhoy - Applied XML - Toolkit for ProgrammersCharacter Data Sections
When we talked about entity references, we mentioned that there was more than one
way to fix the problem of the parser getting confused by content containing illegal
characters or non-well formed syntax. One way to duck past the watchful eye of the
parser is to make the parser simply assume that your content is nothing more than
character data by dumping that information into a character data
(CDATA) section
(hence
the name!). Think of the CDATA section as a cover under which contraband material
(content containing characters that would otherwise cause non-well formed syntax errors)
can be smuggled across customs (the XML parser).
Let’s look at our original problem. We want to declare that Faraz is shorter than Alex
using simple, standard math symbols. Unfortunately, the parser gets upset when we use
the < character. Well, let’s simply toss our errant statement into a CDATA section. Then,
our XML snippet would look like this:
The parser would then be tricked into ignoring the content of the CDATA section and
simply reproducing it as:
Faraz < Alex
Again, this is precisely what we wanted it to look like.
Another example of using CDATA sections is to encode markup itself. Say your XML
document contains information on how to create HTML pages. In that case, you’re going
to want to include a lot of markup sections in the document that you would want
displayed as markup. Let’s say you want to tell a reader how to create a div element
within a span element in your HTML. Here’s how you could include that information in
your XML document such that it wouldn’t throw the parser:
Here is how to put a "Div" into a "Span" :
contents of my_div
]]>
Figure 3.8 displays what the parser spits out when it sees the above snippet.Generically,
CDATA sections are expressed as follows:
as
|
| |
SELECT * FROM Orders main WHERE NOT SNum

67
SELECT ODate, SUM (AMT) FROM Orders a GROUP BY
ODate HAVING SUM (AMT) > (SELECT 2000.00 + MAX (AMT)
FROM Orders b WHERE a.ODate = b.ODate);
Ostki so„rov asosiy so„rovning ko„rilayotgan
agregat guruxi
sanasiga teng sanaga ega xmma satrlar uchun MAX qiymat xisoblaydi.
Bu WHERE ifodasidan foydalanib bajarilishi lozim. Ostki so„rovning
o„zi GROUP BY yoki HAVING operatorlarini ishlatmasligi kerak.
Select * from subject Where hour between 30 and 40

55
Select ‘familiya’, surname, ‘imya’, name, 100 From
STUDENT
‘familiya’
Surname
‘imya’
name
100
familiya
Ivanov
imya
Ivan
100
familiya
Petrov
imya
Petr
100
Sonli ma‟lumotlarni uzunlik o`zgartirish uchun atribut amallardan
foydalanamiz. Bunda quyidagi amalla ishlatiladi: “-“, “+”, “*”, “/”
Select surname, name, stipend, kurs, (stipend*kurs)/2 From
student
Where kurs ning 4 and stipend >0
Natija:
Yozuv malakasini ongli o‘zlashtirish usuli

145
berishi lozim. Yozuv darslarida 8-10 daqiqa o‘tgandan so‘ng o‘quvchilar betoqat
bo‘lib, charchash alomatlari ko‘zga tashlanadi. Bolaning orqasiga yoki yonga
yaslanib o‘trishi, o‘rnidan turib ketishi charchaganlikdan dalolat beradi.
Mana shunday holatda o‘quvchilarning charchashlariga ahamiyat bermay,
ko‘p yozdirish natijasida o‘quvchi toliqadi, harakatlari sustlashadi, xati
xunuklashadi, ko‘p xatoga yo‘l qo‘yadi.
Shu sababli charchashning oldini olish uchun vaqti-vaqti bilan jismoniy
mashqlar o‘tkazib borish katta ahamiyatga ega. Jismoniy mashqlarni dars
davomida bir necha marta o‘tkazish tavsiya etiladi. Mashqlar avvalo o‘qituvchi
tomonidan ko‘rsatiladi, so‘ng o‘quvchi tomonidan bajariladi.
Jismoniy mashq izchil o‘tkazib borilsa, keyin esa yozishga kirishilsa,
o‘quvchilarning ish qobiliyati tiklanadi va darsga qiziqishi ortadi.
Xullas, ish faoliyati davrida qo‘l harakatini mashq qildiruvchi jismoniy
mashqlardan foydalanib turilsa, chiroyli yozuvga o‘rgatishning asosiy
shartlaridan biridir.
Yoddan chiqarmaslik lozimki, tasavvur orqali yozish chiroyli yozishga
o‘rgatishda yordamchi usul vazifasini bajaradi.
Table 3.3 Built-in XML Entities and Their References

Table 3.3 Built-in XML Entities and Their References
Entity
Description
Entity Reference
<
Less than sign
<
>
Greater than sign
>
"
Quotation mark
"
'
Apostrophe
'
&
Ampersand
&
In the easiest case, the XML snippet would look like this:
Faraz < Alex
Once run through an XML parser, the text output of the above would look like this:
Faraz < Alex
This is precisely what we want it to be.
- 62 -
In general though, entity references are used for representing bigger entities like files,
documents, or text sections. The parser follows the references and pieces together the
entire document. So, let’s say you were writing an essay consisting of an introduction, a
body, and a conclusion. If you were to prepare each section separately, declaring each
as an entity in your DTD, your XML document would refer to it as follows:
&introduction;
&body;
&conclusion;
The parser would then track down and read the actual introduction, body, and conclusion
entities and stuff them into a single document in memory. This enables you to take an
object-oriented approach to your XML documents.
If you’re asking the very important question of how we defined the entities, wait a few
more pages: We get into that in the
“Making DTDs”
section.
So, the generic syntax of using an entity reference is as follows:
&entity_name;
It is an ampersand, followed by the entity’s name (declared in the DTD), followed by a
semicolon. No white spaces are allowed.
Processing Instructions
Processing instructions (PI)
are a hand-me-down syntax from SGML. The syntax is used
to clearly mark up information sections that are specific to your application/application
processor (for example, a parser) and nothing else. You could think of it as a coded
memo format for your
particular processor/application. You use the memo to write specific instructions to your
application, instructions that you want to make sure are not thought of as conventional
data.
PIs are particularly useful if your XML document is being processed by more than one
parser (say a rich text format [RTF] engine or a CDF display engine). In that case, you
may want to include some specific instructions to one engine that you don’t want the
other to pay attention to. The way this is done is to express processing instructions in a
markup syntax that is different from elements, comments, or attributes. Processing
instructions are of the following generic format:
It is a greater-than sign, followed by a question mark, followed by the name of the
processor/application the PI is intended for, followed by the instruction and its value. The
instruction need not have a value, though it could.
Let’s take a look at an example. XML uses a PI for one of its most fundamental
operations: the XML declaration. In order to tell an XML parser that the document you are
passing though it is in XML, you use a PI expressed as follows:
Remember to keep it case sensitive; using XML in capitals causes the parser to go
ballistic.
- 63 -
If you were using an RTF engine to insert a page break, here’s the processing instruction
you would include in your XML document.
|
Figure 4.1:
Tree model.
DOMifier

- 102 -
Visual Basic. The diagrams presented in the next section can be easily verified by
copying the XML snippets into a file and then loading them in with the DOMifier.
Changing a few lines around and reloading can help you get a feel for what the DOM
exposes much faster than just reading alone. Figure 4.5 shows an example of the
DOMifier output.
Figure 4.5:
DOMifier display of
Figure 4.4
.
Different Node Types
A brief description of each node type is given below, and an in-depth look at each node is
provided in later chapters.
Each of the following node types is derived from a base class called Node. A developer
never creates a generic node, but rather creates one of the following nodes to model the
appropriate behavior of a fragment of an XML document. Each of these nodes can
identify themselves through the nodeType property. A numerical value is assigned to
every node, and the nodeType returns the numerical value associated to a particular
node. Details about the nodeType property are described in
Chapter 5
.
Document.
The Document node is the master node; only one of these nodes can exist
for an XML document. This node is the top-most parent node and represents the XML
document as a whole. In other words, the document node doesn’t represent any specific
piece of the XML document. This node has the special functionality to create other
nodes, which can then be inserted into the tree.
NodeList.
A NodeList node is used to hold a collection of child nodes. This node can
also tell the parent how many children are present, a feature that is useful in loops. Not
all nodes can have children; that is, not all nodes can have a NodeList collection.
Conceptually, the NodeList is just a facility to gain access to the children of a given node.
Figure 4.2 shows a simple tree: a parent and three children. Figure 4.3 shows how a
NodeList node is like any other node in a model, but is used only to group the children.
This NodeList facility provides a uniform mechanism for accessing child nodes.
Table 3.4 Element Type Declarations and Their Meanings

- 68 -
Mignon
would be unacceptable. Nor would you be able
to order food out of sequence; that is,
Apple Pie ala
mode
Bread rolls with
butter
Fillet
Mignon
would also be disallowed by the parser.
main_course?,dessert?)>
An order
may
consist
only
of one appetizer,
one main_course, and/or one dessert item
in
that order
.
For example:
Bread rolls with
butter
Fillet
Mignon
is acceptable to the parser, while
Apple Pie ala
mode
Bread rolls with
butter
is unacceptable because the order of
occurrence
of the elements is contrary to what
was specified.
cream|Coffee)>
Dessert elements consists of either a
single
ice-cream element
or
a
single
coffee element.
For example:
vanilla
is a valid Dessert element while
Apple
is not. It is well formed but not valid under this
- 70 -
Descriptions of Element Type Content Models
If you’ve skimmed over Table 3.4, you have an idea of what we’re talking about. This
section is more of a reference section in case there is something specific you didn’t find
in the table or want further clarification.
Describing the content model is key to defining the structure of your XML document. We
wish there was an easier way to do it than to use the unintuitive DTD syntax, but for now
we’re all stuck with it. The content model essentially tells the parser what an element can
contain. For example, you might want an element to be made of text only, such as:
...
Perhaps you want it to be made of other elements:
...
...
Perhaps still further, you want a mixture of both (technical name:
mixed content
):
Some text that adds further information
...
...
There are so many ways of representing information that we make no pretensions about
the best way of structuring your information. You’re not going to get away from creating
those pesky tree diagrams and story boards of your data—sorry. What you will find below
are several common scenarios that should be able to help you create your own DTDs for
enforcing whatever structure it is that you finally do decide upon.
SELECT Tovarlar.Nomi AS Tovar, Sotish.Soni*Tovarlar.Bahosi

60
ularga narx va mijoz ustunlari qo„shilgandir. Agar bu jadval SELECT
operatorini
natijasi emas, tasavur bo„lganda edi, unga oddiy ma‟lumot
bazasini oddiy jadvali kabi murojat qilinar edi. Ko„p hollarda esa MB
uchta jadvaldan iborat
ekanligini hisobga olmay, bitta tasavur bilan
ishlanar edi.
Tasavurlar yaratish uchun CREATE VIEW komandasi ishlatiladi
Uni sintaksisi kuyidagicha:
CREATE VIEW «tasavur nomi» AS « select so‘rovi» ;
Tasavurlarga ham ma‟lumot baza jadvallari kabi nom beriladi. Bu
nom birorta ham jadval nomi bilan bir xil bo„lmasligi kerak. AS
so„zidan keyin ma‟lumotlar tanlashga uchun so„rov iborasi yoziladi.
CREATE VIEW sotish_taxlili AS SELECT Tovarlar.Nomi AS
Tovar, Sotish.Soni*Tovarlar.Bahosi AS Narxi, Mijoz.Ismi ||
‘.Manzil: ‘ || Mijoz.Manzil || ‘. tel. ‘ || Mijoz.Telefon AS Mijoz
FROM Sotish, Tovarlar, Mijozlar WHERE Sotish.ID_mijoz=
Mijozlar.ID_mijoz AND Sotish.ID_tovar = Tovarlar. ID_tovar;
Natijada sotish taxlili nomli virtual jadval yaratiladi. Unga so`rovlar
yordamida murojat qilish mumkin:
Select * from sotish_taxlili where tovar = ‘moloko’;
Jadvallarni umumlashtirish.
Jamlashtirish relyasion ma‟lumotlar bazasi operatsmyalaridan biri
bo„lib, jadvallar orasidagi aloqani belgilaydi va ulardan ma‟lumotni bitta
komanda yordamida ajratishga imkon beradi. Xar xil jadvallarda bir xil
nomli ustunlar bo„lishi mumkin bo„lgani uchun,
kerakli ustun uchun
jadval nomii prefiksi ishlatiladi. Jamlashda jadvallar FROM ifodasidan
so„ng ro„yxat sifatida tasvirlanadi. So„rov
predikati ixtiyoriy jadval
ixtiyoriy ustuniga tegishli bo„lishi mumkin. Jamlash eng soddasi bu
dekart ko„paytmasi, uni quyidagicha bajarish mumkin:
-mavzu. Ma’lumotlar manipulyatsiya qilishda oddiy so‘rovlar

54
Mantiqiy shartlarni berishda
where parametri tarkibida IN,
BETWEEN,
Like,
is null amallari ham ishlatiladi.
In yoki
not parametli ishlatilganda
tekshirilayotgan maydon
qiymati berilgan ro`yxat bilan solishtiriladi. Bu ro`yxat
in operatori o`ng
tomonidan () ichida yoziladi.
Exam baholari jadvaldan «4» va «5» baholi talabalar ro`yxatini
chiqaring.
Select * From exam-marks Where mark in (4,5);
Birorta ham 4 yoki 5 olmagan talaba haqidagi ma‟lumotlar
olish
uchun
not yoziladi.
Berween amali maydon qiymatini berilgan intervalga kirganligini
tekshirish uchun ishlatiladi.
30 va 40 soat doirasida o`qitiladigan fanlarni chiqarish so`rovini
berish.
Length () vazifasi satrni uzunligini aniqlab borishdan iborat 
Select Lpad(Surname, 10, $), RPad(Name, 10,@) from STUDENT

57
bajarib, 1 ta natija chiqaradi. Guruhli
funksiyalar uchun quyidagi
amallarni ishlatiladi.
1.
COUNT – jadvaldagi satrlar sonini aniqlab beradi.
2.
SUM –
ko`rsatilgan
maydon
qiymatlarini
yig`indisini
hisoblaydi.
3.
AVG – tanlab olingan maydon qiymatlarini o`rta
arifmetigini
hisoblaydi.
4.
MAX yoki
MIN – tanlab olingan
maydon qiymatlarini eng
kattasini yoki kichigini topib beradi.
Select so`rovida guruhli funksiyalar
maydon nomlari kabi
ishlatiladi. Maydon nomlari funksiyalar argumentlari sifatida keladi.
Misol uchun jadvaldagi satrlar sonini
aniqlash uchun quyidagi
so`rovdan foydalanamiz.
Select count (*) From EXAMS_MARKS;
Select komandasida group by parametrini ham ishlatish mumkin.
Bu paramet bir maydon o`xshash parametrlari (aniqlanayotgan qiymati)
bo`yicha guruhlaydi va agregat funksiyalar
ishlatilsa ular shu guruhda
bo`ladi.
surname 
name - Mundarija kirish mavzu

|
Mundarija kirish mavzuBog'liq Mundarija kirishsurname
name
stipend
kurs
(stipend*kurs)/2
Sidorov
Vadim
150
4
-300
Petrov
Anton
200
4
-400
Satrlarni ulash amali yordami const 2 ta va undan ko`p simvolli
ustun qiymatlari bitta satrga joylashtirib boriladi.
Select surname //’-‘// name, stipend Weher kurs ning and
stipend >0;
surname //’-‘// name
Stipend
Sidirov_ Vadim
150
Petrov_ Anton
200
SQLda almashtirish funksiyalari bilan ishlash
Lower ()- berilgan satrni kichik harflarga almashtirib beradi.
Upper- () – kichik harflarni kata harflarga almashtirib
beradi.
Init cap- ()- satrdagi har bir suzunlikni birinchi harfini bosh
harf qilib beradi. Maslan, ularga quyidagi misolni kuramiz.
Select Lower(surname) Upper(name) from student Where kurs=4;
Lower(surname) Upper(name)
sidirov
VADIM
petrov
ANTON
LPAD (, uzunlikunlik, [< kism satr>) RPAD (,
56
, []).
Berilgan uzunlikunlikdagi qism satrni chapdan unga joylashtiriladi.
Agar kism satr kursatilmagan bulsa, satr sukut bilan, probellar
bilan tuldiriladi. Agar uzunlikunlik satr uzunlikunlikdan kerak bulsa
berilgan satr kursatilgan uzunlikunlikgacha kirkiladi.
LTRIM (), [ ]);
Bu funksiyalarni vazifasi mos ravishda chapdagi chegaraviy
simvol olib tashlashdan iborat. Olib tashlangan simollar qism satrda
ko`rsatiladi. Agar qism satr ishlamasa probellari olib tashlanadi.
Substr (, , []
Ko`yidagi bu funksiyalari satrdan berilgan pozitsiyadan boshlab
berilgan sondagi simvollari ajratib olinadi. Agar soni ko`rsatilmagan
bo`lsa satrni boshidan oxirigacha ajratib olinadi.
Misol: substr (Hurmatli do‟stim: 10,7)=> do‟stim
|
| |