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
1 answer

SQLite/SQLAlchemy: Check values are either NULL or the same for several columns

I would like to check for several columns that: For each column the value is either NULL or the same for all records. For example, the condition holds for the following table +------+------+------+------+ | Col1 | Col2 | Col3 | Col4…
IsaacLevon
  • 2,260
  • 4
  • 41
  • 83
1
vote
0 answers

How to transfer contents from a excel sheet to send another. Both sheets have relational data but need to transfer the phone number based on same name

The two sheets have similar information but one of the sheets is missing the phone number of the employees. So I need to create a formula that transfers the number over based on both sheets having the same name in the row.
1
vote
1 answer

Count common ManyToMany members in queryset

Assuming I have such models: class Bar(models.Model): pass # some simple Model goes here class Foo(models.Model): bars = models.ManyToManyField(Bar) And some variable main_object = Foo() with bars filled, how can I make a Queryset so that…
Zoltán Schmidt
  • 1,286
  • 2
  • 28
  • 48
1
vote
0 answers

How to properly integrate Mongoose relational database

can you help me look at this code to find out where I am making it wrong ? I have my mongoose schema that am referencing child. What I want is to create a user and embed his payment details as a reference. my current result now, allows me to create…
1
vote
1 answer

EF Core One to one relathionship with AspNetUsers table and cascade delete

I am struggling to setup a scenario (using C# classes and OnModelCreating() method) where DB models would act as follows: First assumption, the mandatory one: I want to have the ability to create User (AspNetUsers table) without a reference to a…
1
vote
1 answer

How to create and at the same time connect to a other model in a Implicit many-to-many relations?

I am new to Prisma. I have stuck on Prisma.brand.create method. Here is the model: model Category { id String @id @default(cuid()) slug String @unique name String @unique image String? createdAt DateTime @default(now()) user CMS_users…
1
vote
2 answers

MS Access - Relationships

I inherited a project in Microsoft Access 2000 that has code, tables & queries. I need to convert this to SQL. I see several queries with INNER JOINS with Select commands. So I am guessing the tables have relations set up? I used the Relationships…
user450143
  • 435
  • 1
  • 6
  • 15
1
vote
2 answers

How do I turn a one-to-many relationship into a list property using SauceDB?

Using SauceDB, how do I turn a one-to-many relationship, between say table "A" and table "B" respectively, into a list property (containing B objects) in the class that corresponds to table A? The relationship is represented by a foreign key in…
aknuds1
  • 65,625
  • 67
  • 195
  • 317
1
vote
1 answer

Relational database created/stored on client

I'm in the early stages of designing an Electron application that needs to be able to dynamically generate/access/modify data in a relational structure, stored completely locally. I'm hoping to find a Node package/library that can handle this,…
Nico
  • 129
  • 11
1
vote
0 answers

Best practices for handling API query requests for relational database

I'm writing a Flask API which resembles an online shopping website like Amazon or eBay and it's using SQLAlchemy as an ORM for my database. One of the main features is posting a product for sale, which another user can order. Every added product…
Dawid
  • 47
  • 5
1
vote
4 answers

Acceptable way to get around a UNIQUE w NULL constraint?

I have a table as follows: I would like to add a UNIQUE KEY on (connection_id, parent_container_id, name). However, parent_container_id and connection_id are a disjoin union -- the record must have one or the other. Because of this, I thought…
David542
  • 104,438
  • 178
  • 489
  • 842
1
vote
1 answer

Entity Framework : Relational Model help for Permissions, Users etc

Can anyone help? I am looking to create a good relational model for managing Permissions. I currently have a Users table, and various other tables like Customers, Suppliers. The user needs permissions to View, Edit, Create in either Customers,…
Martin
  • 23,844
  • 55
  • 201
  • 327
1
vote
1 answer

Implementating Generalizations When At The Logical Design Stage Of Database Design?

I am designing a database and as i do not have much experience in this subject, i am faced with a problem which i do not know how to go about solving. In my conceptual model i have an object known as "Vehicle" which the customer orders and the stock…
1
vote
1 answer

Relational schema for a book graph

I have the following diagram that I made to show Books and People that have relationships to them: There are two nodes: Person Book And Three relationships (with their properties, not shown in the graph): Read (date, num_stars) Wrote…
David542
  • 104,438
  • 178
  • 489
  • 842
1
vote
1 answer

How do you replace id numbers with names since the columns aren't joined directly? (PHP/MySQL)

Let's say you have a database with two tables named "clients" and "referrals". TABLE clients has two columns: "id" and "name". TABLE referrals also has two columns: "id" and "referred_by" Both "id" columns are PRIMARY_KEY, AUTO_INCREMENT,…
no-name
  • 37
  • 1
  • 3
  • 8
1 2 3
99
100