Anas Badran
Explore posts from serversDTDrizzle Team
•Created by Anas Badran on 2/5/2025 in #help
Schema review
Is there anything that can be optimized about the schema below:
1 replies
DTDrizzle Team
•Created by Anas Badran on 2/5/2025 in #help
Search on user's fullname
I have a user's table that stores first, middle and last names, I want to create another field named
search
that can be automatically calculated from these three fields.
I saw something on the docs about something called full-text search, but I don't think that is is needed for my case, I just to be able to find users based on any part of their name provided.
I am not a postgres expert, so I will appreciate any advice if I am wrong.5 replies
DTDrizzle Team
•Created by Anas Badran on 1/23/2025 in #help
Database design
I'm building an app for a center 'school' for Quran teaching and memorization.
I want to track students daily progress and attendees, there is also can monthly tests, each class also can choose best student of the week each week.
My question is:
how do I link these data to a certain year?
For example an admin visits the app dashboard and want to view a student's average attendance for a certain year, or maybe he wants to know how the had progressed in a certain year.
1 replies
PPrisma
•Created by Anas Badran on 1/22/2025 in #help-and-questions
Multiple roles for a user
I have a scenario where a user can have multiple roles at the same time.
For example a user can be
editor
and translator
.
What is the recommended approach for this situation?6 replies
DTDrizzle Team
•Created by Anas Badran on 12/14/2024 in #help
Build a complex query
the schema:
4 replies
PPrisma
•Created by Anas Badran on 12/11/2024 in #help-and-questions
Fix a query
is there something wrong with this query, it isn't working?
26 replies
PPrisma
•Created by Anas Badran on 12/6/2024 in #help-and-questions
Enforce uniqueness on Json fields
How can I enforce uniqueness on the post model based on the values in the json fields.
here is the schema:
the
extraData
fields json will look like:
I don't want two records with same values to exist, like if there is record with these in the json field surah: "24", verse: 30
, I don't want another to be created with same values2 replies
PPrisma
•Created by Anas Badran on 11/23/2024 in #help-and-questions
Fix schema error
I have this schema:
7 replies
DTDrizzle Team
•Created by Anas Badran on 11/21/2024 in #help
Schema building
I want to archive the content for a scholar who writes a series of posts related to a single subject, this series will have different shape for it's posts than other serieses.
for example a series of posts have a
verseId, chapterId, point_1, point_2, point_3
.
another series posts may look like this: characterName, content
.
And there will be a serieses created in the future
I need some help and ideas on how to achieve that.2 replies
PPrisma
•Created by Anas Badran on 11/21/2024 in #help-and-questions
Building the schema
I want to archive the content for a scholar who writes a series of posts related to a single subject, this series will have different shape for it's posts than other serieses.
for example a series of posts have a
verseId, chapterId, point_1, point_2, point_3
.
another series posts may look like this: characterName, content
.
And there will be a serieses created in the future
I need some help and ideas on how to achieve that.8 replies
PPrisma
•Created by Anas Badran on 11/15/2024 in #help-and-questions
help with relations
I want the
Meal
model to kepp track of the absent familyMembers without having to store the data on the familyMember
model.3 replies
DTDrizzle Team
•Created by Anas Badran on 10/7/2024 in #help
I need some help for solving help post posted in another help post.
1 replies
DTDrizzle Team
•Created by Anas Badran on 10/6/2024 in #help
find chat based on users IDs
I want help writing the query to find the chat between two users knowing their IDs.
the schema:
2 replies
DTDrizzle Team
•Created by Anas Badran on 9/20/2024 in #help
query based on deep relations
I need help modifying the query code to properly query the chat where it has the the two members.
3 replies
DTDrizzle Team
•Created by Anas Badran on 9/19/2024 in #help
Need help building up a query based on nested fields.
I need some help to query the chat that has only the two members only
private chat
based on the schema below.8 replies