As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [databases]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
262 views

What are the essential differences and similarities among "data", "Information" and "knowledge" in the context of Computer Science?

The terms "data", "information" and "knowledge" are quite interchangeably used in Computer Science. Strictly speaking, they do carry a very different meaning. I want to know their precise meanings and ...
Maxood's user avatar
  • 299
0 votes
1 answer
142 views

Is relation following given characteristic already in 2NF, 3NF and BCNF?

The definitions of 2NF, 3NF and BCNF goes like this: 2 Normal Form (NF) definition A relation is in second normal form if and only if it is in first normal form and all the non-key attributes ...
RajS's user avatar
  • 1,607
0 votes
1 answer
535 views

Use of existential quantifier in tuple relational calculus

It is somewhat confusing to me when to use quantifiers in tuple relational calculus (TRC). I stumbled upon following problem and I am still scratching my head thinking why not TRC query can be ...
RajS's user avatar
  • 1,607
-2 votes
1 answer
741 views

Query Super Type and Subtype in Mysql

Assuming I have a schema depicted in the image , showing relationships(specialization) between Staffs, Academic Staffs and Non Academic Staffs. Is it possible to have a query that retrieves the ...
ALABI Jesujoba's user avatar
0 votes
0 answers
310 views

Data structure for a single elimination tournament and its implementation

