I am not sure what you mean when you say: "it seems like there's no way to update a component using a ZIP-file".
Usually you create your extension's package.
myextension.xml file you have:
<install type="component" version="1.5" method="upgrade">
Then later in your
myextension.xml you define your install.php file:
Then in your
install.myextension.php you write your code that you wanna run during the installation/update of your extension - do all checking about existing installation and the version of it, and conditionally run code to apply any changes - including alterations to the database tables - changes which usually you include in a
Your sql file will have your DB statements - for example:
CREATE TABLE IF NOT EXISTS `#__myextension_table` (...);
For the case of using your
INSERTs in your existing tables that already have the same values, your can modify your
INSERT sql statements to:
INSERT IGNORE INTO mytable
(pK, field1, field2)
(1, val1, val2),
(2, val3, val4),
(3, val5, val6);
INSERT IGNO will skip any items with Duplicate primary key.