Forum Replies Created
-
AuthorPosts
-
peterlaursen
ParticipantThere is a help file included with the program!
Accessible from the 'help'-menu
Isn't that what you are looking for ?
We also have a FAQ at http://www.webyog.com/faq
But please note that all this is help for the SQLyog program as such
– not for MySQL, or database design or SQL in general.
peterlaursen
Participantwell .. this is basically how a Foreign Key is supposed to work! A Foreign Key also is a CONSTRAINT. Data in the child table are constrainted to/restricted to being valid with data in the parent table.
A Foreign Key is an index where the index in being built with data from another table – You cannot use a NULL value is an Foreign Key. Also NULL is nothing – it is not zero! That is why you get the error 'Can't update …' – because there is nothing (that is what NULL means) to update with.
Further you define genre_id SMALLINT NOT NULL PRIMARY KEY and write and i leave the field genre_id blank (it can be null). Is not that a contracition?
I believe that you must define a certain value for album_id, artist_id and genre_id having the meaning of 'unknown/undecided'. That can be O (zero) -1 or anything.
I also hope you understand that the question(s) you are asking are not SQLyog-related questions – but general MySQL/database design/SQL questions. As such they should probably have been in 'MySQL Server' category. Just for perfectness! But that is OK
However there a other places to ask database design questions where you will probably get more response.
However Cal is here now I see …
peterlaursen
ParticipantQuote:Strange, in the help, under version history, march 2003, it says …well yes it is possible to do so. But if I understand your example correctly (it is a little bit different to have your table schema in my head because of the language. It would be easier if I understood the words) you are indexing a column to itself. And I don't think that makes much sense.
I don't understand why you can't use 0 (zero) or -1 instead of NULL, if using NULL is a problem? You probabably know the difference of 0 and NULL? I apologize if it is trivial to you.
But I also don't think I have understood your 'project' very well. In broad terms, yes, but the correlation between the data, the table design and the queries that you need to do, no. Hopefully someone will understand better than I.
peterlaursen
ParticipantI can confirm.
Just copied a table from 5.0.18 to 3.23.58.
peterlaursen
ParticipantBTW: what is a 'defination' ?
peterlaursen
Participanthttp://www.webyog.com/faq/5_20_en.html says:
Quote:It will add an 'auto-completion' feature for easy entering of datait is probably 3-4 weeks to go for a functional beta
But I don't know exactly what the feature is going to be like. Ritesh told me recently that they almost finished coding that feature. So maybe he could comment on it ?
peterlaursen
ParticipantI think you should use 0 (zero) or maybe -1 or -99 for 'father unknown' and not NULL. NULL means 'no data availabale' or 'not decided yet'. And 'father unknown' is 'SOME data'
And this
Quote:So it is a foreign key to the same tablewon't work! A foreign key is FOREIGN – that means from outside the table.
In principle you'll need only one table for this. Could be like
Code:CREATE TABLE `birds` ( Â Â Â Â Â Â Â Â Â Â Â
     `id` bigint(20) NOT NULL auto_increment, Â
     `father_id` bigint(20) default NULL,   Â
     `name` varchar(50) default NULL,     Â
     `comment` varchar(255) default NULL,   Â
     PRIMARY KEY  (`id`),           Â
     KEY `father_id` (`father_id`)      Â
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ÂYou could also let farther_id be defined like
Code:`father_id` bigint(20) default '-1'You may even have more code like:
-1 meaning 'unknown father own breed'
-2 meaning 'unknown father from breeeder DONALD DUCK
-3 meaning 'unknown father from breeeder MICKEY MOUSE
-99 meaning 'unknown father from unknown breeeder
… though a breeder table here probably would be better!Â
But you can also create a seperate table for all birds being fathers. They will then occur in both tables. The father table will be very simple – having only an ID and a NAME field. Much depends on how complicated queries you'll need to do.
Also see attached!
peterlaursen
Participantresearched a little bit on PLAIN AUTHENTICATION
http://www.google.com/search?client=opera&…=utf-8&oe=utf-8
“”The mechanism consists of a single message from the client to the server. The client sends the authorization identity (identity to login as), followed by a US-ASCII NULL character, followed by the authentication identity (identity whose password will be used), followed by a US-ASCII NULL character, followed by the clear-text password. The client may leave the authorization identity empty to indicate that it is the same as the authentication identity.”
In other words, the correct form of the AUTH PLAIN value is 'authiduseridpasswd' where '' is the null byte.”
peterlaursen
ParticipantI don't understand this. Could you explain somewhat more in detail, what is the exact nature of the problem. Do you get some error messages, or what kind of problem arises.
Also please observe that a 'reproducable test case' preferably reduces the complexity of the problem. Would it not be sufficent for the 'test case' to have the two colums
Code:`vader_id` int(11) default NULL
`moeder_id` int(11) default NULLhaving FK's ??
You are asking a MySQL question not a SQLyog question, so please observe that you will have to prepare things to be easy to get started with for people interesting in supporting this.
peterlaursen
ParticipantI now tested the (non-public) beta2 on two different Windows and one linux/WINE.
There is no memory build-up.
I aso don't have this request for re-registration on neither of these 3 systems.
peterlaursen
Participantconfirmed!
According to this MySQL doc http://dev.mysql.com/doc/refman/4.1/en/alter-table.html comments should be legal with 3.23, 4.0 and 4.1. However it does not work.
If you execute this SQL
Code:alter table `test`.`t1` change `id` `id` bigint (20) NOT NULL AUTO_INCREMENT COMMENT '1test1', change `t` `t` varchar (50) NULL COMMENT '2test2'you will get the same error. So probably it is a bug with the MySQL docs (they recently 'merged' 3.23 , 4.0 and 4.1 docs and probably forgot something!) Sqlyog CREATE TABLE and ALTER TABLE does not have GUI support for comments with MySQL 3.23 either and this is coded bfore the new docs were written.
So I does not look like 3.23 supports comments.
It is a pretty new thing that SQLyog let's you use 'copy table' across versions at all and it is not unproblematic – not with MySQL 5.1 either – because of changed TABLE syntax across versions.
You can export and import. The export file only includes the 'comment' keyword when there really IS a comment. Probably the 'copy table' should do the same. But the bug leads back to a bug in the MySQL docs I believe. The 'copy table' code is correct according to the official MySQL docs as of now!
Let Ritesh COMMENT on it tommorrow!
peterlaursen
ParticipantBut I just will add that if the system tables with your MySQL originate from an older MySQL version and not have been updated correctly, you can expect all sorts of errors.
peterlaursen
ParticipantThen have a look here:
Code:/*
SQLyog Enterprise – MySQL GUI v5.02 BETA
Host – 5.0.18-nt-max : Database – test3
*********************************************************************
Server version : 5.0.18-nt-max
*/create database if not exists `test3`;
USE `test3`;
/*Table structure for table `test-dev` */
DROP TABLE IF EXISTS `test-dev`;
CREATE TABLE `test-dev` (
`id` bigint(20) NOT NULL auto_increment,
`t` varchar(50) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;/*Data for the table `test-dev` */
insert into `test-dev` values (1,'x');
insert into `test-dev` values (2,'y');
insert into `test-dev` values (3,'z');I have no problems in exporting a database with such a table name.
I asked you some questions but you are not very informative. So I am not very helpful!
peterlaursen
ParticipantCode:since doing this i cant export a development database i have from sqlyog.You don't have a database from SQLyog! You have a database from another MySQL version. Which version ?
How did you import the data the the new MySQL ? Did you just copy the /datadir ? Did you remember to run the update script(s)?
Can you show table definitions from objects-tab ? let us see it !
I
peterlaursen
ParticipantYes .. of course that too.
If network protocol never was installed you can't connect with TCP as SQLyog does!
-
AuthorPosts