I want to implement a tournament managing software , something like challonge(https://challonge.com/) and am currently stuck at the data structure to be used. I read up on tournament trees and a ...
Niteya Shah's user avatar
0 votes
0 answers
196 views

Databases - How to generalize an sql query from a specific input? find project number, number of employees

Schema: http://comet.lehman.cuny.edu/jung/cmp420758/DBMidexamFa14-SelectedSolution.pdf Write SQL code to find the following details: For each project: find the project number and the number of ...
Protein's user avatar
3 votes
1 answer
978 views

Fastest way to search a word in a word list?

I have a word list like "English Open Word List" used to create word games. The list is in txt file with space between words, like; aa aah aahed .........and so on. I want to search it while typing ...
Jason Depp's user avatar
4 votes
0 answers
43 views

Any elegant approach to search where users have permissions on subset of records?

I work in Search and have seen following problem appear in different forms. There are many users in an enterprise; they have ability to create records. Each user has variable level of access to some ...
Asad Iqbal's user avatar
-1 votes
1 answer
468 views

What is the equivalent form of full outer join in relational algebra?

Considering only basic relational algebra operations, how can we implement the full outer-join ?
fhm's user avatar
  • 21
2 votes
1 answer
144 views

How to do compare-and-increment different locations with in memory MVCC?

I'm reading the paper An Empirical Evaluation of In-Memory Multi-Version Concurrency Control which is about implementations of MVCC for in-memory databases. Section 3.3 on Two-phase Locking (MV2PL) ...
Majid Azimi's user avatar
1 vote
0 answers
676 views

Question regarding ER Diagram design

I'm working through a Database Design textbook, and one of the problems involving ER Diagram design is giving me some trouble. The diagram is for a UNIVERSITY database with the following rules: 1) ...
enharmonics's user avatar
0 votes
1 answer
772 views

Transitive dependency in 3NF

Came across this question : State whether True or False A prime attribute can be transitively dependent on a key in 3NF Answer: True How could this be true? Because as far as I know, A relation ...
virmis_007's user avatar
0 votes
0 answers
33 views

concurrency control in real time database

Can Lamport's Bakery algorithm be used for controlling concurrency in soft real time database system (case study of stock trading)?
Janet  Taiwo's user avatar
1 vote
1 answer
5k views

Why must a Primary Index be sparse?

Reading Fundamentals of Database Systems 7th Edition, on Page 603, it says, Indexes can also be characterized as dense or sparse. A dense index has an index entry for every search key value (and ...
Evan Carroll's user avatar
-1 votes
2 answers
613 views

Does 2NF require 1NF?

From Database System Concepts, by Silberschatz, Korth and Sudarshan : A domain is atomic if elements of the domain are considered to be indivisible units. We say that a relation schema ...
Tim's user avatar
  • 4,785
1 vote
1 answer
609 views

Are all relational schemas with partial dependencies not in 3NF?

From Database Management Systems, by Raghu Ramakrishnan, ‎Johannes Gehrk Let R be a relation schema, F be the set of ...
Tim's user avatar
  • 4,785
1 vote
2 answers
10k views

Order of a leaf node in B+ Tree

Going with the definition, that order of a B+ tree is the maximum number of children a node can have. What is exactly meant by the order of a leaf node? As per my understanding order of a leaf node ...
Shiwam Singh's user avatar
0 votes
0 answers
232 views

Domain relational calculus to relational algebra

I have an expression in DRC $\{\langle a,b,c \rangle \mid \langle a,b \rangle \in r \land \langle a,b \rangle \in s\}$, where $r = (A,B)$ and $s = (A,C)$. I want to convert it onto relational algebra ...
Muslimbek Abduganiev's user avatar
0 votes
0 answers
109 views

Differences among meta-data, catalog, data dictionary, and schema

What is the exact meaning of these terms? Very confusing. Most of the articles uses these terms interchangeably.
dprobhat's user avatar
2 votes
2 answers
37 views

Inferring used fields in return type

A common issue in app development is avoiding over-fetching of data, such as in this naive (pseudocode) example: ...
Gaelan's user avatar
  • 123
1 vote
1 answer
61 views

If we allow a database, what complexity class it is?

Let we have some problem $A$. Input length is $n$. Now we write a database that will store info about some positive instances of problem $A$. For every $n$ size of $n^{th}$ sector of DB is $O(f(n))$. $...
rus9384's user avatar
  • 1,393
0 votes
1 answer
352 views

SQl query output

Consider the table employee(empId, name, department, salary) and the two queries Q1 ,Q2 below. Assuming that department 5 has more than one employee, and we want to find the employees who get higher ...
rahul sharma's user avatar
-2 votes
1 answer
34 views

Aren't the servers that store MYSQL database in Facebook down for maintenance ever as Facebook is always on? [closed]

I have never seen my account not being able to login!
Sweeter Mann's user avatar
1 vote
0 answers
35 views

which paper to take that would best fit to becoming a data scientist? [closed]

My name is Webber from Auckland, New Zealand. I am currently in my second year studying the bachelor of computer and information science. I have chosen to do a double major in computational ...
webber's user avatar
  • 11
0 votes
1 answer
75 views

How large would a database containing perfect knowledge of chess be?

Assuming that a database entry schema contains two 64-bit hash IDs generated via the algorithm explained here, in the section "Generating Hash Keys for Chess Boards", and simply a score that's a 32-...
Patrick Roberts's user avatar
1 vote
2 answers
48 views

Would limiting the number of operations in a transaction prevent SQL injection?

In my understanding all SQL injections need to add another operation to the one intended by the programmer. For example, a badly written query: ...
AnduHD's user avatar
  • 11
0 votes
1 answer
42 views

R-Tree multipath search - remember the path?

R-Trees can take several paths to retrieve an item because of overlaps in data being indexed or index structure. However, if we run the same search many times on the same unmodified structure, can we ...
audlift-bit's user avatar
0 votes
0 answers
472 views

Determining the cost of multi phase multiway merge sort

Let's say I have a disk with an average seek time of 10ms, an average rotational latency of 5ms and a transfer time of 1ms for a 4kb block and the cost of reading the block is the sum of these values. ...
david mah's user avatar
  • 101
5 votes
1 answer
416 views

Differences between the OS and DB buffer pool?

How does the DB manage a pool of buffers when the operating system ends up controlling what's really in memory? For example, couldn't the operating system decide to evict a page frame from a DB's ...
Jae's user avatar
  • 151
1 vote
0 answers
67 views

Need help with functional dependencies (Database Theory)

I'm trying to understand functional dependencies in databases. Let's say, there are 3 tuples in an instance of a certain relation S as shown below. I'm trying to determine if a certain functional ...
El Dj's user avatar
  • 151
1 vote
1 answer
161 views

Ambiguity in choosing the best ER model

I am actually little bit confused when I am reading through the text - Database system concepts by Henry F. Korth and others I won't be able to understand one thing, which one of the following models ...
Jaspreetsci's user avatar
3 votes
1 answer
816 views

How to evaluate relations in a DAG?

To begin with: what I know of computer science is what friends have told me and what I've read on Wikipedia. Please correct me if I'm using some term wrongly, or if there is something I can clarify. ...
Jobjörn Folkesson's user avatar
4 votes
1 answer
3k views

Time Complexity of Sort-Merge Join

According to this German Wikipedia article, the time required to merge relations $R$ and $S$ is $\in \mathcal{O}(|R| + |S|)$ if both relations are already sorted. [Note: You don't really need to read ...
UTF-8's user avatar
  • 177
-2 votes
1 answer
38 views

How does NULL behaves with distinct keyword? [closed]

Suppose I have a relation R How many tuples are returned by SQL query SELECT distinct manager FROM R Is it $2$ or $4$ ?
mcjoshi's user avatar
  • 127
4 votes
2 answers
199 views

Measuring availability from CAP theorem

I wonder how to check availability property from CAP theorem. Consistency check is conceptually easy: if at least once somehow same query at the same time returns different results, then the system ...
Yurii's user avatar
  • 103
0 votes
1 answer
643 views

How is the R-Tree's MBR size determined? Changes to MBR?

The R-Tree creates 'rectangles' to index 2D data. How is their size calculated exactly? What happens to the performance by changing this parameter i.e. the size of this rectangle/MBR? Number of ...
Zeruno's user avatar
  • 101
0 votes
0 answers
38 views

What exactly does a relationship in ERwin DM signify?

I am working on a project that requires the creation of a database. Of course we have used ERwin, which seems to be a well known tool for data modeling. My team member just completed the ...
Kyrhee Powell's user avatar
2 votes
1 answer
125 views

Are there any types of distributed databases which allows untrusted peers, like Blockchain?

Are there any types of distributed databases which allows untrusted peers, like Blockchain? If it exist, can I look its whitepapers and/or implementations?
signal's user avatar
  • 165
1 vote
0 answers
53 views

Advantages of using a RDBMS

Apologies if this isn't the correct forum but I thought it would be too academic for the DBA forum. In my work I'm looking to research some of the benefits of using an RDBMS product over traditional ...
user5495269's user avatar
0 votes
1 answer
793 views

Algorithm for finding best match between two database rows

Let's say we have a database with a given table named food. The food table has many columns but we are interested in only 3 of them: buyorsell, which specifies if ...
kitsuneFox's user avatar
-4 votes
1 answer
609 views

Use examples to identify the need of join dependency

Use examples to identify the need of join dependency. This is what I have gathered from different website's. SQL joins are used to combine rows from two or more tables. A Join Dependency (JD) over a ...
rajesh singh's user avatar
0 votes
0 answers
288 views

Graph Databases vs Relational Databases(Possible applications)

Apart from the fact that there isn't really a language as SQL and they are less standardized , i was wondering (in terms of their applications) where graph databases are (or can be) more efficient ...
doze's user avatar
  • 21
1 vote
0 answers
228 views

Finding smallest canonical cover from given set of functional dependencies

I did not find any book discussing this but I came across the problem. The given set of FD was: $F=\{B\rightarrow A,D\rightarrow AC,B\rightarrow C,AB\rightarrow D,BC\rightarrow D\}$ Surprisingly the ...
Mahesha999's user avatar
  • 1,745
20 votes
6 answers
3k views

Why must uncommitted transactions be undone in backwards order?

I have a database log where some transactions win (they are committed before crash) and some lose (not committed yet). We learned in class that the losers' actions have to be undone backwards. Is ...
prjctdth's user avatar
  • 201
5 votes
1 answer
566 views

blockchain database - why so redundant

I've become interested in blockchain databases. Everywhere I've read it said that each user has to have his/her own copy of database. Why can't distributed blockchain database be 'distributed' to ...
Alex Martian's user avatar
0 votes
0 answers
50 views

Proof of RAP-derivation sequence for a set of functional dependencies in relational databases

I'm reading David Maier's outstanding but out-of-print book on relational databases (the book,"The Theory of Relational Databases", is available online from the author's website http://web.cecs.pdx....
Chav Likit's user avatar
4 votes
2 answers
115 views

Is there a fundamental CS problem in ORMs that leads to N+1?

Many of us are familiar with N+1 problem when working with database queries. The problem was known before ORMs (Object-relational mapping frameworks) came around, but it seems that ORMs exacerbated it....
Andrew Savinykh's user avatar
2 votes
2 answers
56 views

Restricting capabilities of admin role in database schema

Suppose I have to design database for learning management system. Which will going to have user having roles such as admin, teacher, tutor, student etc. In a system student can submit solution for an ...
AnSh's user avatar
  • 83
8 votes
1 answer
2k views

What is the difference between a R-tree and a BVH?

I've just read about R-Trees: The key idea of the data structure is to group nearby objects and represent them with their minimum bounding rectangle in the next higher level of the tree; the "R" in ...
Martin Thoma's user avatar
  • 2,340
0 votes
1 answer
217 views

Lookup complexity in B-trees [Database]

Given that: B = n/R blocks in the file 2d index records per block (blocking factor): 2d > R an extra block access from the index to the datafile I am not able ...
letsBeePolite's user avatar