Questions tagged [rdbms]

Relational Database Management System, a widely used type of database management system characterised by its extensive use of joining as a core operational principle.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

Need help creating a transaction-grained fact table

For a personal project I need to design for the first time in my life a (star schema to keep it simple) relational database, the context is the sport of boxing. Specifically, I need help designing a ...
user avatar
0 votes
0 answers
28 views

Database normalization and design

I have a question regarding database table design. I am trying to figure out a way that I can structure my database. I'm working on an application allow to employees insert how many days they worked ...
user avatar
  • 1
1 vote
3 answers
75 views

SQL or/with Nosql

I am designing a mobile app with basic functionality such as sign-up, Auth, posts, real time messages etc. I think for this kind of work Nosql should work better. But over a long period of time I want ...
user avatar
1 vote
1 answer
87 views

Why do we need a Unique key when we have a Primary key?

I tried to Google this question but all I found were differences between primary and unique keys, why do we actually need a unique key when we have a primary key that can identify any single record, ...
user avatar
0 votes
0 answers
25 views

E-R diagram 1-to-1 mandatory relationship for two superclass entities to relational schema

How are two superclass entities that are connected to a mandatory 1-to-1 relationship converted to relational schemas? These two superclass entities are also abstract, meaning that they will not have ...
user avatar
  • 101
0 votes
1 answer
34 views

Right way to store several addresses and select one as main/principal

I'm working in a little model and I'm struggling with a simple question. How should I store a list of addresses/mails/phones and select one as principal? Example I'm thinking now. AddressEntity: Id ...
user avatar
1 vote
1 answer
42 views

Is it a bad idea to make redundant rows when 2 columns reference to the same table?

Suppose we have this database design Users table: - id - name Friends table: - id - user_id - friend_user_id Let's say USER 1 befriended USER 2, this is what my application logic will execute: ...
user avatar
  • 111
0 votes
2 answers
27 views

Database: Splitting tables based on logically grouped optional columns

I keep having this argument with my management about splitting the tables. I prefer splitting a database table to multiple tables based on attributes that can be grouped together. The columns which ...
user avatar
0 votes
1 answer
124 views

create a trigger to update status on parent table based on values of child table

Table order columns - id status 1 confirmed Table trays columns - id,orderid(fk),status 1 1 done 2 1 processing I have to update the status of ...
user avatar
0 votes
0 answers
24 views

RDB data combination table modeling

There's data and if I combine it, I need to get the corresponding result. If I choose A and I got B, If I choose B, I should also get A. I want to save both data and combinations in DB, but it's hard ...
user avatar
0 votes
1 answer
37 views

Relational or non-relational when dealing with highly relational, big data [closed]

I'm working on a project (in Java) that will be processing a large event stream (GBs every minute). This data is heavily processed to find relationships between events. This is done through a ...
user avatar
3 votes
1 answer
223 views

Is using of subqueries more efficient than using Limit offset and order by in MySQL?

For instance, we have a problem of finding the employee with the second highest salary in the table. This is my table id name dept salary 1 Ram HR 10000 2 Amrit MRKT 20000 3 ...
user avatar
  • 93
4 votes
3 answers
250 views

Inconsistency in Relational Databases

