MƠ HÌNH HĨA DỮ LIỆU LOGIC:

Một phần của tài liệu Báo cáo phân tích thiết kế hệ thống thư viện (Trang 32 - 38)

PHẦN 2 THIẾT KẾ

I.3 MƠ HÌNH HĨA DỮ LIỆU LOGIC:

Đầu vào là biểu đồ lớp ở bước phân tích đối tượng, ta đưa ra bảng dữ liệu cho từng hoạt động nghiệp vụ thư viện.

I.3.1 – REGISTRATION

- User

33

Email Null Varchar[30]

Phone Null Int[15]

- Checking

Checking ID Primary key Int[10]

State Null Varchar[50]

User ID Foreign key Int[10]

I.3.2 – LOG ON

- User

User ID Primary key Varchar[10]

User Name Null Varchar[30]

User Password Not null Varchar[30] Card Number Not null Int[10]

Address Null Varchar[30]

Email Null Varchar[30]

Phone Null Int[15]

- LogOn

LogOn ID Primary key Int[10]

State Null Varchar[50]

User ID Foreign key Int[10]

I.3.3 – SEARCHING BOOK

- User

User ID Primary key Varchar[10]

User Name Null Varchar[30]

User Password Not null Varchar[30] Card Number Not null Int[10]

Address Null Varchar[30]

Email Null Varchar[30]

Phone Null Int[15]

- Book

Book ID Primary key Int[10]

Title Not null Varchar[30]

Publishing house Null Varchar[30]

Author Null Varchar[30]

- Book item

Book item ID Primary key Int[10] Book ID Foreign key Int[10]

State Null Varchar[50]

- Searching

Searching ID Primary key Int[10] User ID Foreign key Int[10] Book ID Foreign key Int[10]

I.3.4 – LENDING BOOK

- User

User ID Primary key Varchar[10]

User Name Null Varchar[30]

User Password Not null Varchar[30] Card Number Not null Int[10]

Address Null Varchar[30]

Email Null Varchar[30]

Phone Null Int[15]

- Book

Book ID Primary key Int[10]

Title Not null Varchar[30]

Publishing house Null Varchar[30]

Author Null Varchar[30]

Total books Not null Int[10] - Book item

Book item ID Primary key Int[10] Book ID Foreign key Int[10]

State Null Varchar[50]

- Lending

Lending ID Primary key Int[10] User ID Foreign key Int[10]

35 - Resevation

Resevation Book ID Primary key Int[10] User ID Foreign key Int[10] Book ID Foreign key Int[10] Resevation Book Date Not null Date[15] Due date Not null Date[15]

State Null Varchar[50]

I.3.5 – RESEVING BOOK

- User

User ID Primary key Varchar[10]

User Name Null Varchar[30]

User Password Not null Varchar[30] Card Number Not null Int[10]

Address Null Varchar[30]

Email Null Varchar[30]

Phone Null Int[15]

- Book

Book ID Primary key Int[10]

Title Not null Varchar[30]

Publisher Null Varchar[30]

Author Null Varchar[30]

Total books Not null Int[10] - Book item

Book item ID Primary key Int[10] Book ID Foreign key Int[10]

State Null Varchar[50]

- Resevation Book

Resevation Book ID Primary key Int[10] User ID Foreign key Int[10] Book ID Foreign key Int[10] Resevation Book Date Not null Date[15] Due date Not null Date[15]

I.3.6 – RETURNING BOOK

- User

User ID Primary key Varchar[10]

User Name Null Varchar[30]

User Password Not null Varchar[30] Card Number Not null Int[10]

Address Null Varchar[30]

Email Null Varchar[30]

Phone Null Int[15]

- Book

Book ID Primary key Int[10]

Title Not null Varchar[30]

Publisher Null Varchar[30]

Author Null Varchar[30]

Total books Not null Int[10] - Book item

Book item ID Primary key Int[10] Book ID Foreign key Int[10]

State Null Varchar[50]

- Lending

Lending ID Primary key Int[10] User ID Foreign key Int[10] Book item ID Foreign key Int[10] Lending Date Null Date[15]

Due date null Date[15]

- Returning

Returning ID Primary key Int[10] User ID Foreign key Int[10] Book item ID Foreign key Int[10] Returning date Null Date[15]

37 Book ID Primary key Int[10]

Title Not null Varchar[30]

Publishing house Null Varchar[30]

Author Null Varchar[30]

Total books Not null Int[10] - Book item

Book item ID Primary key Int[10] Book ID Foreign key Int[10]

State Null Varchar[50]

- Returning book

Returning ID Primary key Int[10] User ID Foreign key Int[10] Book item ID Foreign key Int[10] Returning date Null Date[15]

State Null Varchar[50]

- Librarian

Librarian ID Primary key Int[10] Librarian Name Not null Varchar[20] Card Number Not null Int[10]

Address Null Varchar[30]

Email Null Varchar[30]

Level Null Varchar[30]

- Lending

Lending ID Primary key Int[10] User ID Foreign key Int[10] Book item ID Foreign key Int[10] Lending Date Null Date[15]

Due date null Date[15]

- Update Data

TimeUpdate Primary key Date[15] Librarian ID Foreign key Int[10]

I.3.8 – CHECKING USAGE STATUS

- User

User ID Primary key Varchar[10]

User Name Null Varchar[30]

User Password Not null Varchar[30] Card Number Not null Int[10]

Address Null Varchar[30]

Email Null Varchar[30]

Phone Null Int[15]

- Book

Book ID Primary key Int[10]

Title Not null Varchar[30]

Publishing house Null Varchar[30]

Author Null Varchar[30]

Total books Not null Int[10] - Book item

Book item ID Primary key Int[10] Book ID Foreign key Int[10]

State Null Varchar[50]

- Lending

Lending ID Primary key Int[10] User ID Foreign key Int[10] Book item ID Foreign key Int[10] Lending Date Null Date[15]

Due date null Date[15]

- Returning

Returning ID Primary key Int[10] User ID Foreign key Int[10] Book item ID Foreign key Int[10] Returning date Null Date[10]

State Null Varchar[50]

- Checking Status

TimeChecking Primary key Date[10] User ID Foreign key Int[10] ResultChecking Null Varchar[50]

Một phần của tài liệu Báo cáo phân tích thiết kế hệ thống thư viện (Trang 32 - 38)

Tải bản đầy đủ (PDF)

(86 trang)