RDBMS Checks
I mean: which RDBMS
1) allows to declare that relationship is in fact 1-1, and
2) protests when one tries to violate the 1-1 relationship,
that is inserts into a table two records with the same
foreign key?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
MySQL An RDBMS
I remember a colleague telling me that relationships could not be defined and enforced within MySQL, making it necessary to do so manually in PHP code. Fundamentally, the difference between a DBMS and an RDBMS is the ability to define and enforce relationships between related tables. So, is MySQL an RDBMS? That would imply my colleague is in error and I will need to correct him.
Scribe Report Generator For MySQL And Other RDBMS
We are looking for beta-testers for our new product - Scribe Report Generator. At this moment, Scribe supports 6 relational databases, including Oracle, MS SQL Server 2000, and Sybase. Very briefly: Scribe is written in Java, is based on visual programming and can be extended by adding user-written Java classes; it comes with the API library to let other Java-based apps run Scribe reports programmatically. The details are on our website: www.gestalt.com/Scribe (temporary location). User: guest Password: star We offer a free license to everyone who provides us with a feedback on bugs, inconsistencies, or constructive criticism that helps us refine Scribe.
Group With Two Date Checks
please accept apologies - post edited 23:19. Query below successfully groups for records having greater than 1 results while joining to a State table: State.StateAbbr | State.StateTerm posting table: JPosts2.JID | JPosts2.JState | JPosts2.Class runtime table: JRun.JRID | JRun.FK_JobID | JRun.StartRun | JRun.EndRun SELECT JPosts2.JID, JRun.StartRun, JRun.EndRun, JRun.JRID,StateTerm, COUNT(JState) FROM JPosts2 INNER JOIN State ON State.StateAbbr=JPosts2.JState INNER JOIN JRun ON JRun.FK_JobID =JPosts2.JobID AND `JClass` = 'Mechanics' GROUP StateTerm HAVING count(JState) > 1 ORDER BY JState ------------------------------------------ QUESTION: Can the query be coaxed to return results for the same JState where there are both: at least >0 expired and at least > 0 current date checks grouped by StateTerm for the given JClass? ...JRun.JRID =(SELECT max(JRun.JRID) from JRun WHERE JRun.FK_JobID = JID) AND (CURRENT_DATE () > DATE_ADD(JRun.EndRun,INTERVAL 18 DAY)) // expired ...JRun.JRID =(SELECT max(JRun.JRID) from JobRun WHERE JRun.FK_JobID = JID) AND JRun.StartRun BETWEEN DATE_SUB(JRun.EndRun,INTERVAL 18 DAY) AND CURRENT_DATE //current
Turning Off Foreign Key Checks
Is it possible to temporarily turn off foreign key checks in a db? I know how to do it from the mysql prompt but I have a number of scripts using Java, etc which seem to be breaking because of the table ordering with respect to foreign keys does not seem to be honored (tables with FKs are declared before the tables the keys refer to). If there was some way to turn off checking for a db, run all the creation and import scripts I have, then turn the checking back on it would save a ton of effort.
Testing The Database? Backing Up, General Checks
I want to know what else I can be doing to check the stability of our database. Currently what I do every evening is download the complete database through PHPMyAdmin on our dedicated server, once downloaded I start up the Wamp Server and import the database locally through PHPMyAdmin on my own machine. The next thing I do is run the Check Tables command on all the tables to see if everything is where it is. It always comes back as OK on each table so I presume everything is ok? Is there anything else I should be doing, or is what I am doing correct? Every so often we delete auctions to free up space in the database. Once this is done we have overhead in the tables. Sometimes this can be 2-10mb, so what I do then is run the optimise command on the tables, again am I correct in doing this? Finally our database is now over 40mb, to me this massive as the largest database I have worked on before has been 4mb, please dont laugh. What sort of database sizes have you seen in MySql or are you running at present? What is MySql like in the long run stability wise. If looked after can we get many years of good service from it.
|