Questions tagged [relational-theory]

On this site this tag applies to questions about Relational Model theory. The Relational Model for database management is an approach to managing data using a structure and language consistent with first-order predicate logic. In the Relational Model of a database, all data is represented in terms of tuples, grouped into relations. A database organized in terms of the Relational Model is a relational database.

Filter by
Sorted by
Tagged with
0
votes
1answer
41 views

Must tuples of a relation and their referents be in a one-to-one relationship?

Figures 3.a and 3.b, section 1.4, page 381 of Edgar Codd’s 1970 landmark paper ‘A Relational Model of Data for Large Shared Data Banks’ presents a set of relation schemas (unnormalized in figure 3.a ...
0
votes
0answers
36 views

Review of my Grade Calculator Database Design

I'm currently making a Grade Calculator which will be used by students of a university to calculate their own grades. I'd greatly appreciate feedback on the design I've made. Do you see any obvious ...
0
votes
2answers
38 views

Unique relationship attribute for every pair of entities

I have entities "Student" and "Course" and they are connected with relationship many-to-many called "Exam". The relationship "Exam" has an atribute "Grade&...
0
votes
1answer
21 views

How can I categorize entites by their age in an entity relational diagram?

I am designing an entity relational diagram and I need to categorize entities in groups by their age. What I have is an entity of Person and some personal attributes about it. But I want to have ...
3
votes
2answers
160 views

Why does metadata have to stored in table cells according to Codd's 12 rules

Among Codd's 12 rules for Relational Database Management Systems is Rule 1, which states the following: Rule 1: Information rule All information(including metadata) is to be represented as stored ...
0
votes
0answers
24 views

How does DBMS ensure durability without flushing

I was watching this video, and at a certain point (don't recall the exact minute) the speaker says that the DBMS doesn't immediately flush the file when updates happen. He explains that IO operations ...
1
vote
3answers
225 views

Does relational design discourage splitting tables unnecessarily?

It's been a long time since I studied relational design, but I had a vague memory that it encourages not splitting a table unnecessarily. For instance, given the functional dependencies K -> A K -&...
0
votes
2answers
135 views

How to normalize a table with multiple cells that have multiple values?

So I'm doing a task where I take a massive list (30,000+) of movies on Wikipedia that have multiple columns (such as the films name, the genre, the cast, the plot etc.) and upload it into ...
1
vote
3answers
95 views

Is it allowed to for two tables to have two types of relationships between them? [duplicate]

I have been going back and forth working with relational and no-sql databases for some time now and my questions may be the result of mixing the way of thinking about how to approach a problem. So ...
0
votes
1answer
62 views

Is Star/Snowflake database design good for applications? What is the alternative?

I need to solve an exercise for a pharmaceutical company, they ask me to create a database structure from scratch given a few informations. Because I want it to be scalable and "future proof"...
-1
votes
1answer
21 views

Job Opportunity and difficulty (or not) for me to learn to use msaccess and surveygizmo/alchemer [closed]

First, if my question fits better elsewhere, please advise. My question is: Based on your experience with relational databases like MSaccess and perhaps survey tools like Alchemer (formerly Survey ...
0
votes
1answer
154 views

Immutable field/cell in Postgres

Is there a way to create an immutable field/cell in a Postgres record? AKA, only allow the field to be written once, perhaps just on insert? Use case: I have a "uuid" field for a record, and ...
-1
votes
1answer
18 views

Help designing a Table(s) with a single message to multiple placeholder values, with new placeholders added occasionally [closed]

The basic situation is I have a single 'message' table, and currently our design for this is a single row, with all placeholde values stored against the row at generation, so they are available for ...
0
votes
3answers
526 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 ...
0
votes
2answers
223 views

database management system vs database vs tables vs file [duplicate]

I have been trying to understand the way a database system works. Digging through the internet, I have come to following picture. Database system is required because we need a way to store data, ...
0
votes
1answer
44 views

“Tuples in a weak entity set are partitioned according to their relationship with tuples in a strong entity” - meaning?

http://web.cs.ucla.edu/classes/fall04/cs143/solutions/chap2.pdf In the above link, there is the following statement - "Tuples in a weak entity set are partitioned according to their relationship ...
2
votes
1answer
201 views

Incorrect relationships formed in EER diagram by reverse engineering the database script

I have a database with 6 tables. I tried to view the relationships between the tables by using EER diagram. I observed that all the one-to-one relationships were converted into one-to-many ...
0
votes
1answer
161 views

Data Schema For Stock Control / Multi Source Inventory

I'm working on a project that involves stock control with multiple stock sources and sales channels. The overall hierarchy I've got so far looks like this; Sales Channels <---- Allocated Stock ...
3
votes
2answers
310 views

One and only one relationship - ER diagram to relational schema

I'm taking this term a DB course as part of my CS studies. This week we began studying the subject of ER diagrams, which I find a bit confusing. I have some uncertainty about the picture above (Note: ...
0
votes
2answers
30 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 ...
2
votes
1answer
58 views

In what cases is using ClickHouseDb and the like a neccessity?

An open source for website analytics - https://github.com/plausible/analytics They use Postgresql and ClickHouseDb. When it comes to web analytics, there're tons of events going that need to be ...
-1
votes
4answers
128 views

How to store a (record which holds a) reference to any other column (attribute) in another table (relation)

TL;DR: If the database schema should hold all the business logic, how is it be possible to specify that an attribute type is a reference to a specific attribute, instead of a specific record (as is ...
-3
votes
1answer
53 views

Is file system in DBMS same as file handling in C programming language?

We know that file system in not good for storing data , thus relations(tables) are used in DBMS. When we talk about files in database management system (DBMS), are these same/similar to that in C ...
0
votes
1answer
20 views

How to add an additional table over two one to many relations tables?

I have two tables TableA and TableB which have a relation of one to many Later I am told that there must be an additional table that links the initial tables with additional information. To carry ...
0
votes
0answers
23 views

Can a table be un-normalizable or am I misunderstanding the theory

I was considering normalizing a flat table (SQLite if its relevant) I'd been working with in a small personal project and it just didn't seem to make sense. Consider an example table like below. Each ...
0
votes
2answers
102 views

RDBMS: Proper way to store data - comma separated variables or in different fields or tables?

Fundamental question that I cannot seem to find an answer on. I have a database that stores line items from receipts along with the username and receipt number. Right now the lineItem column is just ...
1
vote
1answer
22 views

How can I calculate the cost of the query, if there is a `between` condition?

How can I calculate the cost of the query, if there is a between condition? Select * From A Where A.id between 10 and 50 If Index not exists and there is only one condition: Search in B+ tree to ...
3
votes
2answers
209 views

Incorrect result when using 'case when count()=0' & 'where'

I would very appreciate if someone could help me out with this query. I can't seem to get the correct result when using case when count()=0 & where I work with SQL Server, with a DB of a system ...
1
vote
1answer
25 views

Storage strategy for combination of all table items

Let's say I've one table with items with the following fields: id_item name description & one table with the user information, following like: id_user email name Now I'd like to let vote my ...
1
vote
3answers
784 views

How do you determine the direction of a relationship?

Suppose I have the following relationship diagram: How would you describe the relationship determined by the red line? Reading from left to right you would say each order has only one customer so it ...
1
vote
1answer
44 views

Is it possible to enforce corresponding hierarchies?

I constructed the following toy example to illustrate my question. The left side of the schema describes a an abstract product consisting of its parts. The right side of the schema describes actual ...
1
vote
0answers
194 views

Can there exist Tables with no Non-Prime Attributes? If so, are they always normalised to 3NF?

Can there exist a table with no non-prime attributes? Here is an example of a table which I believe has no non-prime attributes: I came to this conclusion because the list of attributes in the ...
1
vote
1answer
41 views

Database design where % of rows have unused attributes/columns

Is there a theory/practice that promotes a design by analysing the usage of attributes of a table, such that given a threshold of unused columns over a percentage of rows would suggest that the ...
1
vote
0answers
106 views

Properties of grouping in relational algebra

The properties of relational algebra (commutativity, associativity, distribution) allow us to take a relational algebra expression and transform/rewrite it into another one which is logically ...
0
votes
0answers
46 views

Delete duplicate keys with relation algebra without count

Hi I am new to relational algebra. I was wondering if there is a way to remove the tuples from a table using relational algebra that have the same Value occurring in multiple columns or same column ...
0
votes
2answers
187 views

Delete duplicate keys with relation algebra

Hi I am new to databases and relational algebra. I was wondering if there is a way to remove the tuples from a table using relational algebra that have the same keys but different value. e.g. I want ...
0
votes
1answer
18 views

Creating a relationship between a document and a collection in MongoDB

I have no idea if this is even possible but I'd like to find out if there's some way to create a relationship between a document and a whole collection. I have a user schema that looks something like ...
0
votes
1answer
504 views

BCNF decomposition step without functional dependencies

I am performing the BCNF decomposition for the relation R = (A, B, C, D, E), that has the set of functional dependencies AB -> C, CD -> A, C -> E, and C -> B. After checking that the ...
0
votes
0answers
367 views

How functional dependency imply multi valued dependency?

I understand following informal definition of multi valued dependency: If multi valued dependency is α↠β, then whenever the tuples (a,b,c) and (a,d,e) exist in relation r, the tuples (a,b,e) and (...
0
votes
0answers
33 views

SARGABLE predicate must be in DNF. Why?

This famous paper about finding Access Path in Relational Database Management System by Selinger et al. says the following about criteria tree and predicates (at the end of 3rd section). A sargable ...
0
votes
1answer
35 views

Relational database field name design [closed]

Are there design patterns for naming table fields? For example, I've always used user (table)> email (field), but I see other well-used modes like user (table)> user_email (field). Are there any rules ...
1
vote
0answers
26 views

Using relational algebra to check a condition for all

I encountered this question while revising for my finals exam on database theory. The following database contains information about car repair workshops. The following tables are used: Given two ...
0
votes
4answers
427 views

Why is it considered that a set unnormalizes a database absolutely?

In order for a relationship to be on 1NF it needs to have all values as atomic, if there's a set it's not even in that first normal form: But intuitively I think that a table with that set would be ...
0
votes
1answer
90 views

See direct (instead of indirect) info about rented book in my “actors_directors” talbe dropdown list - Access365

I'm building a database of "actors_directors" who are renting "books" from my library - a kind of exercise to learn database basics :-) This is how my "actors_directors" table looks like. They are ...
1
vote
1answer
61 views

Entity Relationship Diagram - Entity depending on attribute

I have an ER-Diagram containing the entity employees. When employees have high skills they may supervise lower skilled employees. How can I model that in an ER-Diagram? My initial approach of was to ...
2
votes
1answer
151 views

Why is this relation not in Boyce-Codd Normal Form (BCNF)?

I have the relation (A,B,C,D,E). The relevant functional dependencies are: { E,B,C } → { D } { A,B } → { C } { E,B,D } → { C } { E,A,B } → { D } The candidate key is (E,A,B). I do not understand ...
0
votes
1answer
430 views

Finding all possible minimal covers

I have a relation schema R = {A, B, C} and the following functional dependencies: A → B A → C B → A B → C C → A C → B How many different minimal covers can I derive from this relation schema? I have ...
1
vote
1answer
196 views

What is a “part-key”?

I'm a beginner and student with regards to database design. The tutor recently discussed “part-keys”. I am struggling to find any information on what a part-key is, and I suspect it probably goes by ...
-1
votes
1answer
40 views

How do I bring a relation/table to first normal form (1NF) when one of the attributes/columns can hold any number of values?

For example, MOVIES (movieid, movietitle) where movietitle can be any number of words, so I believe it's not atomic. How do you bring something like that to 1NF?
3
votes
1answer
717 views

Normalization with two potential primary keys

I have the following STUDENT relation in first normal form, where id has been identified as the primary key (email here is also unique for all tuples): STUDENT(id, email, first_name, last_name) I ...

1
2 3 4 5
9