1

i am a .net user so i am unfamiliar with not using a foreign key inside of the database.

On my WP application, user's are able to create videos on the application, the videos are stored on a different server, and I am just using a simple UI to gather video information such as src value and title of movie, ect...

I am adding a custom table to the WP DB, "user_video" it will hold the user's video data.

How does Wordpress create a child-parent relationship between tables? (E.g. user & usermeta) I am just wondering how I can create a child table to hold video data for that specific user?

  • usermeta contains a FK userid which is the corresponding PK of the users table, which is the "master" record of each user. I'm curious, why not use the existing usermeta table? WordPress contains a lot of built in functionality for default database tables that you'll be sacrificing by introduction custom tables. – Andrew Bartel Aug 27 '14 at 22:15
  • user's are able to add more than 1 video. I am use to normalizing the data in a database. Do you think it's a better idea to use user_meta even though theoretically user can have 30 videos? only admins can upload videos so don't have to worry about spam/ bad data. – 4554545434 Aug 28 '14 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.