Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
2answers
465 views

How we can do full text search and facets stuffs on BigQuery?

In the future, we will have millions ofs record in our web product. So we had used BigQuery for data storage and analysis. We have to build filters on our search page like Flipkart and Amazon provide ...
2
votes
1answer
104 views

Redundant FK on parent relationship is denormalization?

Let's say I have this database client | id | status | sale | id | client_id | date | sale_item | id | sale_id | *client_id* | The *client_id* column is redundant, because we can JOIN and get ...
1
vote
3answers
123 views

How to model data which requires index on all columns?

I have following use case where there are bunch of IDs (GUID) which are mapped to each other. I need to lookup all the IDs given any single ID. For example, let's say my data has following columns: ...
1
vote
0answers
89 views

What's an example of a Distributed Database Query?

Since I may not come across or get a chance to use a distributed database system. I would like to understand an example of a Distributed Database Query. I know that in a distributed system, you have ...
4
votes
1answer
65 views

How much does an ordered query of an attribute costs in terms of operations when the attribute is a key or an attribute?

How much does the following query costs in terms of operations when the attribute is a key or an attribute ? SELECT Attribute FROM R WHERE Attribute = 50 ORDER BY Attribute We assume we ...
2
votes
1answer
82 views

Design: similar tables and foreign keys

Description I am building a database for storing social events. They can be one-time and recurring. The price and capacity can differ on per-date basis. The events have variants that can also alter ...
1
vote
1answer
398 views

Repeatable Read: Which one is correct?

Which one is correct? With transaction 1 as Repeatable Read, other transactions can not update a row after it has been selected by transaction 1. With transaction 1 as Repeatable Read, other ...
2
votes
0answers
33 views

How to accept lock request using intent locking?

No matter how much I try, I do not understand compatibility matrix of intent locking. Why were SIX and IX denied if x lock has been held? Suppose x lock holds for record r1 then taking IX just means ...
1
vote
1answer
355 views

Will DB session terminate when client close DB connection

I have several questions about database connection and database sessions. I assume questions below are apply to all databases (RDBMS). In most of the cases, one database session is on one database ...
0
votes
1answer
50 views

Why a transaction retrieve the same row more than one time?

I understand that nonrepeatable read problem occurs when a transaction t1 retrives a row, transaction t2 then updates that row and transaction t1 then retrieves the same row again. T1 retrieved the ...
1
vote
2answers
106 views

Proper way to store lots of links?

I'm doing a small crawl over multiple sites and I have a lot of links which are represented by ID's (example.com/foo = 354). I'm currently storing the link -> link references and the link text. So ...
-2
votes
1answer
10k views

Difference between assertion and trigger in PostgreSQL?

A trigger is a statement or a block of statement which are executed automatically by the system when an event like insert, update or delete takes place on a table. But I don't know where we use ...
1
vote
2answers
981 views

Applying a rule dynamically to all columns in different tables

I am trying to apply a rule to remove double quotes from any value in my DB. I declared the table name as an Input parameter (This is required). Now I want the rule to run dynamically against all ...
0
votes
1answer
277 views

How do triggers and check constraints relate to maitaining database rules

I was looking at a tutorial on triggers for SQLite. The tutorial said that a use of triggers could be for data validation. The following code was given as an example: CREATE TRIGGER ...
6
votes
1answer
3k views

Which queries are faster with Postgres than with MySQL InnoDB [closed]

I've read Performance difference between MySQL and PostgreSQL for the same schema/queries. Here is a brief retelling of the article: PostgreSQL tables are heap tables (means no clustered index)... ...
4
votes
1answer
419 views

Postgres heap table performance on SSD

I've read Performance difference between MySQL and PostgreSQL for the same schema/queries.. Is it still relevant with appearance of Solid State Drive? That article said that Postgres is better for ...
4
votes
2answers
937 views

SQL Server- Limit to Concurrent table queries?

In SQL Server, or RDBMS systems in general, is there a limit to the number of concurrent queries that can be made against a table? How is it that N number of users can access the same physical data ...
0
votes
1answer
171 views

