1.) So this may seem like a really stupid question but is there an easy way to get your database material from your localhost to the isam server? I've been creating everything from scratch each time but it's starting to get annoying having to remake all the database stuff and type out all the fields each time, especially when the mysql monitor on isam is so unforgiving with errors. Surely there must be an easy way to transfer or edit stuff without having to go through the mysql monitor on isam.
2.) Also, I had a question about foreign key constraints. I understand that foreign key constraints add referential integrity to your database and help it avoid errors with your data. How exactly do you go about working with a foreign key constraint so that when a topic gets deleted, the deletion follows through with getting rid of all the posts within that topic?
Create database and insert rows using phpmyadmin on local host Use export feature of phpmyadmin and save as filename.sql Upload fiename.sql to paradox Import the sql file and the database and data will be created
Ex: If I have uploaded via ftp a sql file called homework.sq lthat was created via the export command in phpmyadmin to my 1059 directory I can cd to 1059 and run the following command:
mysql -h isam.sis.pitt.edu -u ug1 -p ug1 <homework.sql;
This will create my database and any rows of data I have inserted.
Part II Referential Integrity
There are two ways. When using ISAM tables, the programmer writes the commands to update/delete rows in the affected tables and checks to make sure it was done. Otherwise the tables stay the same and the user gets a message saying the command failed. Foreign keys don't do anything magical in MySql - it's the programmer. If anything foreign keys allow for the creation of SQL join statements.
If using INNODB tables there are transaction commands making sure that foreign key updates/deleted occur.
You can visually create your tables on the EER Model feature in mysqlmonitor then use forward engineer option. Edit your foreign keys and stuff before you forward engineer. You can even insert values before you do the forward and it'll include it. Copy that script.
Assuming you created a DB connection for paradox in mysqlmonitor you can just paste the script in the query window when you log into the server. Way easier than using phpmyadmin. I can provide screenshots of what I mean if you don't understand.
I hate to be replying to this now, the morning that this is due, but I am having trouble uploading this as well. I tried exporting and using the command that you gave, Bob, but I got 'ERROR 1046 (3D000) at line 29: No database selected'. Do I have to be in isam selecting the ug14 database or something? And how would i do that from here?
yes, I have that in my code. But I guess my question now is, how do I both 'use ug14;' and run the command that Bob gave? because my understanding is that in order to 'use ug14;', I need to be logged directly into the mysql/isam, but to run that command, I need to be in paradox, in the directory that my .sql file is located.