• What is the best way of storing data?

    I have multiple collections of CAD drawings, a few thousand drawings for each project.

    What is the best way of storing this data?

    Do I create a post type for each project and then register each drawing as an entry in the post’s meta data? Or do I register each drawing separately as it’s own post entry? Each project will need a list of members who can access the drawing.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    This may be one of those rare instances where custom tables actually makes the most sense. If you don’t want to go that far, I’d recommend a post for each drawing using a custom post type. It’s very similar to how images are managed as attachment post types. Just like attachments are associated with posts, your drawing post type could be associated with a project post type.

    As for access, you’ll need to decide what takes less space. Managing who can access each project or drawing with project or drawing meta data, or managing what drawings or projects a user can access with user meta. You may be able to leverage roles and capabilities to minimize the data stored. It depends on how fine a control you need for the various elements.

    Thread Starter dgcov

    (@dgcov)

    Thank you.

    I was considering a custom post type for the Project with an array of drawingfile names in an associated post_meta array, but the number of drawing files could go up to thousands.

    I’m still planning on using a post_meta array for team members with varying read/write access, etc, but that should be a smaller list.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Efficient data storage.’ is closed to new replies.