Skip to main content

All Questions

0 votes
1 answer
62 views

Foreign key is always 0 in relation one to one

In relation 1 - 1, I have two foreign keys in each of tabels that should tell me to what object I', referring. In table "WebAppUser" foreign key works correctly but in table "...
Pekler's user avatar
  • 33
-2 votes
1 answer
480 views

Fixing my code to prevent sql injection

I made a login with authentication in DotNet windows forms app and I'm trying to do my best to guard the database from SQL injection attacks, but it seems like there was a wrong logic in my code. Any ...
percival's user avatar
3 votes
1 answer
894 views

PostgreSQL exclusion constraints in a bitemporal setting?

I am currently working with a bitemporal application, which stores data entries using 4 timestamps: Valid_from, Valid_to Registration_from, Registration_to The first two state when the given entry is ...
kafka's user avatar
  • 733
2 votes
1 answer
2k views

How to ensure entries with non-overlapping time ranges?

I need to ensure my database only contains entries where two or more of its columns are unique. This can easily be achieved with a UNIQUE constraint over those columns. In my case, I need to forbid ...
kafka's user avatar
  • 733
0 votes
1 answer
2k views

How to map a column from another table?

I have two tables articles and content (1-to-1 relation). content table contains an article body in JSON format (PostgreSQL). The tables were split for performance reasons, as the content is too large....
acelot's user avatar
  • 762
0 votes
2 answers
215 views

Database table design, user menu strip access, winforms

I have a requirement on a Winforms desktop app that the options on the fileMenStrip are hidden / displayed depending on the user access rights. Roles cannot be used as different access is given on a ...
christy82002's user avatar
0 votes
1 answer
167 views

Designing an SQL Database where multiple tables use the same model

Background I am trying to design a PostgreSQL database that will store trade records from cryptocurrency exchanges. I have a single Trade model in my client, but would like to split the trades into ...
Haus's user avatar
  • 1,492
0 votes
1 answer
168 views

Where should I implement the user privileges [closed]

I am going to code a .NET application using C# and the database PostgreSQL via Npgsql. The application will allow users to access the database. Each user has his ID and Password. Some users have the ...
Aan's user avatar
  • 13k