Reputation: 23
I am creating the object lookup table and not sure what exactly to call an object. This is a social network. I know items like photo, video, status etc are objects but what about account settings, mail folders, mail attachments, error messages, etc? Some things like "Tags" is that an object by itself or only when we combine it with Photo tag, Video tag, Peopletag, etc?
Do we model all objects 1 to 1 with system or have parent objects and child objects for lookup purposes?
Upvotes: 0
Views: 220
Reputation: 7429
If you are referring to a database schema, you should think of it like this.
If two errors are semantically the same (i.e., "foo" == "foo"), then it can be turned into a lookup table. If two names are semantically not the same, even if they have the same value (i.e., "john" == "john" but the persons are different), then you shouldn't use a lookup table.
For things like tags, you might want to use a lookup table, but if they will be entered by the user, it is probably better to keep them as strings in the database. Lookup tables are best used for large objects (to reduce storage) or values that don't change often. There are exceptions to this, but it's a good rule of thumb.
Does this make sense?
Erick
Upvotes: 1