Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6124193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:06:17+00:00 2026-05-23T16:06:17+00:00

I’ve hit a bit of a wall … here is my simplified schema: TABLE

  • 0

I’ve hit a bit of a wall … here is my simplified schema:

TABLE users
id

TABLE assets
id
userid

TABLE presentations
id
userid

At this point, it’s easy to create a relationship between USERS -> ASSETS and USERS -> PRESENTATIONS … but where I run into a bit of a brain fart is when I introduce TEMPLATES for the PRESENTATIONS:

TABLE templates
id

You see, each TEMPLATE has several positions… not all TEMPLATES have the same amount of positions. Each position houses an ASSET or is empty.

I’m having a hard time trying to figure out which way is the best way to connect PRESENTATIONS -> TEMPLATES (and position) -> ASSETS … and keep in mind, not all ASSETS are associated with a PRESENTATION.

Proposed Schema:

TABLE presentations
id

TABLE templates
id

TABLE positions
id
templateid
assetid

But there is a problem with this. This assumes that each TEMPLATE can just a random amount of POSITIONS. Yes, a TEMPLATE has a 1 – n relationship with POSITIONS, but not really. Because a TEMPLATE wouldn’t be a TEMPLATE if it wasn’t repeatable. TEMPLATE 1 has 4 positions, and will always have 4.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:06:18+00:00Added an answer on May 23, 2026 at 4:06 pm

    OK, let’s see as promised:

    table Presentation
    int id
    varchar name
    int fk_template (references template.id)
    ....
    
    table Template
    int id
    varchar name
    .....
    
    table Position
    int id
    int zorder (if it is the 1st, 2nd, 3rd position of the given template)
    int fk_template (references Template.id)
    .....
    
    table Asset
    int id
    varchar name
    varchar description
    ....
    
    table AssetForPresentation
    int fk_asset (references Asset.id)
    int fk_presentation (refernces Presentation.id)
    int fk_position (ferences Position.id)
    

    Now you have templates that have fixed positions. Every presentation uses one template. For every presentation and every position inside this presentation you can define one asset or none. You must make sure that in table AssetForPresentation only position ids are used that are actually member of the template used by this presentation. If a position of a given presentation has no asset, just don’t create an entry in table AssetForPresentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have some data like this: 1 2 3 4 5 9 2 6

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.