MA’LUMOTLAR BAZASINI BOSHQARISH TIZIMLARi shaxarlar mavzu
O’ZBEKISTON RESPUBLIKASI OLIY VA O’RTA-MAXSUS TA’LIM VAZIRLIGI SAMARQAND DAVLAT SHAXARI RAQAMLI TEXNOLOGIYALAR FAKULTETI AXBOROT TIZIMLARI MATEMATIK VA DASTURIY TA’MINOTI YO’NALISHI MA’LUMOTLAR BAZASINI BOSHQARISH TIZIMLARI FANIDAN “SHAXARLAR” mavzusida KURS ISHI SAMARQAND –2022
MUNDARIJA I. ..................................................................................................................................................................... 1 Kirish ............................................................................................................................................................ 7 Darhaqiqat, hozirgi davrda AKT orqali uzatiladigan axborot jamiyat rivojining eng muhim shartlaridan biri bo‘lib qoldi. U ishlab chiqarish resursi, insonlar orasidagi aloqani ta'minlovchi qudratli vositaga aylandi. Shu bois, davlat hokimiyati va boshqaruvi organlari, umuman, jamiyatning axborot uzatish tezligi hamda sifatiga bo‘lgan talablari kun sayin ortib bormoqda. AKT sohasini jadal sur'atlar bilan taraqqiy ettirish O‘zbekiston iqtisodiyotida amalga oshirilayotgan tarkibiy o‘zgarishlar hamda iqtisodiy islohotlarning bosh yo‘nalishlaridan biri hisoblanadi. Chunki bu yo‘nalish nafaqat respublikani axborotlashgan jamiyatga aylantirish uchun xizmat qiladi, balki mamlakatimiz iqtisodiyotini jadal sur'atlar bilan rivojlantirishda o‘ziga xos yetakchi tarmoq — «lokomotiv» rolini o‘ynaydi.Dasturiy vazifalardan kelib chiqib, mamlakatimizda komputer va axborot texnologiyalari, telekommunikatsiya va ma'lumot uzatish tarmoqlarini, internet xizmatlarini rivojlantirish va zamonaviylashtirish, ularni dunyo standartlari darajasiga yetkazish maqsadida keng ko‘lamli islohotlar bosqichma-bosqich amalga oshirilmoqda. Albatta, ijtimoiy hayotning barcha sohalarida bo‘lgani kabi axborot-kommunikatsiya texnologiyalari sohasidagi islohotlarni muvaffaqiyatli amalga oshirish, o‘z navbatida, ushbu sohaning huquqiy asosini shakllantirish va takomillashtirib borishni taqozo etadi. Shuning uchun ham mamlakatimizda mazkur sohada samarali huquqiy mexanizmlarni yanada takomillashtirishga jiddiy e'tibor qaratilmoqda. Ma’lumotlar bazasi (date base) - bu EHM ning tashqi xotirasida saqlanadigan, har qanday jismoniy, ijtimoiy, statistik, tashkiliy va boshqa ob’yektlar, jarayonlar, holatlarning o‘zaro bog‘liq va tartiblashtirilgan majmuidir.Ma’lumotlar bazasi (MB) har xil foydalanuvchilarning axborot yetishmovchiligini ta’minlash uchun mo‘ljallangan. Amaliyotda ko‘pchilik ma’lumotlar bazasi chegaralangan predmet sohasi uchun loyihalashtiriladi. Bitta EHMda bir qancha ma’lumotlar bazasi yaratiladi. Vaqti bilan turdosh vazifalarni bajarishga mo‘ljallangan ba’zi bir ma’lumotlar bazasi birlashishi ham mumkin. MB ni loyihalashtirishda asosan ikkita masala echiladi: ........................................................ 7 II. NAZARIY QISM. ........................................................................................................................................ 9 2.1 Ma’lumotlar bazasi haqida tushuncha .............................................................................................. 9 III. Amaliy qism .......................................................................................................................................... 14 3.1 “shaxar ” ma’lumotlar bazasining mantiqiy strukturasi va uni shakllantirish .................................. 14 Biz ushbu shaxar nomli loyihamizda shaxar, sayohat markazi, mehmonhona, bozorlar, transport, ijtimoiy obyektlar, otm mohiyatlarini yaratamniz va ularda shaxar un kerakli bo’lgan atributlarni kiritamiz. ............................................................................................................................................... 14 Shaxar mohiyati shaxar hududida joylashgan mehmonhona ijtimoiy obyektlar, sayohat markazlari, transport,OTM , maydoni, axoliosi, markazi kabi shaxarda malumotlarni o’zida jamlaydi. .................. 14 Mehmonhona mohiyati joylashgan mehmonhonalar haqida quydagi malumotlarni saqlaydi: nomi, manzili, sig’imi, ish vaqti ....................................................................................................................... 14 İjtimoiy obyektlar mohiyati u o’zida muzey,sixatgoh,banklar, hizmat ko’rsatish va boshqa shaxar hududida joylashgan ijtimoiy obyektlar haqidagi ma’lumotlarni o’zida jamlaydi ................................. 14 Sayohat markazi mohiyati bu mohiyat o’zida manzili, nomi, tashkiltopgan yili kabi malumotlarni saqlaydi ................................................................................................................................................. 14 2
Talim muassasalari mohiyati bu mohiyzt shaxardagi universitaetlar kollejlar, litseylar, maktablar haqida malumot beradi. ....................................................................................................................... 14 Transport mohiyati bu mohiyat orqali shaxar transport tizimi bn tanishishingiz mumkin hususan airport, vokzal, avto vokzal taksi park. .................................................................................................. 14 Bozor mohiyati bu mohiyatda bozorning ish kuni, manzili, bozor turi haqidagi malumotlar mavjud. . . 15 .............................................................................................................................................................. 15 3.2. SQL tilida jadvallarga ma’lumotlarni datologik modeli .................................................................. 16 3.3. SQL operatorlari yordamida jadvallarni hosil qilish va jadvallarga ma’lumotlar kiritish ................. 23 CREATE TABLE [shaxar] ( ....................................................................................................................... 23 [id_shaxar] int PRIMARY KEY, .............................................................................................................. 23 [maydoni] nvarchar(255), .................................................................................................................... 23 [aholisi] nvarchar(255), ........................................................................................................................ 23 [markazi] nvarchar(255), ..................................................................................................................... 23 [geografik_orni] nvarchar(255), ........................................................................................................... 23 [mexmonhona] nvarchar(255), ............................................................................................................ 23 [sayohat_markazi] nvarchar(255), ....................................................................................................... 23 [ijtimoiy_obyektlar] nvarchar(255), ..................................................................................................... 23 [Talim_muassasalar] nvarchar(255), .................................................................................................... 23 [Transport] nvarchar(255), .................................................................................................................. 23 [kongil_ochar_markazlar] nvarchar(255), ............................................................................................ 23 [bozorlar] nvarchar(255) ...................................................................................................................... 23 ) ............................................................................................................................................................ 23 GO ........................................................................................................................................................ 23 CREATE TABLE [sayohat_markazi] ( ...................................................................................................... 24 [id_sayohat_markazi] int PRIMARY KEY, .............................................................................................. 24 [maydoni] nvarchar(255), .................................................................................................................... 24 [nomi] nvarchar(255), .......................................................................................................................... 24 [tashkil_topgan_vaqti] datetime ......................................................................................................... 24 ) ............................................................................................................................................................ 24 GO ........................................................................................................................................................ 24 CREATE TABLE [mexmonhona] ( ........................................................................................................... 24 [id_mehmonhona] int PRIMARY KEY, .................................................................................................. 24 [nomi] nvarchar(255), .......................................................................................................................... 24 3
[manzili] nvarchar(255), ....................................................................................................................... 24 [sigimi] nvarchar(255), ......................................................................................................................... 24 [ish_vaqti] datetime ............................................................................................................................ 24 ) ............................................................................................................................................................ 24 GO ........................................................................................................................................................ 24 CREATE TABLE [ijtimoiy_obyektlar] ( .................................................................................................... 25 [id_ijtimoiy_obyekt] int PRIMARY KEY, ................................................................................................ 25 [muzey] nvarchar(255), ....................................................................................................................... 25 [sihatgoh] nvarchar(255), .................................................................................................................... 25 [banklar] nvarchar(255), ...................................................................................................................... 25 [seervis] nvarchar(255) ........................................................................................................................ 25 ) ............................................................................................................................................................ 25 GO ........................................................................................................................................................ 25 CREATE TABLE [Transport] ( .................................................................................................................. 25 [id_transport] int PRIMARY KEY, .......................................................................................................... 25 [airport] nvarchar(255), ....................................................................................................................... 25 [vokzal] nvarchar(255), ........................................................................................................................ 25 [avto_vokzal] nvarchar(255), ............................................................................................................... 25 [taksi_park] nvarchar(255) .................................................................................................................. 25 ) ............................................................................................................................................................ 25 GO ........................................................................................................................................................ 25 CREATE TABLE [Talim_muassasalar] ( ................................................................................................... 26 [id_talim_muassasa] int PRIMARY KEY, ............................................................................................... 26 [otm] nvarchar(255), ........................................................................................................................... 26 [litsey] nvarchar(255), .......................................................................................................................... 26 [kollej] nvarchar(255), ......................................................................................................................... 26 [maktab] nvarchar(255) ....................................................................................................................... 26 ) ............................................................................................................................................................ 26 GO ........................................................................................................................................................ 26 CREATE TABLE [bozorlar] ( .................................................................................................................... 26 [id_bozor] int PRIMARY KEY, ................................................................................................................ 26 [nomi] nvarchar(255), .......................................................................................................................... 26 4
[manzili] nvarchar(255), ....................................................................................................................... 26 [ish_grafigi] nvarchar(255) ................................................................................................................... 26 ) ............................................................................................................................................................ 26 GO ........................................................................................................................................................ 26 CREATE TABLE [kongil_ochar_markazlar] ( ........................................................................................... 27 [id_markazlar] int PRIMARY KEY, ......................................................................................................... 27 [nomi] nvarchar(255), .......................................................................................................................... 27 [manzili] nvarchar(255), ....................................................................................................................... 27 [ish_vaqti] nvarchar(255) ..................................................................................................................... 27 ) ............................................................................................................................................................ 27 GO ........................................................................................................................................................ 27 ALTER TABLE [mexmonhona] ADD FOREIGN KEY ([id_mehmonhona]) REFERENCES [sayohat_markazi] ([id_sayohat_markazi]) ......................................................................................................................... 27 GO ........................................................................................................................................................ 27 ALTER TABLE [shaxar] ADD FOREIGN KEY ([mexmonhona]) REFERENCES [mexmonhona] ([id_mehmonhona]) ............................................................................................................................. 27 GO ........................................................................................................................................................ 27 ALTER TABLE [Transport] ADD FOREIGN KEY ([id_transport]) REFERENCES [shaxar] ([Transport]) ...... 28 GO ........................................................................................................................................................ 28 ALTER TABLE [Talim_muassasalar] ADD FOREIGN KEY ([id_talim_muassasa]) REFERENCES [shaxar] ([Talim_muassasalar]) .......................................................................................................................... 28 GO ........................................................................................................................................................ 28 ALTER TABLE [ijtimoiy_obyektlar] ADD FOREIGN KEY ([id_ijtimoiy_obyekt]) REFERENCES [shaxar] ([ijtimoiy_obyektlar]) ............................................................................................................................ 28 GO ........................................................................................................................................................ 28 ALTER TABLE [kongil_ochar_markazlar] ADD FOREIGN KEY ([id_markazlar]) REFERENCES [shaxar] ([kongil_ochar_markazlar]) .................................................................................................................. 28 GO ........................................................................................................................................................ 28 ALTER TABLE [bozorlar] ADD FOREIGN KEY ([id_bozor]) REFERENCES [shaxar] ([bozorlar]) ................. 28 GO ........................................................................................................................................................ 28 ALTER TABLE [sayohat_markazi] ADD FOREIGN KEY ([id_sayohat_markazi]) REFERENCES [shaxar] ([sayohat_markazi]) .............................................................................................................................. 29 GO ........................................................................................................................................................ 29 Xulosa ........................................................................................................................................................ 29 Foydalanilgan adabiyotlar .......................................................................................................................... 30 5