Skip to content Skip to navigation

Connexions

You are here: Home » Content » 2_Baitapmau

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the author

Recently Viewed

This feature requires Javascript to be enabled.

2_Baitapmau

Module by: Thu Nguyen

Summary: bai tap mau chuong 2

BÀI TẬP CHƯƠNG 2_TABLE:

Câu 1: Tạo một cơ sở dữ liệu chứa 3 table có nội dung như hình sau:

Yêu cầu:

• Tên cơ sở dữ liệu là DIEM08.MDB

• Tự xác định cấu trúc các table căn cứ vào dữ liệu chứa trong đó

• Qui định khóa chính cho các table như sau:

Table: Khóa chính:

DanhSach SoBD

DiemThi SoBD

ChiTietDT DTDuThi

Figure 1
Figure 1 (graphics1.png)
Figure 2
Figure 2 (graphics2.png)
Figure 3
Figure 3 (graphics3.png)

Hướng dẫn Câu 1:

Bước 1: Khởi động Access:

  • Cách 1: Nhắp Start-> Programs-> Microsoft office-> Microsoft Office Access 2003
  • Cách 2: Nhắp vào biểu tượng
    Figure 4
    Figure 4 (graphics4.png)
    trên thanh Microsoft Office.

Figure 5
Figure 5 (graphics5.png)
Bước 2: Chọn Blank Database

  • Trong khung Save in: chọn ổ đĩa chứa CSDL (ví dụ: D:)
  • File name : gõ tên file CSDL: (Diem08)
  • Nhắp
    Figure 6
    Figure 6 (graphics6.png)
Figure 7
Figure 7 (graphics7.png)

Figure 8
Figure 8 (graphics8.png)
Bước 3: Chọn lớp Table, nhắp
Figure 9
Figure 9 (graphics9.png)
-> chọn Design View-> OK

Bước 4: Tạo table Danhsach:

Figure 10
Figure 10 (graphics10.png)

- Chọn SoBD, nhắp

Figure 11
Figure 11 (graphics11.png)
đặt khóa chính

Figure 12
Figure 12 (graphics12.png)

-Nhắp lưu lại cấu trúc table

Figure 13
Figure 13 (graphics13.png)
  • Đặt tên table và nhắp 0K

Bước 5: Tại cửa sổ CSDL, nhắp chọn table danh sách, nhắp Open để nhập dữ liệu.

Figure 14
Figure 14 (graphics14.png)

Bước 6: Tương tự, lặp lại Bước 4 và 5 Tạo table Diemthi, ChitietDT.

Cấu trúc như sau:

Figure 15
Figure 15 (graphics15.png)

Figure 16
Figure 16 (graphics16.png)

Câu 2: Thiết lập quan hệ giữa các table theo sơ đồ quan hệ sau:

DanhSach ( SoBD, 1 ) -> DiemThi ( SoBD, 1 )

Figure 17
Figure 17 (graphics17.png)
ChiTietDT ( DTDuThi,1 ) -> DanhSach ( DTDuThi, n )

Hướng dẫn câu 2:

  • Bước 1: nhắp menu Tools/ Relationships ( hoặc nhắp
    Figure 18
    Figure 18 (graphics18.png)
    )
  • Figure 19
    Figure 19 (graphics19.png)
  • Bước 2: Chọn các table cần tạo quan hệ, nhắp nút
    Figure 20
    Figure 20 (graphics20.png)
    . Sau khi chọn xong nhắp
    Figure 21
    Figure 21 (graphics21.png)
Figure 22
Figure 22 (graphics22.png)
  • Bước 3: Chọn field SoBD của Table Danhsach, bấm giữ nút trái chuột và kéo lên filed SoBDTable DiemThi. Xuất hiện hộp thoại:

Bước 4Chọn

Figure 23
Figure 23 (.png)

- Bước 5: Nhắp

Figure 24
Figure 24 (graphics23.png)
. Nhắp
Figure 25
Figure 25 (graphics24.png)

  • Bước 6 Tương tự, Chọn field ChitietDT của Table ChitietDT, bấm giữ nút trái chuột và kéo lên filed quan hệ của Table Danhsach -> Lặp lại Bước 4 và 5.
  • Bước 7: nhắp Save để lưu lại quan hệ.

Comments, questions, feedback, criticisms?

Send feedback