Designing table for document annotation with future columns

I am working on a web application that allows students/researchers to annotate PDF documents shallowly by (manually) counting interesting phenomena. Right now, there is a total of about 45 of these ...
1
vote
1answer
157 views

Count of range on datetime in MySql

I want to group table entries for each userId only if they are consecutive entries in the table. I have a table like this. id userId transactionTime 1 1 2016-04-13 22:15:44 2 1 ...
1
vote
0answers
309 views

Would it be good practice to represent MongoDB ObjectId as a String or a Blob type in SQL Lite (RDMS world)?

All: We have a software application with 1) Web-based component 2) Mobile-based component Our 1) Web-based component uses a) MongoDB as the Database b) ASP.NET C# Our 2) Mobile-based component ...
6
votes
2answers
13k views

Execute system commands in postgresql

My requirement is to execute a system command like (ls) or C program when a trigger executes. Is there any way to create a trigger function to solve this problem.
1
vote
1answer
124 views

Which database should I look at for analyzing ~30gb, 700M records dataset?

I'm looking at analyzing a kaggle dataset which is pretty normalized, specifically joining, grouping, slicing and dicing the 3 tables patients(2M) <-> diagnosis(700M) <-> doctors(2M). I ...
1
vote
1answer
1k views

DECIMAL and NUMERIC datatype in Postgres [closed]

what is the use of decimal and numeric datatype in postgreSQL. As per the reference the following is the explanation given to these datatypes. decimal,numeric --> It is a user specified precision,...
0
votes
1answer
135 views

Are there RDBMS which can count rows fast?

If I use query this in MySQL: SELECT * FROM table WHERE some_col=something ORDER BY some_col LIMIT 10000, 10 It will scan 10010 rows, because it is not able to find row number 10000 without it. Are ...
1
vote
1answer
811 views

How to represent the following ternary relationship

The following image shows that each department can be associated with several employees and locations, and each location can be associated with several departments and employees; however, each ...
5
votes
1answer
767 views

How to model complex systems like networks in Postgres

I need help with modelling of a network involving switches (24 port, 48 port, POE, and a combination of those) and edge devices (computers, IP cameras, telephones). From an object oriented perspective,...
0
votes
1answer
129 views

Can inserting new rows make the RDB not use an index?

