190 likes | 294 Vues
Learn how to share data online without a web application using Access with ODBC. Use PHP to build web interfaces around Access. Discover the affordability of MySQL as an open-source solution. Utilize ODBC for universal program compatibility.
E N D
Access en MySql Ynte Jan Kuindersma, BIRD Automation Nationale Officedag 2009EDE, 14 Oktober 2009
Hoe en wat • Gegevens delen via internet zonder een webapplicatie te programmeren • Access als frontend via ODBC • Je kunt er ook een webinterface omheen bouwen • PHP • MySql is open source en daarmee erg betaalbaar • ODBC is standaard technologie dus vrijwel alle programma’s kunnen er mee overweg • Je moet wel internettoegang hebben
Beheer via webinterface • Tabellen/velden/indexen/sleutels • Gegevens via sql-commando’s • Export en import
Client software • MySql query explorer • Apart downloaden • Acces / Word / Outlook / Excel
ODBC-connectie maken • Download en installeer mysql-connector-odbc-5.1.5-win32.MSI • http://dev.mysql.com/downloads/#connector-odbc • Start ODBC-beheer • Start -> Configuration -> Administrative tools -> Datasources… • Koppel tabellen aan Access via Bestand -> Externe gegevens..
Access tabellen uploaden • Vanuit Access kunnen tabellen ook worden geupload naar de server • Structuur en data worden getransporteerd! • Rechts klikken op Tabel en dan “Exporteren” • Nabewerking op mysql via webinterface: • Sleutelveld • Auto_increment
Access frontend maken • Je kunt verder werken zoals je dat gewend bent in Access • Queries • Formulieren • Macros / VBA • Rapporten
Referentiële integriteit bij het maken van een tabel via SQL (webinterface) • CREATE TABLE employees ( employeeID int(10) NOT NULL auto_increment, employeeName varchar(50) NOT NULL, isManager tinyint(1) NOT NULL DEFAULT 0, managerID int(10) NOT NULL, PRIMARY KEY (employeeID), FOREIGN KEY (managerID) REFERENCES employees (employeeID) ON DELETE RESTRICT ) ENGINE=InnoDB;
Referentiële integriteit bij het achteraf via SQL • InnoDB allows you to add a new foreign key constraint to a table by using ALTER TABLE: • ALTER TABLE tbl_name ADD [CONSTRAINT [symbol]] FOREIGN KEY [index_name] (index_col_name, ...) REFERENCES tbl_name (index_col_name,...) [ON DELETE reference_option] [ON UPDATE reference_option]
Hyperlinks • MySql homepagehttp://www.mysql.com • Programma voor op je eigen PChttp://dev.mysql.com/downloads/ • Online database bij een hoster?http://www.vevida.nl/NL/hosting_pakketten.asp • ODBC-driver voor koppeling met MS Officehttp://dev.mysql.com/downloads/#connector-odbc • http://nl.wikipedia.org/wiki/MySQL