Danh mục tài liệu

Cơ sở dữ liệu căn bản - Bài 4

Số trang: 37      Loại file: ppt      Dung lượng: 416.00 KB      Lượt xem: 17      Lượt tải: 0    
Xem trước 4 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

QuảnlýbảngtrongSQL Server Phần4.MụctiêucủachươngTìmhiểutừngbướcđểtạolậpCSDL TìmhiểucáckiểudữliệukhácnhautrongSQL Server
Nội dung trích xuất từ tài liệu:
Cơ sở dữ liệu căn bản - Bài 4QuảnlýbảngtrongSQLServer Phần4 Mụctiêucủachương TìmhiểutừngbướcđểtạolậpCSDL TìmhiểucáckiểudữliệukhácnhautrongSQL Server Địnhnghĩacácràngbuộctoànvẹntrênthựcthểvà giảithíchtínhcầnthiếtcủacácràngbuộc Tìmhiểucáchcậpnhậtvàxoámộtbảngbằngcách sửdụngTSQLvàEnterpriseManager Tìmhiểucáckháiniệmliênquantớicácràngbuộc vàcáckiểuràngbuộc Concepts of RDBMS and SQL Server 2000/Session 4/ 2 of 37 CSDLvàbảng CSDL quản lý đặt vé máy bay Chi tiết chỗ đặt trướcHành khách về chuyến bay Concepts of RDBMS and SQL Server 2000/Session 4/ 3 of 37 Thiếtkếcácbảng trongSQLServer Cácbảngcầnthiết  Kiểudữliệutrongmỗibảng  Giớihạntrêndữliệu  Khoá  Giátrịmặcđịnh  chỉmục  Giátrịrỗng(Null) Chuẩnhoálàquátrìnhloạibỏcácthôngtindưthừatrêndữliệu. Concepts of RDBMS and SQL Server 2000/Session 4/ 4 of 37Cácđặcđiểmcủasựchuẩn hoáCSDL Concepts of RDBMS and SQL Server 2000/Session 4/ 5 of 37Khinàochúngtacầnchuẩnhoá?? Concepts of RDBMS and SQL Server 2000/Session 4/ 6 of 37Tạolậpcácbảngbằng cáchsửdụngTSQL Concepts of RDBMS and SQL Server 2000/Session 4/ 7 of 37 Tạolậpcácbảngbằngcách sửdụngEnterpriseManager1ChúngtacóthểtạolậpmộtbảngmớivớiEnterpriseManagerbằngcáchlựachọnCSDLvàsauđóchọnvàotuỳchọnAction, Concepts of RDBMS and SQL ServerNewvàTable. 2000/Session 4/ 8 of 37 Tạolậpcácbảngbằngcách sửdụngEnterpriseManager2KhichọnvàotuỳchọnTable,cửasổthiếtkếxuấthiệntạiđóchúngtacóthểthiếtkếcấutrúcbảng. Concepts of RDBMS and SQL Server 2000/Session 4/ 9 of 37Kiểudữliệu Binary, varbinary, Numeric, Decimal, float, realConcepts of RDBMS and SQL Server2000/Session 4/ 10 of 37Cáckiểudữliệucủahệthống Concepts of RDBMS and SQL Server 2000/Session 4/ 11 of 37 Tínhtoànvẹndữliệu(1) ToànvẹndữliệuĐộtincậy Độchínhxác Concepts of RDBMS and SQL Server 2000/Session 4/ 12 of 37 Tínhtoànvẹndữliệu(2) Ràng buộc Ràng buộc Thực thể tham chiếu Ràng buộc dữ liệuRàng buộc miền Ràng buộc người dùng định nghĩa Concepts of RDBMS and SQL Server 2000/Session 4/ 13 of 37Toànvẹnthựcthể Concepts of RDBMS and SQL Server 2000/Session 4/ 14 of 37Toànvẹnmiền Concepts of RDBMS and SQL Server 2000/Session 4/ 15 of 37Toànvẹnthamchiếu Concepts of RDBMS and SQL Server 2000/Session 4/ 16 of 37 ToànvẹnthamchiếuSửdụngràngbuộckhoáchínhvàràngbuộckhoá If item If item Child Not Foundngoại Not Found iinParent Thêm n Parent Bảnghi If Child results in If Child results in Parent Orphan Records Orphan Records Xoá Concepts of RDBMS and SQL Server 2000/Session 4/ 17 of 37Cáccôngcụthựchiệntoàn vẹndữliệu Concepts of RDBMS and SQL Server 2000/Session 4/ 18 of 37 Cáccôngcụràngbuộc thựcthểSQLServer2000cungcấpbacơchếđể thựchiệntoànvẹnThựcthể Ràngbuộckhoáchính  Ràngbuộcduynhất  Thuộctínhđịnhdanh  Concepts of RDBMS and SQL Server 2000/Session 4/ 19 of 37 Xácđịnhkhoáchính Employee TableKhoá dự tuyển Khoá dự tuyển Khoá dự tuyển Employee No Employee Name Social Security No Grade E001 John K3450 A E002 Smith H7832 B E003 Mary I56741 A E004 Lisa J45322 C Concepts of RDBMS and SQL Server 2000/Session 4/ 20 of 37 ...