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 9130851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:02:27+00:00 2026-06-17T08:02:27+00:00

Ok I recently asked a question and users answered is that I should normalize

  • 0

Ok I recently asked a question and users answered is that I should normalize my database but I don’t think I should really do it..

The logic goes like this

Am storing scripts in the database which are executed dynamically according to the user..

So for example there’s a script table

script_id | script_name
+----------------------+
12345       demo1
54462       demo2
90874       demo3
43058       demo4

And now the user table

allowed_script_ids
+-----------------+
21345|90874

So this is simple here, but what happens is if I delete say script_id 90874, but it doesn’t remove the record from the user table so they suggested me for normalizing the database, but what if user has access to 1000 scripts? do I need 1000 records for that? Or I should continue with the way am going? Even If I insert each record entry for each access, I need to delete those everytime I revoke the access for that user.

  • 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-06-17T08:02:28+00:00Added an answer on June 17, 2026 at 8:02 am

    1000 rows are not a lot (in the same light, nor is 10,000,000), normalising your database (ie. associating users to scripts) is perfect fit for this. If you’re concatenating a string, unless you’re using TEXT (which is baaaaad for this anyway!), you’re probably going to hit some form of field length limit before you can add too many script IDs anyway.

    So yes, I would also suggest that your normalise to this extent:

    Script

    script_id
    name
    

    User

    user_id
    ...
    

    User_Script

    user_script_id
    user_id
    script_id
    

    Visualisation

    .. each relationship will then go into User_Script.

    This is much cleaner than concatenating a string, and upon deletion, seeking/replacing from a string. It will be faster, cleaner, and help you actually see your database in a much more streamlined way.

    Currently, how would you get all of the script names out of the database? With the above somewhat-normalised design, you can run this query similar to this:

    SELECT `user`.`first_name`, `script.name` FROM `User_Script`
    INNER JOIN `Script` USING (`script_id`)
    INNER JOIN `User` USING (`user_id`)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently asked this question in the pyglet-users group, but got response, so I'm
In another question that i asked recently i got a really good answer and
I recently asked a question about tracing Linq-to-Entities I think that one of the
Recently I have asked a question about what I should use to create self-contained
Before starting, a very similar question was asked recently, but I was facing a
I recently asked a question that got shot down for being too strongly worded.
I originally asked this question on Super User but was told that it might
For reference, here is a question on SO that I asked recently that is
Please see here for a question I recently asked. The only answer you should
I have a follow up to complicated mysql question that I recently asked: Show

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.