160 likes | 346 Views
Splitting a Database: How and Why. Roger Smeaton. CONTENTS. Splitting a database - what is it? Why do it? How is it done?. One-file architecture. Access database Tables Relationships Forms Queries Reports Macros Modules (VBA code). Only one database file, has it all!.
E N D
Splitting a Database: How and Why Roger Smeaton
CONTENTS • Splitting a database - what is it? • Why do it? • How is it done?
One-file architecture Access database • Tables • Relationships • Forms • Queries • Reports • Macros • Modules (VBA code) Only one database file, has it all!
Two-file architecture • Front-end (application) – the user interface • Back-end – the data
FormsQueriesReportsMacrosModules (VBA code) Tables Relationships Front-end Back-end
Each user gets their own copy One shared copy, on the server Front-end Back-end
Why split a database ? Separates data (back-end) fromapplication (front-end). Developer can make changes to the application without disturbing the data or the users.
Why split a database ? 2. Able to create temporary tables in the front-end. Stores intermediate results, run-time parameters, etc.
Why split a database ? 3. Performance. Each user has a copy of the user interface (in the front-end), so network traffic is reduced.
Do I have to split? • Not necessary to split if • front-end is stable (no changes) and • single user and • network overhead is not a problem
When to split • After you have designed your tables, relationships, forms, etc. but before you release the software to the users.
How to split a database • OPTION 1 – use the Database Splitter wizard Open the file. From the Tools menu, Database Utilities Database Splitter and follow the directions. • OPTION 2 – do it manually[details omitted]
After you split … • Compact the front-end file • How? From the Tools menu, select Database Utilities Compact and Repair Database
DEMO Access database Northwind.mdb
Ready to deploy the database? • Copy the back-end to a shared network device. • Re-link the tables in the front-end. (Why? To point to the actual data tables in their new location) • Copy the front-end to each user’s PC. Not mandatory but strongly recommended
Re-linking • Once you have linked to the tables in the back-end, you can use the Linked Table Manager to re-link. • How? From the Tools menu, select Database Utilities Linked Table Manager