Предмет Базы данных

  • Published on
    29-Jul-2015

  • View
    408

  • Download
    1

Embed Size (px)

Transcript

<p> 1. ( . data) , . , - , , - . 2. . 60-- 70- . , , . (, , , ), , () ( , . 1260). : 1. . , (, , . .) . 2. () . 3. (), , , () . , , ( ). 10032-2007, . , , . , . . , . . 3. . . . , (. three-tier Multitier architecture) : ( ), , . - ( ) , , . ( ), - ( ) ( ). -: , , , (, , ) , . - . . , (.), . - . - . , , , , . , , , - . . . . , . . , . , " ". . . . , , . , , . - . - , . , .. . -, -. </p> <p> Oracle, . , , . . 4. . (), , , . , , . , , . , , . "-", - . , . - . , . . . ER- , . , . , . . , . , , . , , , .45) ER- ( ). ( ), , ( ), (. . ). , . : - , ( ) (many) ; - , ( ) . , , , , . , , , , . , . , . _ : _, _ _ ( , ). 5. . ER . , , . -- (1:1): () 1 0 : "" , . -- (1:): 0, 1 . , . , -- (:1) -- (:N). . : (, , -; ); ( , ); , () .</p> <p> ER- ( . Entity-Relationship, .. -). , , , , (1 , "") . ER- () . , . ER- (, , .) 1976 - (. Peter Pin-Shen Chen), . 6. : 1., , : (, ), , (, , ..), ( ), ( ), , , . 2. : , , , . 3. (): , , . : - , ; - ( ) ( ); - ; - . ER- , : (, , ) (, , ) (, , ) [] [ M, N] (, , ()) [ M, N] (, , _, , ()) (, ) (, ) {} (, _, ) {} 7. . . . : , , . () , . () "--" ("--" ..) . : , ; , .. , , , . , "" "_", "_" " ", " ", " ", " ", "_", " " .. () "--" "--" ( ). . , . ( 2.3), (, , , ...) .. : , . , : ( 1, 2, ...) { }.</p> <p> ER-, :</p> <p> , . ( ) : ( , , ...) ( , , ...) [ M, N] ( , , ). , , , : ( , , ...) ( , , ... , , )[] ( , , ). . : "" , , .. , , : ( 1, 2, ...)[ ]. , , - . , , "" "". , , , , ( ) . , - . , . 9. . , , . , . . . , . ( ). , , , , , , ( ) , . , , , " "" " " ". , ( , ) . : , , . . :</p> <p>- , , . - , , . (, , ) "" " ". , , : " ?" , : 1. (NULL-)? 2. , ? 3. , ? , , , , , ( , ). , , . , . : NULL- () ( ) . 10. , . (. foreign key) , . , R2, R1. . R1 R2 , . FK R2 R2 , : R1 CK , FK CK ( FK FK, FK CK , ). FK R2 CK R1. , FK R2 () CK R1. FK CK R1, , , , , R2, , , . . . 11. . ( . integrity , , , ) . : , ( ). , , 5 ( ) 3. , 9 . , (1,2,3,4,5,6,7). ( , ). ( , ).</p> <p> : . . , . , - , , . : ; , .. , . , . : , ( 2 5), ( "" ""). 12. . 60- , , .. . IBM - . (Codd E.F., A Relational Model of Data for Large Shared Data Banks. CACM 13: 6, June 1970), , , " ". . (, , , ). , , relation (.) () . , , , . . , . () , . . , , , , (, " , "). , , , : ? D1, D2, ..., Dn ( , ) . . 3.1 (. 1.1). ( . 1.1 ) A1, A2, ..., An, Ai Di (i=1,2,...,n). , - (Ai:Vi), (i=1,2,...,n), Ai . - (Ai:Vi) Vi Di, Ai. . , , , ..., n n-. "" (. 1.1) 8. . "" 10. . , , - . R A1, A2, ..., An. , K=(Ai, Aj, ..., Ak) R R , : : R Ai, Aj, ..., Ak. : Ai, Aj, ..., Ak K . , . ( </p> <p>) . , , . , , , . : ( ), ( ), , . , "" " ", "" " ". 13. . , , . . . 3.2 , "" .</p> <p>1. . 2. () ( ). , . 3. , . 4. , (, , ). 5. . , - "" , . , = 2 "" . 3.2 = 7 ( ), , "" , 2, 7. 6. . , (, "" 12 ). 14. . . ( ) (.. ). , . ( , , .) , , , - (, , , , ..). , ( , ). ( - , .)</p> <p> , . , (, ). , .. , . , , .. , . . , . , . , , , . , . ( ) [2, 3, 4, 6, 8, 9, 10]. , ( ). "" ( ) ( , , ..). , () . ( " ".) ( ) , . , . , , , - . , "" (" ") , . , , . 15. . , "" (.) , ( 1/9/94 .) . "" , . , , ( ), _ . 4.1 . . , .. . . . . , , . ( 15 ) .</p> <p>16. . 1. . . (--, -, --). , "" (. . 2.3). , ( ) , . 2. ( ). , . , "" , . , . 3. . ("", , ), () . , , , , () . , , ? (, ), (, ""). , ()? 4. . , , . . 17. . , , . , , .. . , . , , . , , . , , .. , , . , 1. , , "" " 1" . "" " ", , . 1 (2), (3) .. , 2, 1 , , , . 3, 2 , , .. , , , . , "(N+1)- " , "N- ". , (N+1)- N- , . . : . . , . , , . , (. 4.4) , . 4.3 (, ). , . . , . . , . 18. . . , .</p> <p> . , . "" (.). "": ( ) ( ). "-": " " " ". , ( ). : (- -). 19. . (1) , . (2), 1 , , . . , ( ) () , , . (3), 2 . - (), . , . (5) , . , , 5. (4) 5, . , 4, 5. 20. . , , , . : , 5. , 5. , , . . , K-&gt;F, K , F . , , K-&gt;F . " " , . , "" , .. , , K-&gt;F. 1. , , (1,2), F, , , 2, . , 2 F ( 2), F : T(K1,K2,F), (1,2), 2-&gt;F T1(K1,K2), (1,2), T2(K2,F), 2. 2. () , F1, , , , F2, F1. , , , , F1 F2, F1, F2 : T(K,F1,F2), , F1-&gt;F2 T1(K,F1), , T2(F1,F2), F1.</p> <p> , , , "" , , - , K-&gt;F. - "" (, ). , . , . "" ( 15). 1. . , , , .. . , , , , .. , . , , , .. , , . "" : , _, , , , _. 2. , . , .. -&gt;. : -&gt; (, _)-&gt; -&gt; (, )-&gt; -&gt; (, , _)-&gt; 3. . , : (, ) (, ) (, _, ) (, ) (, , ()) (, ) (, , _, (), ). 4. . , , (, ), .. , . , , , . 21. . . , .. . . 1. ( ) ( ) . 2. ( "--" "----" .. ) . , . 3. , , . , , " ". 4. , , , . .</p> <p>5. , , . 6. - , . 4.6 . 7. - , . 8. ( ) . . , . "" "":</p> <p> *( ) ( ) ( , 60, 7 ) ( 1. ; " ". 2. : , , , , ; " , , , , "); *( ) ( , ) ( NULL- . ) ( NULL- . ) ( , , ) ( 1. ; " " " ". 2. 0.1 500 . ); 22. -. "-", . 4.7. , . , , , . , .</p> <p>Access 1. , . Access : (by entering data), (in Design view) (by using wizard). (. 2.3). , , , . c : (Create table by using wizard). (Table Wizard) (. 2.7) : (Business) ( (Personal)). (Sample Tables) (MailingList). (Sample Fields) (Fields in my new table). : &gt; , . . 34 , . - , (Fields in my new table) (Rename Field), (Rename Field) (. 2.8). (Next). (What do you want to name your table?) " " (. 2.9). Microsoft Access (Yes, set a primary key for me) ( (No, I'll set the primary key)). . (Next). , , (What field will hold data that is unique for each record?) , . , . : , (Consecutive Numbers Microsoft Access assigns automatically to new record); , (Numbers I enter when I add new records); , (Numbers and/or letters I enter when I add new records). (Next). (. 2.10). . (Relationship). , "" (Relationships). (Relationships) (. 2.11). "" " ". . (. .2.10) (Next). , , . , , (Finish). . 2. : , . . , . , : (Create table in Design View) (New) , (New Table) (Design View) . . (Field Name) . (Data Type) , . (Description) ( ). (General) (Lookup) , . ( ).</p> <p> ? (Do you want to save changes to the design of table ?), (Yes). (Save As) (Table Name) . . (There is no primary key defined) ? (Do you want to create a primary key now?) (Yes) , (No) . . , . , . , , (. . 8). . 3. . (Format) , , (Input Mask) . , . , . . , ( , ) . , . 2.12. 0 . (+) (-) 9 . (+) (-) # , , (+) (-) L ? A a , &amp; C . , Access . () ( Windows) , () ( Windows) -, / ( Windows) &lt; &gt; ! , . , . \ , , . , \ "" (\), . , (Input Mask Wizard). "" (Orders). " ". , (Input Mask). (. 2.21), ( ), : (. 2.22). (Try It), , . (Next). , , (Placeholder character), - , . , . (Next). . (Input Mask) "" (OrderDate) (. 2.22). : ;</p> <p> 0. , . 0 1 ; . 4. : , . . , . , . (Lookup Wizard). "" " ". , , , . (Lookup Wizard), : " " . "" (Data ) (Lookup Wizard) (Lookup Wizard) : " " (I want the lookup column to look up the values in a table or query), . . "" (Customers). (Next). , . "" (Customers) (Next) (Available Fields) "" (Customers). (Selected Fields) "" "" (Next) , , (Hide key column). , . (Next). (Finish). , , (Yes). . (Lookup), , . , (Display Control) (Text Box), (Check Box). (Lookup) . , (Display Control) (Combo Box) (ListBox).[ , . , . (Row Source Type) . : (Table/Query), (Value List) (Field List). (Row Source) . (Value List) , (;), SQL. (Bound Column) , . 0, , 1 , . (Column Count). (Column Count) , . (Table/Query), , , . , , , (Row Source). (Column Heads) , . (Column Widths) . (;). , . (List Rows) . , .</p> <p> (List Width) . (Limit to List) , , . 5. . . , . , Microsoft Access . , . Microsoft Access : , . . : . 1. (Primary Key) (Table Design). , . (Yes) (ID) (AutoNumber). , (, ). , . , , . , , . , . . : . , . (Primary Key) (Table Design). "" (OrderDetails) (Northwind) (. 2.23). " " (OrderlD) "" (ProductID), . . . , , . . "" (ProductID) "" (Products), "" (ProductID) "--" ( "" (Products) "" (OrderDetails)). . , , . "" (OrderlD) "" (ProductID) "" (OrderDetails). , : . . (Primary Key), ., . , . (Primary Key). . , : . ( ). (Primary Key), ., () . 6. . . , , , Microsoft Access (Relationships) , , (Tools, Relationships). . , , " ", "" (Customers) (. . " " ). - ,...</p>

Recommended

View more >