Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [databases]

The tag has no usage guidance.

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

Datastore supporting TTL with range queries

We have a data access pattern in which we need to get users added in the time range say timestamp-1 to timestamp-2 and we don't want to keep older data say max 1 day, so DB should have an inbuilt ...
tusharRawat's user avatar
0 votes
0 answers
8 views

Can a candidate key for a composite attribute be called a composite key?

Let's take an example of student entity type Name Class Section Address (Line1, Line2, City, State, Country, PinCode) Since composite attribute holds multiple atomic attributes, such that the group ...
tbhaxor's user avatar
  • 208
0 votes
0 answers
46 views

Sensibility analysis for a discrete output data

I have a dataset with 1055 samples and 168 features. I want to remove some features in order to train a model on my dataset. The model should output a binary field (either 0 or 1 that is known). Some ...
mle's user avatar
  • 101
0 votes
0 answers
11 views

How can I anonymize/ de-identify clinical data present in tabular format

So I have been tasked to anonymize clinical data that..most of the time would be present in the form of tables. I've looked into algorithms like generalization,redaction,K-anonymity, l-diversity,t-...
S1000's user avatar
  • 1
0 votes
0 answers
25 views

How does waiting 7ms and atomic clock help GCP spanner create external consistency?

My understanding why distributed transaction need synchronized clock is the following Assume NTP max drift is 250ms ...
olaf's user avatar
  • 101
0 votes
0 answers
49 views

The Green500 ranks supercomputer energy efficiency. Is there such a ranking of energy efficiency for data centers?

The Green500 is a biannual ranking of the world's most energy-efficient supercomputers. It was first measured in millions of floating-point operations per second per watt of power consumed, and is now ...
KEY_ABRADE's user avatar
0 votes
0 answers
56 views

Help understand Z order curve range searching

After "speaking" with ChatGPT, I decided to test Z Order Curve. The code interleaves 2D data, then search for range x: [2..4], y: [2..4] Programming code using C/C++ should be as follows: <...
Nick's user avatar
  • 105
0 votes
0 answers
17 views

How can Amazon Aurora gain higher read-only throughput?

I read the Amazon Aurora paper and in the performance result section (i.e. 6.1.1), it says The results are shown in Figure 7 and Figure 6, and measure the performance in terms of write and read ...
hikky36's user avatar
  • 101
0 votes
0 answers
30 views

Lock upgradation in Two Phase Locking

Is lock conversion (upgradation) from $Shared$ to $Exclusive$ allowed in Basic Conservative Strict Rigorous types of 2PL techniques. Following is an example of disallowed attempt of lock conversion ...
Ajit Kumar's user avatar
0 votes
0 answers
11 views

In SSTables, why is it possible to group records and compress them?

I am currently reading 'Designing Data Intensive Applications' by Kleppman. In the SSTables and LSM Trees section, it is mentioned that one of the advantage of SSTables is: "Since read requests ...
Udeshya D.'s user avatar
0 votes
0 answers
17 views

This diagram serves to determine the components of a data entry in my database. What is the name of this type of diagram?

To properly insert a data entry in my database, I have to reach the last box in this diagram. A box represents either a flag or a data structure that participates in determining a single entry. What ...
shintuku's user avatar
  • 101
0 votes
0 answers
31 views

Polynomial time algorithm for solving SQL queries with EXISTS and NOT EXISTS subqueries

Let $Q$ be a query in the fragment of SQL built up from basic $SELECT$ clauses using subqueries with $EXISTS$ and $NOT EXISTS$. Then for each such fixed query $Q$ I'm trying to show that there is a ...
SVMteamsTool's user avatar
0 votes
0 answers
45 views

Is there an algorithm for finding rows that have same sum of column values up to a threshold value?

I have a table like this (more specifically a nested dictionary) img a b c d e img1 0 0 1 0 1 img2 3 1 0 0 2 img3 4 0 0 0 1 img4 2 2 0 0 0 img5 0 0 0 0 2 img6 2 2 0 0 0 img7 1 0 0 1 0 img8 0 ...
Jeni's user avatar
  • 1
-4 votes
1 answer
66 views

Real world example of complex foregin key references

Give a real world, normalized example where table T1 has primary key (A, B), T2 has primary key (B, C) and T3 has primary key (A, C) and table 4 has a primary key (A, B, C) where (A,B) is a foregin ...
molikto's user avatar
  • 75
0 votes
0 answers
82 views

Is there a sorting program or formula to sort and place individuals in classes based on preferences

I am looking for a formula or program to help place people in classes based on their preferences. The elements of the problem are: There are 30 class choices a student can pick from. There are 400 ...
Nick B. 's user avatar
0 votes
1 answer
80 views

Check whether a decomposition is in 3nf

