1:N relationship to profile or user table?

Suppose I have a User Table and a UserProfile Table that I have separated. The two tables have a 1:1 relationship. User table contains only data like email and password, while UserProfile contains …

SQL column default value set using row wise operations

Is it possible to set a default value in a SQL column to be consisted of other columns? For example, in the table below is it possible to have the EndDate default to StartDate + NoOfDays? So when …

How to make Custom attributes for SQL table

What is the proper way to give user to use custom attributes ? As an example Consider that, There is a web application, using the frontend user interface admin user need to be able to add custom …

SQL one-to-many relationship: Should I see a “many” field in the table?

This is something basic which drives me crazy: If for example I have a table “team” and a table “player”. And the team can have multiple players in a one-to-many relation. Should …

Have I normalized this database to a 3NF level the right way? [closed]

I had a lecture at college recently about normalizing databases, but since we are online I can’t really ask a lot of questions, so here I am. Can someone tell me if I’m doing the conversion right, if …

How to structure limited voting system design

I have 3 types of tables. Categories, Candidates, Voters. To be describing the problem as short as possible, Candidates can belong to only 1 category. Voters can vote for each category and only one …

SQL DB structure for N items with M parameters varying over time

There’re the items: item_1 … item_N N is about a few hundreds. New items can be added sometimes. Each item has a set of parameters: parameter_1 … parameter_M M is about 20-30. These parameters …

SQL Database Design Union Data Type? [closed]

This may be a basic question, but I’m curious about what the most reasonable “preferred” way to design a database with a union type is. What I mean is consider a table Post which has only 1 piece …

How to prevent logical duplicates in a unary one to many SQL relationship table

In a non directional unary relationship what would be the best option to prevent logical duplicates? E.G. Main table ID — 1 2 Relational table ID1 ID2 ———– 1 2 2 1 Entry two …

What’s the meaning of CWD in database design?

What’s the meaning of CWD? Usually, It used in SQL Schema. like cwd_user or cwd_directory. I have seen it here Jira database schema.