Access không phải là môi trường nhiều người dùng

  • Thread starter luongvanluyen
  • Ngày gửi
L

luongvanluyen

Guest
2/9/05
27
0
0
HCM CITY
Thưa các bạn,
Tôi có một câu hỏi như thế này: Access tôi nghe nói là chỉ sử dụng trong môi trường một người dùng thì phải? Chứ không thể giống SQL Server?
Vậy thì khi tôi viết một ứng dụng, thì cùng một lúc chỉ một người dùng?!

LVL
 
Khóa học Quản trị dòng tiền
M

MINA

Quảng cáo/Tài Trợ
Thành viên BQT
Quản lý cao cấp
12/11/03
4,030
410
83
46
Ninh Thuận
Hình như bạn sai thì phải, công ty của Mina thấy viết ra nguyên cả phòng kinh doanh dùng, người nào cũng có thể nhập liệu hoặc trích xuất dữ liệu cả.....
 
paulsteigel

paulsteigel

Trung cấp
13/11/05
103
0
16
48
Hoà Bình
www.sfdp.net
Bạn cần phân biệt rõ mới được:
+ Access với quan điểm là một ứng dụng lập trình thì nó giống hệt các ứng dụng khác.
+ Trên khía cạnh là một tổ chức cơ sở dữ liệu mdb thì nó phụ thuộc vào kiểu kết nối khai thác dữ liệu hay là DataEngine ví dụ ODBC và cách bạn thiết lập kiểu kết nối dữ liệu. Cùng với 1 csdl mdb bạn vẫn có thể cho phép nhiều người cùng sử dụng.
Tuy nhiên, điểm khác biệt quan trọng ở đây so với SQL server đó là: SQL server là ứng dụng quản lý và cho phép khai thác dữ liệu dựa trên nền TCP/IP, mạng diện rộng và hỗ trợ quy mô công nghiệp, quản lý được những CSDL có quy mô lớn mà vẫn ổn định trong khi đó mặc dù về lý thuyết là mdb cũng có thể hỗ trợ các CSDL lớn nhưng khi kích thước tăng lên, độ ổn định càng giảm.
 
L

luongvanluyen

Guest
2/9/05
27
0
0
HCM CITY
paulsteigel nói:
Bạn cần phân biệt rõ mới được:
trong khi đó mặc dù về lý thuyết là mdb cũng có thể hỗ trợ các CSDL lớn nhưng khi kích thước tăng lên, độ ổn định càng giảm.
Bạn có thể giải thích rỏ hơn được không?
LVL
 
paulsteigel

paulsteigel

Trung cấp
13/11/05
103
0
16
48
Hoà Bình
www.sfdp.net
Bạn có thể đọc qua phần nêu về các giới hạn của cơ sở dữ liệu mdb trong phần trợ giúp của MS Access. Tiện đây tôi trích dẫn một số thông tin cơ bản:
Về CSDL Mdb - tất nhiên mde cũng sẽ tương tự nếu mde được dùng để lưu trữ dữ liệu:
Kích thước tối đa của một cơ sở dữ liệu mdb là 2 GB +/- phần dành cho các đối tượng hệ thống của CSDL
Số lượng tối đa các đối tượng trong một CSDL là: 32,768.
Số modules tối đa là: 1,000 (bao gồm báo cáo, form với thuốc tính Hasmodule là True)
Tên đối tượng dài nhất là 64 ký tự
Mật khẩu dài nhất là 14
Tên nhóm dài nhất là 24
Số lượng người dùng đồng thời là 255.
Ngoài ra còn nhiều giới hạn khác làm cho các nhà phát triển thấy buồn lòng nên họ coi Mdb dùng cho môi truơng quy mô nhỏ - nhưng điều đó không có nghĩa là chỉ cho 1 người dùng.
 
L

luongvanluyen

Guest
2/9/05
27
0
0
HCM CITY
To: paulsteigel,
Cám ơn bạn nhiều. Nếu vậy làm sao mình kết hợp Excel + (Access, SQL,...). Nếu tôi dùng ADO thì có tốt không?
LVL
 
hai2hai

hai2hai

VNUNI Makes a difference
29/4/04
2,032
125
63
50
Hà nội
vnuni.net
luongvanluyen nói:
To: paulsteigel,
Cám ơn bạn nhiều. Nếu vậy làm sao mình kết hợp Excel + (Access, SQL,...). Nếu tôi dùng ADO thì có tốt không?
LVL

