Re: Some help with schema
> a comma separated value (is that a good idea)
No. Build another table to provide the many-to-many relationship.
> PARTITION BY HASH() PARTITIONS 101;
Why? I ask because it is very unlikely to provide any benefit to you.
> CREATE USER 'cldb_serviceuser' IDENTIFIED BY
Please don't expose passwords to the world.
> SET NEW.imagehash = md5(NEW.imageblob);
Some reason for having a TRIGGER instead of doing this in the INSERT?
If you are going to de-dup the images using imagehash, then add INDEX(imagehash).
I think you will find that including the table name in each column name is tedious and unnecessary.
> `imageblob` BLOB NOT NULL,
That's a 64KB limit; is that ok?
> CONSTRAINT `imageId` FOREIGN KEY (`imageId`) REFERENCES `a0`.`a0` (`postID`)
Won't work if you have many-to-many. (I prefer to avoid FOREIGN KEYs and put the checks in the application code.)
Is `b0` the same as `ImageData`?
Subject
Written By
Posted
Re: Some help with schema
July 05, 2014 12:53PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.