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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:34:09+00:00 2026-05-13T13:34:09+00:00

I am working on a project for a client and going through the initial

  • 0

I am working on a project for a client and going through the initial database design. The project will be a simple web app for tracking processes and their outcomes within a matrix diagram, I am looking for a good way to store these in relational tables.

Right now I am thinking I have a general table for Routines which the x and y coords will map too and maybe off from that a lookup table containing the ID of coordinates in which a “hit” is recorded. Anyone have any better ways of doing this?

Thanks!

EDIT:

This is just the beginning of the project so I have limited detail as of yet, but my main reasoning behind multiple tables is because the matrices will be completely dynamic in size and generic so that each one may be different and they will be tied to a user

I also forgot to mention that order of the x/y values are important, which further supported my reasoning behind having multiple tables for x y and values, from this I strongly assume that needing to know each individual cell is important

EXAMPLE:

The basic example (albeit abstract) of this lies in the process regarding a restaurant. The actions being stuff along the lines of sit down, order food, look over menu, order drinks, eat, pay, etc. the outcomes being order taken, drinks delivered, food delivered, change given. While seemingly simple it becomes complex when taken into consideration things happen differently with each occurrence, also in the case of take out or buffets. the order of the actions and outcomes becomes integral in seeing the differences between the situations

  • 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-13T13:34:10+00:00Added an answer on May 13, 2026 at 1:34 pm

    There are lots of way to do this, we would need a lot more information to be more specific about what would be best for you. However, here are the two SOP ways:

    Either a separate table for each matrix:

    CREATE TABLE YourMatrixName(
        RowNo smallint NOT NULL,
        ColNo smallint NOT NULL,
        CellValue varchar](50) NULL,
     CONSTRAINT [PK_Matrices] PRIMARY KEY CLUSTERED 
        ([RowNo] ASC, [ColNo] ASC)
    ) ON [PRIMARY];
    GO
    
    CREATE UNIQUE NONCLUSTERED INDEX IX_YourMatrixName ON dbo.YourMatrixName
        (ColNo, RowNo); 
    GO
    

    Or, all of the matrices in one table:

    CREATE TABLE Matrices(
        MatrixName varchar(24) NOT NULL,
        RowNo smallint NOT NULL,
        ColNo smallint NOT NULL,
        CellValue varchar(50) NULL,
     CONSTRAINT [PK_Matrices] PRIMARY KEY CLUSTERED 
        ([MatrixName] ASC, [RowNo] ASC, [ColNo] ASC)
    ) ON [PRIMARY];
    GO
    
    CREATE UNIQUE NONCLUSTERED INDEX IX_Matrices ON dbo.Matrices
        (ColNo, RowNo); 
    GO
    

    These are standard normal form, virtually all other ways of doing it are not well normalized. Some advantages of these approaches:

    1. You do not have to fill in every cell, only the ones you are using. Or have a default value (0 or “”) and skip those.
    2. This is easily the most flexible approach, even in the “all in one” model, there is no need to restrict them to the same size in any way, and it is very easy to resize them.
    3. You can easily query the contents of the matrix, something that is increasingly difficult in more compact storage methods.
    4. “Hit”s or any other aspect of the matrix cells are easy to implement as additional fields in the rows. Make them Null-able if you’re worried about the additional space, and index them if you want to query/report on these attributes separately. Its also just as easy to retrofit features like this with this model also.

    The primary disadvantage is that there is typically a high space to data overhead. Many assume that there is also high overhead to Insert or retrieve new matrices but in fact there are several documented techniques that can make it quite fast.

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

Sidebar

Related Questions

I'm working on the design of a web app which will be using AJAX
My client has a database (TS) for a project I'm working on. This database
I am working on a web app project and there is a rather large
So I have been working on a project for a client on their current
Maybe i'm going about this wrong but my working on a database design for
I'm working on this project where the client has a virtual server setup. I
I'm working on a project where the client wants to have existing pages dynamically
I'm working on a project for a client in which the client owns the
I`m an Android developer, and recently started working on JAVA PC project for client.
I am working on a new project for a client; they have supplied the

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.