In a database systems course, we have been presented with the following definition for third normal form (3NF): A relation $R$ is in 3NF means: a nontrivial dependency $A_1,\dots,A_n\to B_1,\dots B_m$...
MiddleEasternPrince's user avatar
1 vote
0 answers
35 views

Relational calculus: "Find all X with at least y amount of Z"

Assuming I have two relations: Supplier [ID (PK), Name, City, Country] and Item [ID (PK), Name, Department, Price, Stock, Supplier_ID (FK)] What would be the easiest way to determine the following ...
T.E.'s user avatar
  • 11
0 votes
0 answers
25 views

Implement this as Attribute or Entity Set?

I am creating a database on students' interests using the Entity-Relationship Model for a University assignment. Should I implement the circled stuff as attribute, or an entity set?
Suchet Saxena's user avatar
2 votes
0 answers
32 views

How can we reduce the spatial complexity of intermediate indexes in relational databases at execution time?

In relational databases, what are the practical or theoretical ways to reduce the size and spatial complexity of intermediate indexes or tables* at execution time (so for example to reduce the size of ...
Heiz's user avatar
  • 21
0 votes
0 answers
241 views

Algorithm to generate unique suggestions for creating an ID

Let's say I have a service where I provide user registration. The user chooses a ID. Now if I already have someone who is registered against that ID, I will inform the user that this ID is already ...
Rinkesh P's user avatar
  • 1,024
0 votes
0 answers
23 views

Primary key's all field should contain value or not?

After reading a lot of materials related to the Primary key and Unique key, I am in doubt. Let us consider a primary key (AB) in table R (ABCDE). AB together can not be null as AB is a primary key. ...
A Paul's user avatar
  • 176
0 votes
0 answers
163 views

Is this decomposition in 3NF?

I have the following question: Consider relation R(A, B, C, D, E, F, H) with the following functional dependencies: A --> D, AE --> H, DF --> BC, E --> C, H --> E Consider three ...
rigidweight's user avatar
2 votes
0 answers
39 views

Primary File Organization in DBMS - Files of ordered records (sorted files)

"Fundamental of Database Systems", 3rd ed. by Elmasri and Navathe, page 136 says: "We can physically order the records of a file on disk based on the values of one of their fields [...]&...
GuestUser's user avatar
0 votes
0 answers
34 views

Mongodb database model for password manager app

I'm doing a school project where I have to design a password manager app. I was wondering what the data model would look like. I know that I will have the user database to store authentication ...
Kevin's user avatar
  • 1
0 votes
1 answer
387 views

How are data structures used along databases?

I just completed a Data structures and Algorithms course in my university. I know how data structures work and how different DS are used to solve specific and to improve efficiency. I have also ...
Ali Ahmed's user avatar
1 vote
0 answers
36 views

Advantages to create Male and Female entities separate from User rather than making gender a property in a database?

The screenshot is from Georgia Tech's CS-6400. The instructor was talking about inheritance of Sub-Types and Super-Types. My question is, why are Male and ...
Erin's user avatar
  • 13
0 votes
0 answers
87 views

Efficient data structure supporting search query with contains

Suppose I have a table with millions strings in it as keys. What data structure can I use in order to efficiently support only queries like that? ...
indigo153's user avatar
  • 101
0 votes
1 answer
19 views

What does it mean to 'provide' an API call?

So I have a database pre-loaded with data related to food recipes and the assignment says: 'Provide an API call that allows us to specify an ingredient or set of ingredients and return full recipes ...
michaelgz13's user avatar
3 votes
1 answer
98 views

Automated Query Equivalence Solver (MongoDB)

The query-equivalence problem is undecidable. However there are theorem provers that attempt to solve instances of undecidable problems. I am curious how I could go about using an automatic theorem ...
himself000's user avatar
0 votes
1 answer
370 views

AVL Tree rotations

What size is the largest AVL tree for which an insertion could trigger a double rotation?
jon pierre's user avatar
0 votes
1 answer
169 views

Figuring out the equivalence between two definitions of "transitive functional dependencies" and intuition behind the intended meaning of definition

The definition given below is present in the exercise of the text Database System Concepts by Korth et. al. Let $\alpha$ and $\beta$ be sets of attributes such that $\alpha \rightarrow \beta$ holds, ...
Abhishek Ghosh's user avatar
1 vote
1 answer
98 views

Is this a mistake in the textbook? Fundamentals of Database Systems 7th ed

Aggregation is an abstraction concept for building composite objects from their component objects. ... the possibility of combining objects that are related by a particular relationship instance into ...
thenewboston2's user avatar
0 votes
0 answers
18 views

where to get detailed information about some file format?

i want to learn about the structure of a .blk file but the problem is I don't know where to look for detailed information of this sort, most of the google searches I made gave me links to viewers.
zed_eln's user avatar
0 votes
0 answers
315 views

Creating a database of math questions and of answers and a front end for them

Need some guidance on where to begin. I am just learning python if it has any bearing. I want to create a page on my site where users log in, choose multiple topics from a list, choose between levels ...
E2R0NS's user avatar
  • 101
2 votes
1 answer
35 views

How to simplify the query qualification?

Given the following DB and query : Now if we need to simplify the query qualification, here is the answer from the book (Principle of distributed database systems, third edition) : My question is in ...
Adam John's user avatar
1 vote
0 answers
26 views

First normal form

I am confused about an aspect of the definition of first normal form in relational database model. Codd 1970 ("A Relational Model of Data for Large Shared Data Banks") defines normalization (...
JacquesB's user avatar
  • 121
1 vote
0 answers
103 views

constant relation in the base case of relational algebra

in the base case of the inductive definition of the operations of the relational algebra there is also the so called "constant relation" (as for example found in the definition here https://...
sorry's user avatar
  • 155
0 votes
0 answers
60 views

What is meant by A determine BC in functional dependency. How the validity of this statement will be checked

We use notation A determines BC in a database for functional dependency. Same way we use equations in mathematics which shows dependency of variables. We have inference rules in logics, functions in ...
Rakesh Kumar Katare 's user avatar
0 votes
1 answer
95 views

In database buffering why is it important : no writes to a block (which is to be moved from the disk buffer section of main memory) be in progress?

I was going through the concept of database buffering from the Database System Concepts text by Korth et. al where I came across the excerpt below. The rules for the output of log records limit the ...
Abhishek Ghosh's user avatar
0 votes
1 answer
158 views

WAL rule requires only the undo information in the log have been output to stable storage, and permits the redo information to be written later

I was going through the "write-ahead logging (WAL) rule" from the Database System Concepts text by Korth et. al, where I came across the following excerpt: Strictly speaking, the WAL rule ...
Abhishek Ghosh's user avatar
-1 votes
1 answer
26 views

Is there computer for specify purpose that perform database task?

Is database server really really exist? i mean the server wasn't made by general purpose computer but that database device have their own hardware and architecture. We know that good database server ...
Muhammad Ikhwan Perwira's user avatar
0 votes
1 answer
54 views

Algorithm to calculate the period where cumulative days within a rolling period exceeds a threshold

I'm struggling to think of the algorithm to transform one data set to another. The problem I'm looking at is creating a dataset of periods of time where cumulative days absent within a period (eg 30 ...
therealkeys's user avatar
1 vote
0 answers
38 views

Which of the query approaches are more efficient?

There are two relations, registered(participant,topic) and fee(participant,amount). The primary key for registered is (participant, topic) and the primary key for fee is participant. The premise is ...
Swarnabja Bhaumik's user avatar
1 vote
1 answer
125 views

Data model and database schema

I need to test my understanding of the difference between the data model and database schema. According to my understanding, the data model is a description of how the data will be stored and the ...
AAA's user avatar
  • 43
2 votes
0 answers
90 views

Database Access Cost Estimate - Linear Search over non-key attribute

How does one estimate the access cost for the below query given that the data is sorted according to a non-key attribute, that the data is not uniformly distributed across all possible values of said ...
Scb's user avatar
  • 123
0 votes
1 answer
707 views

What is the difference between a state machine and a database

I didn't study computer science as a degree, so whilst having studied computer science, there are still gaps in my knowledge. Everything I read about 'state' sounds like some form of 'data' but kept ...
timhc22's user avatar
  • 101
2 votes
2 answers
49 views

If a user confirmed a booking or transaction on the database system, but it failed and it falls over to the replica, what if the transaction is lost?

This is an overall system design and DBMS question: If the user books a ticket or an item on a website, how do we solve the issue of confirming a ticket is sold to the user, but the main Database ...
eulerIdentity's user avatar
0 votes
0 answers
69 views

How attributes helps us to allow column interchange in a relational database?

A relation on two sets $A$ and $B$ is defined as the subset of the cartesian product $$A\times B = \{(a,b),\ a \in A, b \in B\}$$ A database is also a relation and each entry is an ordered tuple ...
killua's user avatar
  • 33
1 vote
0 answers
35 views

Is Neo4J computationally equivalent to relational algebra

I am wondering whether Neo4j and the associated Cypher query language is computationally equivalent to relational algebra? Any ideas or papers on that topic?
dan b's user avatar
  • 91
0 votes
1 answer
506 views

Relation is in 2NF or not?

Consider a relation R(A,B,C,D,E) and the only FDs, ABD->C BC->D CD->E These are the only 3 FDs. I want to know if the above relation is in 2NF or not. According to the definition of 2NF, a ...
user9544852's user avatar

1
2 3 4 5