Ủa, sao lại ko tốt? Được quá đi chứ!
Có nhiều cách làm việc kiểu multi-users cho 1 MS Access Database qua Local network (dĩ nhiên multi-users trên 1 PC thì ko có ý nghĩa gì rồi). Thường thì mình dùng theo kiểu Attach table (và quan trọng là phải manage cái file attach link này 1 cách chặt chẽ). Tuy nhiên hạn chế ở đây chính là bạn phải share full thư mục của file MDB dùng chung đó (có thể share theo từng user trong domain cho nó bảo mật) thì các users ở các máy khác mới có thể truy cập full access được. Access (MDB), Excel (XLS), DBF, txt, hay bất cứ flat files nào khác thì đó là Desktop Database chứ ko phải kiểu Client/Server Database như MS SQL, MySQL, Oracle, DB2, Infomix, v.v...

1 điều quan trọng đối với việc multi-user là phải quản lý ở mức ứng dụng. Bạn cần chú ý trong việc phân quyền của người dùng. Trong trường hợp 2 người có cùng quyền truy cập bản ghi chẳng hạn là phải quản lý theo từng session của user. V/đề này thì bạn có thể thiết kế component quản lý user (mà mình hay gọi là user management component trong các ứng dụng của mình)

Enjoy programing!
 
P

phanxuanthuong

Guest
15/11/05
10
0
0
53
Viet Nam
luongvanluyen nói:
Thưa các bạn,
Tôi có một câu hỏi như thế này: Access tôi nghe nói là chỉ sử dụng trong môi trường một người dùng thì phải? Chứ không thể giống SQL Server?
Vậy thì khi tôi viết một ứng dụng, thì cùng một lúc chỉ một người dùng?!

LVL

Dùng được cho nhiều người, việc này được thực hiện thông qua Link Table.
 
T

thidinh

Guest
26/3/06
9
0
0
BD
Source: http://msdn.microsoft.com/archive/d...e97/html/themicrosoftaccessmultiusermodel.asp
The Microsoft Access Multiuser Model
To make your application available to multiple users, do one of the following:
• Place the entire application on a network server and allow multiple users to open the database. With this strategy, users share all the database objects that make up your application, including the tables it uses to store data.
• Split your application into two databases: a back-end database that contains your applications tables, and a front-end database that contains your applications other objectsits queries, forms, reports, macros, and modules. Then, place the back-end database on a network server and distribute the front-end database to your users. Base the objects in your front-end database on linked tables from the back-end database. This strategy keeps the data separate from the other objects in your application and reduces network traffic.
See Also For more information on splitting your application into a front-end database and a back-end database, see Separating Your Applications Tables from Its Other Objects in Chapter 15, Delivering Your Application. For information on linking tables, search the Help index for linked tables.
A Microsoft Access multiuser application consists of several important components. In addition to Microsoft Access itself and your applications front-end and back-end database (.mdb) files, your multiuser application must have:
• A workgroup information (.mdw) file, which resides either on the network server or on each users workstation.
• A locking information (.ldb) file for each database; this file resides in the same folder as the database.
The Workgroup Information File
The workgroup information (.mdw) file is a Microsoft Access database that stores information about users in a workgroup, including their account names, their passwords, and the groups that they belong to.
The location of the workgroup information file in multiuser environments is important. It can either be placed on each local workstation or shared on a network server. However, if its stored locally, you must take the steps necessary to update it when security settings change.
The workgroup information file also stores a list of the most recently used databases. If you want your applications users to have their own lists of the most recently used databases, you should either store the workgroup information file on the users local workstations or establish user-level security.
See Also For information on establishing user-level security, see Chapter 14, Securing Your Application.
The Locking Information File
The locking information (.ldb) file stores information about any records that are currently locked in the database.
If the locking information file doesnt exist when the database is opened, the Microsoft Jet database engine creates it. It creates one locking information file for every Microsoft Access database file that is opened in shared mode. Microsoft Jet gives the file the same name as the database that was opened, but with an .ldb file name extension. For example, Northwind.mdb has an associated locking information file called Northwind.ldb. The locking information file is stored in the same folder as the database. Microsoft Jet deletes the .ldb file when the database is closed. In a multiuser setting, this is when all users have exited the application.
 
Sửa lần cuối:

Xem nhiều

Webketoan Zalo OA