Giter Site home page Giter Site logo

[Sanity] Create a schema plan about upe-site HOT 5 OPEN

dvd-lara avatar dvd-lara commented on July 28, 2024
[Sanity] Create a schema plan

from upe-site.

Comments (5)

byfnoel avatar byfnoel commented on July 28, 2024

Thinking of a participants table

Would it be necessary?

from upe-site.

dvd-lara avatar dvd-lara commented on July 28, 2024

Thinking of a participants table

Would it be necessary?

I don't believe it would be necessary at this moment. The schema plan should be for the minimum viable version of the website which simply displays information about the club, the programs and their events

from upe-site.

byfnoel avatar byfnoel commented on July 28, 2024

Understood!

from upe-site.

jhern603 avatar jhern603 commented on July 28, 2024

Here is an image with two possible schema designs.
image

Ideally, we want to minimize the number of queries we make on the front-end so that the page has faster performance. One thing we will have to look into is lazy loading. I personally don't have much experience lazy loading, so this will be a learning experience for all of us.

What we want happening in the back-end is to be relating the different fields of the tables together, so that the front-end can achieve a minimum number of queries.

An example of this:

If you look at the schema in the bottom right of the image, the Program table may pull the title and the flyer for events from the Event table.

Ideally, this would make the query from the front end look like this:

(Query everything from the Event table)
*[_type == 'Event']
(Only display the Title, and the Flyer for each event)
*[_type == 'Event']{Title, Flyer}

SQL Equivalent: SELECT Title, Flyer FROM _schema WHERE type = 'Event'

We will have to make an experimental schema so we can see if cross-referencing is really this easy, though.

Once we agree on a schema design, and verify that cross-referencing is viable, I will design an ERD so we have a clear graphic on what the schema will look like.

from upe-site.

ZiadMalik1 avatar ZiadMalik1 commented on July 28, 2024

Based off my Understanding of Schemas, I feel that the more Compact and efficient they are, the more they serve their purpose of keeping organization. The Bottom Right Schema seems to be the one that in my opinion, is perfect for the job. Using SK and PK, we can create Queries that pull off of one another in different tables.

from upe-site.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.