Say I have a table with 10000 records. I then delete them and create them again. This is done with "normal" sql, row by row (not some sort of bulk insert (BCP in sqlserver lingua)). Does the RDB(...
2
votes
2answers
186 views

Database design appoach confirmation

I am working for a mortgage company in migrating a legacy application to new application for managing claims, means lender fore close a loan and request for a claim to get its funds from government or ...
0
votes
1answer
160 views

Verbose Oracle RDBMS error log output examples?

I'm working on a project and my boss has asked that I find an actual example of the "verbose" output of an Oracle RDBMS query error. We want to see what they actually look like. I know that there are, ...
23
votes
3answers
21k views

Is it acceptable to have circular foreign key references\How to avoid them?

Is it acceptable to have a circular reference between two tables on the foreign key field? If not, how can these situations be avoided? If so, how can data be inserted? Below is an example of ...
2
votes
1answer
104 views

Converting a graph database schema to a relational database schema

I currently am using a graph database and am considering moving off of it to a relational database management system like PostgreSQL. My concern is that I have lots of relationships between ...
3
votes
1answer
391 views

Why do we need partitions in PostgresSQL? (or any other RDBMS)

So, I am trying to teach myself partitions in PostgreSQL. I understand that a database can become slow when a table hits millions+ of lines and indexes don't fit into memory anymore. One thing that ...
1
vote
1answer
53 views

Need Help in building database

I am developing an app that send messages (email and sms) to users. The db must also maintains the list of messages send to users. And also the status of messages send to user like send or failed. I ...
0
votes
1answer
248 views

How to store external IDs from different sources?

I have a table of customers with a PK that we can use as an identifier for our internal system. These customers may belong to different companies, each of which may have an external ID in some ...
0
votes
1answer
214 views

Help writing the following query to relational algebra

Can someone help me in writing the following query to relational algebra, I am studying DBMS and I am stuck on this exercise. Query: SELECT a.name, d.name. d.grade FROM student a, enrolled i, class ...
6
votes
2answers
12k views

How to insert values in junction table for many to many relationships?

I have three tables in database: trips(trip_id(pk), trip_name(unique), user_id(fk)) places(place_id(pk), place_name(unique)) trips_places_asc(trip_id(fk), place_id(fk)) Since many trips can ...
0
votes
2answers
161 views

Need help about giving relationships in database design

I am developing a simple blog application in which users can write posts and others can like, comment, share etc. i am facing difficulty in designing database. What I have tried is: user (user_id(pk),...
4
votes
3answers
819 views

How to achieve many to many relationship in this database design?

I am currently working on small travel application in which users can add other users' trips in their wishlist. I am facing difficulty in designing database for wishlist. What I have tried so far is: ...
0
votes
1answer
37 views

Which foreign keys do I use if they are repeated

I have the following two tables company_relationships |ID|Company_ID|Affiliate_ID|<Relationship Info>| +--+----------+------------+-------------------+ jobs |ID|Company_ID|<Job Info>| +...
0
votes
1answer
113 views

Oracle dataguard - Redo apply

In a low bandwidth environment when a transaction commits that generates a large amount of redo data will cause other independent transactions to slow down. This is because the redo data of small ...
1
vote
1answer
793 views

Running queries directly on DB2 databases

Just have a general query, if it is really fine or safe to run long select queries on RDBMS production Databases specifically DB2? If NO, what are the major risks and issues in executing select ...
2
votes
2answers
2k views

What is the advantage of using numeric primary keys in a relational database?

Many tables in a relational database system (in my admittedly limited experience) have this sort of structure (Oracle syntax as that's what I'm used to): create table widgets ( widget_id number ...
3
votes
3answers
3k views

Improve MySQL Query Performance - Too many records

I am using MySQL RDMS for a contact management system. Now a days my database grew in size and contains more than 1 million records. Checking duplicate phone numbers became a big issue during ...
4
votes
1answer
1k views

Optimizing indexes

I just began optimizing my schemas with indexes (pretty late I guess). I never dealt with huge dataset but I'll be soon coping with about 1 to 5 millions rows. Here is the schema I'm using right now ...
3
votes
1answer
5k views

MySQL: What is SQL mode and why we use it

If in an application, if we execute sql_mode=mysql4.0 as a first query in my application but using MySQL 5.1 in my application then what will happen? Will my system use MySQL 4.0 or MySQL 5.1 ...
0
votes
1answer
78 views

why should use MongoDB [closed]

In which types of projects, MongoDB is the best suited? Can we use MongoDB in large applications? Why Open Source CMS and framework doesn't have support for MongoDB? How it is different than other ...
1
vote
0answers
100 views

Why NOSql should be more performant than RDBMS under structured data loads?

The main reason NoSQL dbms have become so common is the need of storing unstructured data where a Relational database instead would require carefully designing a database schema and fitting data into ...
0
votes
1answer
72 views

WHAT RDBMS ( SQL SERVER/ ORACLE ) close to manage MYSQL(DBA) [closed]

i have a requirement for learning MYSQL for DBA. here all training institutes teach on ORACLE AND SQL SERVER. SQL is mandatory to work on RDBMS. what RDBMS SYNTAX CLOSE TO MYSQL for DBA(backups, ...
0
votes
1answer
576 views

Type of Foreign Keys for a Dimensional Model Fact Table?

I've been reading about dimensional models, and in particular fact tables, but I haven't really seen one in action (i.e. the actual content), just diagrams of the table structures and column names ...
1
vote
1answer
338 views

Database Design Concept - Are Multiple Relationships A Bad Thing?

I have a question about Relational Database design. I'm just learning the basics of databases, so bare with me, in that I'm not sure of the technical terms for some of the concepts I'm trying to ...