Database Il linguaggio SQL RDBMS ƒ Sebbene di solito i dati di un
by user
Comments
Transcript
Database Il linguaggio SQL RDBMS ƒ Sebbene di solito i dati di un
'DWDEDVH ,OOLQJXDJJLR64/ )RQGDPHQWLGL,QIRUPDWLFD/% 5'%06 6HEEHQHGLVROLWRLGDWLGLXQ'%VLDQRPHPRUL]]DWLLQ XQILOHRLQXQLQVLHPHGLILOHXQ·DSSOLFD]LRQHQRQ LQWHUDJLVFHGLUHWWDPHQWHFRQHVVL (VLVWHXQ·HQWLWjFKLDPDWD 5'%06 5HODWLRQDO 'DWD %DVH0DQDJHPHQW6\VWHPFKHJHVWLVFHODEDVHGL GDWLHFRQFXLO·DSSOLFD]LRQHFROORTXLDLQPRGRDVWUDWWR 8Q5'%06SXzHVVHUHXQDVHPSOLFHOLEUHULDRSSXUH XQDSSOLFD]LRQHPROWRFRPSOHVVD ,O'%SXzULVLHGHUHORFDOPHQWHRVXXQ·DOWUDPDFFKLQD LQUHWH /·DSSOLFD]LRQHLQYLDGHLFRPDQGLVRWWRIRUPDGL VWULQJKHGLWHVWR 4XHVWLFRPDQGLFRVWLWXLVFRQRO·XQLFRPRGRSHU LQWHUDJLUHFRQLOGDWDEDVH (·XQPRGHOORGLLQWHUD]LRQHGLWLSR FOLHQWHVHUYLWRUH )RQGDPHQWLGL,QIRUPDWLFD/% 64/ 8QDFDUDWWHULVWLFDLPSRUWDQWHGHOPRGHOORUHOD]LRQDOH qODSUHVHQ]DGLXQOLQJXDJJLRGLLQWHUURJD]LRQHH PDQLSROD]LRQHGHL'% &RPHDEELDPRGHWWRTXHVWROLQJXDJJLRUDSSUHVHQWD O·XQLFRPRGRSHULQWHUDJLUHFRQXQ5'%06 ,OOLQJXDJJLRGLJUDQOXQJDSLGLIIXVRq 64/ 6WUXFWXUHG4XHU\/DQJXDJH (·XQRVWDQGDUG ² GHILQLWRGDOO·$16, GLFXLHVLVWRQR GLYHUVHYHUVLRQL64/64/64/ ,QSUDWLFDLYDUL5'%062UDFO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QGDPHQWLGL,QIRUPDWLFD/% ,WLSLGLGDWL64/ 64/GHILQLVFHXQFHUWRQXPHURGLWLSLSHUJOLDWWULEXWL FRPHDEELDPRGHWWRXQWLSRHTXLYDOHDGXQGRPLQLR 3HUVHPSOLFLWjQHSUHQGLDPRLQFRQVLGHUD]LRQHVROR DOFXQLWUDLSLFRPXQLULSRUWDQGRO·HTXLYDOHQWHWLSR -DYD 64/ -DYD 1RWH 9$5&+$5Q 6WULQJ Q &+$5 FKDU &DUDWWHUH ,17(*(5 LQW 1XPHURLQWHUR )/2$7 IORDW GRXEOH 1XPHURUHDOH GLPHQVLRQH PD[ GHOODVWULQJD $EELDPRHVFOXVRL ERROHDQL SHUFKpPROWL'%QRQOLSUHYHGRQR 3HUOHVWULQJKHYDUFKDUELVRJQDLQGLFDUHXQDGLPHQVLRQH PDVVLPDFRPHLQ& )RQGDPHQWLGL,QIRUPDWLFD/% &UHD]LRQHGHOOHWDEHOOHVWXGHQWLHFRUVL &UHLDPRLQQDQ]LWXWWRODWDEHOODVWXGHQWLHODWDEHOOD FRUVLVSHFLILFDQGROHFKLDYLSULPDULH &5($7(7$%/(6WXGHQWL 0DWULFROD9$5&+$512718// &RJQRPH9$5&+$512718// 1RPH9$5&+$512718// 1DVFLWD9$5&+$5 35,0$5<.(<0DWULFROD &5($7(7$%/(&RUVL &RGLFH,17(*(512718// 7LWROR9$5&+$5 &UHGLWL,17(*(5 35,0$5<.(<&RGLFH )RQGDPHQWLGL,QIRUPDWLFD/% &UHD]LRQHWDEHOODHVDPL &UHLDPRODWDEHOODHVDPLFRQWXWWLLYLQFROLQHFHVVDUL FKLDYHSULPDULDYLQFROLGL WXSOD HLQWHJULWjUHIHUHQ]LDOH &5($7(7$%/((VDPL 6WXGHQWH9$5&+$512718// &KLDYHSULPDULD 9RWR,17(*(5 /RGH&+$5 ,QWHJULWj &RUVR,17(*(512718// UHIHUHQ]LDOH 35,0$5<.(<6WXGHQWH&RUVR )25(,*1.(<6WXGHQWH5()(5(1&(6VWXGHQWL )25(,*1.(<&RUVR5()(5(1&(6FRUVL &+(&.9272!$1'9272 &+(&.127/RGH 6259RWR 9LQFROLGL WXSOD )RQGDPHQWLGL,QIRUPDWLFD/% $OWULFRPDQGL''/ ''/PHWWHDGLVSRVL]LRQHDQFKHDOWULFRPDQGL 3HUFDQFHOODUHXQDWDEHOOD '5237$%/(QRPHBWDEHOOD 3HUULQRPLQDUHXQDWDEHOOD $/7(57$%/(QRPHBWDEHOOD5(1$0(QXRYRBQRPH 3HUPRGLILFDUODDJJLXQJHQGRHOLPLQDQGRR ULQRPLQDQGRFRORQQH $/7(57$%/(QRPHBWDEHOOD $''&2/801QRPHBDWWULEXWRWLSR>12718//@ $/7(57$%/(QRPHBWDEHOOD '523&2/801QRPHBDWWULEXWR $/7(57$%/(QRPHBWDEHOOD &+$1*(&2/801 FROXPQBGHILQLWLRQ )RQGDPHQWLGL,QIRUPDWLFD/% '0/ '0/qODSDUWHGL64/FKHFRQVHQWHGLHIIHWWXDUHOH VHJXHQWLRSHUD]LRQL ,QVHULPHQWR GLXQDQXRYDULJDLQXQDWDEHOODFRPDQGR ,16(57 &DQFHOOD]LRQH GLXQDRSLULJKHGDXQDWDEHOOD FRPDQGR '(/(7( 0RGLILFD GLXQRRSLFDPSLDSSDUWHQHQWLDXQDRSL ULJKH GGL XQDWDEHOODFRPDQGR 83'$7( (VWUD]LRQH GLGDWLGDXQDRSLWDEHOOHFRPDQGR 6(/(&7 3HUHVDPLQDUHLOIXQ]LRQDPHQWRGLTXHVWLFRPDQGL FRQWLQXLDPRFRQLOQRVWURHVHPSLRSRSRODQGRODEDVH GDWLFKHDEELDPRDSSHQDFRVWUXLWR )RQGDPHQWLGL,QIRUPDWLFD/% ,16(57 /·LQVHULPHQWRGLXQDQXRYDULJDYLHQHIDWWRFRQLO FRPDQGR,16(57ODFXLVLQWDVVLq ,16(57,172WDEHOOD DWWULEXWRDWWULEXWR«DWWULEXWR1 9$/8(6 YDORUHYDORUH«Y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