Questions tagged [relational-database]

A relational database is a database consisting of relation variables (which are also called *relvars*, *R-tables* or just *tables*). The definition, manipulation and integrity rules of relational databases are based on relational operations equivalent to or similar to the Relational Algebra and Calculus. Relational database principles are the basis of a substantial part of data management theory and practice.

A relational database is a database consisting of relation variables (which are also called relvars, R-tables or just tables). The definition, manipulation and integrity rules of relational databases are based on relational operations equivalent to or similar to the Relational Algebra and Calculus. Relational database principles are the basis of a substantial part of data management theory and practice.

Targeted Questions

This tag is appropriate for questions concerning the relational model, relational and relational database implementation.

The SQL language is commonly used to specify relational database-designs and to define and solve relational database problems. However, DBMSs based on SQL are by definition not s and therefore not all SQL questions are relevant to the relational database tag. Questions specific to or its implementations should be tagged accordingly.

6790 questions
1
vote
2 answers

Relational Database System with dynamic columns with dynamic rows

ppl, I've to develop a Database like this, Here, I've a list of words. I need to keep relevancy for each other word in a database. when a new word added, I need to be able to add a row as well as a column. One of my idea for this is like…
Sency
  • 2,818
  • 8
  • 42
  • 59
1
vote
0 answers

How to programatically unapply EF Core migration in C# code?

It is possible to run EF Core migrations programatically. dbContext.Database.Migrate(); Is it possible to revert applied migrations also programatically?? I am looking for smth like this: dbContext.Database.Migrate(0); Thanks for any help in…
Bulchsu
  • 580
  • 11
  • 33
1
vote
1 answer

Definition of functional dependency, ambigiuous "for all pairs"

for all pairs of tuples t1 and t2 such that t1[A] = t2[A] then t1[B] = t2[B] Can "a pair" also be a pair of the same tuple, meaning t1 = t2, or does it mean only two distinct tuples?
1
vote
2 answers

Relating Tables with no previous Relation (SQL Server)

EDIT: I swapped out my structural implementation, but my problem still remains the same; i.e. First creating a Publication object (if it doesn't yet exist) before creating the SvcRequest record. I was given a database that I had to "fix" and am…
1
vote
1 answer

Troubleshooting a many-to-many relationship in Microsoft Access?

I created a database that holds a STUDENT table, a COURSE table, and an intersection table named STUDENT_COURSE. However, I have problems with duplicated rows and I don't know how to solve them. Here are pictures of the tables in design view and…
1
vote
3 answers

Database table naming; name_verb_name conventions for many-to-many intersect tables

I've read around on SO for other questions on the subject, and I'm aware that naming conventions are an often subjective topic, however I feel this is less general (and less inquired about) than PascalCase versus under_scores. Given a simple…
Dan Lugg
  • 20,192
  • 19
  • 110
  • 174
1
vote
1 answer

How To store array of objects in mongoDB

In frontend we have data like imagine A is having two child B and C and B having 2 child D and E similarly C is having F and G how we can store in db like [{A , child[B,C]},{B , child[D,E]} , {C , child[F ,G]}] this structure here we have to use…
1
vote
1 answer

How to efficiently compute in step 1 differences between columns and in step 2 aggregate those differences?

This is a follow-up question to this Is there a way to use functions that can take multiple columns as input (e.g. `GREATEST`) without typing out every column name?, where I asked only about the second part of my problem. The feedback was that the…
Alex
  • 4,925
  • 2
  • 32
  • 48
1
vote
1 answer

Select one to many parent-child and many to many table

I have 3 tables: category, subcategory and skill. A subcategory can belong only to one category and can have any skill. A skill can belong to any subcategory. Category-subcategory is one to many, subcategory-skill is many to many. I need to show all…
1
vote
0 answers

EF Core: How to structure SQL Relationship between tables for this example

Imagine having a company A (acting as a user) inputing their competitors (picking from a list of other companies). Company A stated they compete with Company B, Company C and Company D. I'd like to store this relationship in the DB. However after…
1
vote
1 answer

Isolated "Logging" Tables On DB - A Good Practice?

I have to meet the requirement to log on a database all the requests made by my application to an external WCF service. I was suggested to create a kind of a "log table" on my application's support database, isolated from all the other tables, where…
DotNetStudent
  • 889
  • 9
  • 24
1
vote
3 answers

Simple Relational Database - Efficient Querying

This is essentially very simple I've just been rather verbose about it. My data is structured as shown at the bottom of my post. My goal is to organise the data in a simple spreadsheet format, 'flattening' the relational database. Something…
IsisCode
  • 2,490
  • 18
  • 20
1
vote
0 answers

Join columns from two tables to just one entity in the TypeORM

I'm in a project for which there is already a defined database, and I need to transform this data into entities in the application layer. There are these tables: These two tables technically represent just one entity, and I wouldn't want to…
David Gaspar
  • 407
  • 5
  • 12
1
vote
1 answer

Django ORM query on fk set

I have a problem with lookup that looks for a value in related set. class Room(models.Model): name = models.Charfield(max_lentgh=64) class Availability(models.Model): date = models.DateField() closed =…
Kihaf
  • 65
  • 1
  • 4
1
vote
0 answers

mysql query tree struct with mptt slower than 2D relational table

My business scenario is shown in the figure above. A user can create multiple products, a product can have multiple modules, and a module can have multiple parameters. The parameters include variable types, variable names, and variable…
jason-lin
  • 35
  • 5