I generally get confused when the term consistency is used. NoSQL tutorials always refer to the reads whereas Relational tutorials refer to a consistent state (ensuring referential integrity ...
user avatar
  • 161
0 votes
1 answer
264 views

MS Northwind Traders DB Inventory Transactions Entity relationship question

Trying to understand Northwind Traders' db schema but I cannot comprehend the relationship between: Inventory Transactions<--->Purchase Order details Inventory Transactions<--->Order ...
user avatar
0 votes
1 answer
97 views

What could be the best DBMS to store airbnb data for price prediction [closed]

I have a school project in which I need to predict the airbnb listings prices in 5 different cities. So I have about 400,000 records each with 19 columns. All the examples on the internet that are ...
user avatar
  • 103
25 votes
4 answers
6k views

If NoSQL stands for "Not only SQL", is SQL a subset of NoSQL?

The definition is a bit confusing - basically I'm asking if SQL is a subset of the NoSQl family: I'm asking this because "Not-only" means NoSQL is much larger, but still includes SQL as a ...
user avatar
  • 455
1 vote
2 answers
361 views

Best practice for "recycling" rows on PostgreSQL (UPDATE vs INSERT + DELETE)

I searched responses on "UPDATE vs INSERT + DELETE" in general terms and the consensus is UPDATE is faster, as expected. My question is centered on a somewhat niche use case. Let's say you ...
user avatar
0 votes
0 answers
46 views

Suggestion for NoSQL database for global users

We are planning to build a social media application, lets say similar to Instagram but at much smaller scale, of course. The users could be from many geographies like US, Europe, Asia who could ...
user avatar
1 vote
1 answer
20 views

How to get the row count from a table related to other table? [closed]

I am new to mysql and database concepts and I will try to explain my question through these two minimal tables, here is the scenario for which I need to write a query, Table : Fruits | FruitId | ...
user avatar
  • 13
1 vote
0 answers
524 views

EAV vs JSON/XML column approach to store complex user form data in a database? [closed]

We are working on an internal tool which will essentially be a complex, power-user oriented form app. It is not a dynamic field app - users can't define their own fields. Form field types: The form ...
user avatar
  • 54
0 votes
1 answer
116 views

Storing daily yield curve data in SQL table

I have daily yield curve data for integer maturities that should be stored in a MSSQL server. Currency.csv Currently, the data is stored in CSV files per currency in the format: date, 1y, 2y, 3y, ... ...
user avatar
4 votes
3 answers
1k views

Why Cassandra is not considered a relational database?

Read this answer Relational databases are based on the relational model, an intuitive, straightforward way of representing data in tables. In a relational database, each row in the table is a record ...
user avatar
1 vote
1 answer
88 views

Storing dart throws in relation database (JSON vs multiple tables)

I'm trying to model database for storing dart throw practices. Data sent from frontend will look something like this [ {"target_name":"S13","singles":1,"doubles&...
user avatar
1 vote
3 answers
417 views

What are best practices for storing many iterations of a product in an RDBMS?

We are building a tool to track the prices of products over time, and using Postgres as our RDBMS. It is important that product attributes can be changed, and that the history of an product's ...
user avatar
1 vote
2 answers
106 views

Detection of contradictions

I found some old notes of mine from 2011 and I also re-read the excellent article 10 Cool SQL Optimisations That do not Depend on the Cost Model by @lukas-eder. So I thought I would take my notes for ...
user avatar
  • 21.1k
0 votes
2 answers
46 views

Multiple Primary-Foreign Key connections between Tables Redundant?

I have two tables, Reviews and Critic I'm pretty new to RDBMS and I was wondering if the connection between Review.rID and Critic.Review is redundant? My reasoning is that a single critic can have ...
user avatar
-1 votes
1 answer
26 views

Database design normalization elearning portal

Table : Class Here the className is unique classId| className -------|--------- 1 | 1st Class 2 | 2nd Class 3 | 3rd Class 4 | 4th Class Table: Subject In the Subject table ...
user avatar
  • 101
0 votes
0 answers
25 views

Can parameter sniffing happen in other RDBMSs, not just SQL Server? [duplicate]

I just found out that when googling for the parameter sniffing, SQL server is also on the recommended search list but not other RDBMS such as Oracle, MySQL, PostgreSQL. Even in this community, ...
user avatar
1 vote
1 answer
32 views

Merge two applications using different NoSQL databases

This is a very generic and high level set of queries related NoSQL type of datastores Imagine I have two different applications using NoSQL datastores each hosting its own document collection. ...
user avatar
  • 111
0 votes
1 answer
352 views

MySQL write performance after truncate & optimize [closed]

Once a year we truncate a table of several GBs and millions of rows and then run optimize in order to shrink the size of the corresponding ibd file on the file system. However, as this is write ...
user avatar
  • 101
0 votes
0 answers
48 views

Relational DB which can do inserts at billions of rows with multiple indexed columns?

I am looking for advice on a database to potentially replace SQLite for my application. To briefly describe my DB requirements: needs to support billions of rows and the most queried table has ...
user avatar
8 votes
3 answers
3k views

Is a single-table relational database similar to a simple NoSQL database?

One advantage touted for NoSQL databases is the lack of a schema. In the case of a single-table relational database, there are no relationships between multiple tables, and new columns can be easily ...
user avatar
-1 votes
3 answers
39 views

Group by a col and concatenate two non group by col in oracel

I'm getting into SQL for the first time after 9 years of work only into Linux. Just during the course of practising sql i was trying to concatenate first_name and last name and get the avg salary of ...
user avatar
0 votes
1 answer
98 views

Better way to ensure referential integrity of one column to a composite primary key?

Given a first table CREATE TABLE table1 ( column1 INTEGER, column2 TEXT, PRIMARY KEY (column1, column2)); does SQL have an idiomatic way to constrain column3 in a second table CREATE ...
user avatar
1 vote
1 answer
39 views

Is there a use case where RDBMS is the best data store for querying only? [closed]

I am trying to figure out whether there is any legitimate use case for Relational Data Store (like MySQL, PostgreSQL, etc) in DDD, Event sourcing and its projections. Hear me out. In event sourcing ...
user avatar
1 vote
1 answer
142 views

Hierarchical data with versioning

I have a domain where I deal with data which has a parent/child relationship, of arbitrary depth. Also, full time traversal needs to be enabled, to show the state of the data at a specific point in ...
user avatar
  • 11
0 votes
1 answer
82 views

How to add/update data from slave server to master server in MariaDB?

I am experimenting on whether I can tweak the functionality of master-slave replication. I can write data in my master server which gets updated in the slave server but it cannot happen the other way. ...
user avatar
-4 votes
1 answer
48 views

test if the solution & SQL understanding is correct [closed]

Employee table- has several attributes such as EMP_ID, TITLE, DEPARTMENT, etc. a date column enabling us to know when was it updated. what does this query do? SELECT emp_id ,COUNT(*) as ...
user avatar
0 votes
2 answers
352 views

How to store daily records in SQL Server 2017 database? [closed]

So, I am working on Angular + .NET Core Web Appliction with SQL Server 2017 as the database. So, the new feature requires that we have to store daily data of users belonging to all countries. Example:...
user avatar
0 votes
1 answer
385 views

in SQL databases does an update rewrite all columns in the row or only those in the SET tuple?

i was wondering how a sql update works in two scenarios: table with 3 columns: a, b, c say the data value for a has to be changed. 1: update on a row setting all columns a, b, c (where b and c have ...
user avatar
  • 111
1 vote
1 answer
2k views

MYSQL - How to optimize VIEW performance?

Total profiles - 100000 Each profile is connected to one or more platform Each profile have 50 Tags Each profile have 4 themes I have a user view (total users around 100000) where I am joining all ...
user avatar
1 vote
1 answer
77 views

Physical co-clustering of two or more logical relations/tables in modern RDBMS

One possible approach to optimize search queries is (a) to store the records that retain data that corresponds to different relations/tables in (b) the same file → on the same pages. That way, a join ...
user avatar
  • 233
0 votes
2 answers
82 views

Table design and query Optimization: Query to find the suitable work from a list of work items

I have table with jsonb column as below CREATE TABLE work ( id SERIAL NOT NULL, work_data JSONB ); sample data is as follows: 100 {"work_id": [7245, 3991, 3358, 1028]} ...
user avatar
0 votes
1 answer
84 views

Where MySQL is taking time either in disk read or computation? [closed]

From SQl case study System configuration is Software: Percona 5.6.15-63.0. Hardware: Supermicro; X8DTG-D; 48G of RAM; 24xIntel(R) Xeon(R) CPU L5639 @ 2.13GHz, 1xSSD drive (250G) Query is select ...
user avatar
0 votes
1 answer
161 views

MySQL block read time?

My understanding is even if I need to read single record like select name from customer where id=1, I need to read complete specific block(block address can be found from index on column ID) in memory....
user avatar
0 votes
1 answer
62 views

Big data table processing with RDBMS like MySQL?

I have two tables Customers and Orders and each has 100 million records. Now I have to join these two tables on the column customer_id in both Customer and Order table to generate a report. ...
user avatar
  • 165
0 votes
1 answer
36 views

Disk block per table?

At T1, insert comes for table_1, goes to disk block_1. At T2, insert comes for table_2, can it go to same disk block_1(provided block_1 has space) or new block will be created per table ? At T3, ...
user avatar
1 vote
0 answers
99 views

Understanding connection between different database concurrency control protocols

I have came across following diagram related to timestamp based concurrency control protocols in database systems (as summarized in these sldes or detailed in the book by Korth et al.): I don't know ...
user avatar
  • 219
1 vote
1 answer
117 views

Schema design for products with redundant values

so I was looking some design schemes for storing a Product's quantity of a certain color and variant sizes, @Gilbert Le Blanc gives the perfect scheme for me as answered in this question, and the ...
user avatar
  • 11
1 vote
1 answer
176 views

Should I use a RDBMS JSON field or a NoSQL database to store large JSON datasets that I don't need to query?

I am building a website that allows users to retrieve a bunch of open source chart (eg UN data). I don't need to be able to query the data itself. I will instead extract certain meta data (keywords, ...
user avatar
  • 111