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 ...

learn more… | top users | synonyms (1)

1
vote
2answers
23 views

How to model that several variants of a merchandise item may affect its price?

I am an absolute beginner to relational data modelling. I hope my question will be acceptable here nevertheless. Let’s say there’s a merchandise. An item of merchandise may have variants. (While it ...
1
vote
0answers
47 views

How does one map nested multi valued attributes?

Let's say one has an Entity E. E has a multivalue Attribute M1 and a simple attribute A1. However M1 consists again of a multivalue Attribute M2 and a simple Attribute A2. How would one map this ...
-4
votes
1answer
31 views

Relational model 1:1 relationship [on hold]

Can a one to one relationship exist without the primary key- foreign key tie up? Please give an example.
0
votes
1answer
39 views

Hierarchial, tree-like data model, which DB type? [closed]

I have the need for a database, I know what to store, however the question is what database to use and why. I have used relation SQL databases a lot in the past (up to a few years ago) and I know I ...
1
vote
1answer
18 views

A tuple relational calculus equivalent for the given SQL query

well here's a SQL query select Employee.Name,Department.Name from Employee,Department where Employee.Dept_no=Department.No I have tried a tuple relational calculus on it as {t|Ǝ s ∈ Employee (s[...
4
votes
2answers
205 views

Difference between an Entity and a Relation

I am currently reading about entities and relations and I can't understand the difference between them? According to Wikipedia we have an example of a relation like in the pic: This looks exactly ...
0
votes
1answer
215 views

Suitable schema to record email sent and response received and invoicing in DB

When a form submission is made on a website: An email with form's details is sent to a set of recipients email addresses stored in a DB. The email contains a link for the recipient to show interest. ...
3
votes
2answers
268 views

Convert query in words to relational algebra

I have a follow-up question to a question I have previously asked on SO. Instead of the query from my initial question, I want to convert the following into relational algebra: List the names and ...
2
votes
2answers
62 views

How can I represent a list of words and related words in a relational structure?

I have a list of header words and words as below and I am trying to understand how best to represent these in a relational table: Header Other Words Words abandon abandoned, ...
2
votes
1answer
85 views

Estimate result size of Natural Join

I have the following tables R1(A, B, C) with 1.000 rows R2(C, D, E) with 1.500 rows R3(E, F) with 750 rows where a bold letter denotes a primary key. I need to estimate the number of rows of the ...
5
votes
1answer
143 views

Data inconsistency prohibition if a table refers to another via two many-to-many relationships

I have following database design (by => foreign key constraints are depicted): Company[id] CompanyRealm[id, company_id=>Company.id]many2many Project[id, company_id=>Company.id] ProjectRealm[id, ...
5
votes
2answers
214 views

Best data modelling approach to handle redundant foreign keys in relational model

I am looking for advice on the best relational modelling approach to store surveys, questions, and responses. I am looking for which of the two approaches below looks best, or an alternative approach ...
0
votes
2answers
650 views

What's the use of assigning foreign keys on MySQL [duplicate]

Aside from indexing the value of the foreign key, what is/are the advantage of assigning foreign keys to databases? I've seen a lot of databases that does not assign foreign keys, but is relational by ...
0
votes
1answer
43 views

How to express functional dependency in relational calculus and SQL?

I want to express in relational calculus and SQL the following functional dependency associated with Vote. This is the first time I try to implement it in actual SQL and relational calculus. Vote: #...
2
votes
1answer
20 views

What a closure `F` of a family of functional dependencies is?

I have some issues to determine what a closure F of a family of functional dependencies is. I know its definition is F⁺= {X → Y\F⊨X → Y} One example Let be the following relation R(Student,...
2
votes
2answers
66 views

Dependency preserving decomposition

Let be the following relational scheme: F={AB → C; AC → B; AD → E; B → D; BC → A;E → G} Is the following decomposition without loss of dependency? R¹=(A,B),R²=(B,C),R³=(A,B,D,E),R⁴...
4
votes
1answer
28 views

What normal forms are these two relations in?

I have a set of relations {A, X, Y, Z}: Given that the functional dependencies: AX→Y, AX→Z, Y→A, Z→X, I would think that this relation would be in the normal form 1NF, because there is a partial ...
6
votes
2answers
149 views

Creating relationships between tables that where not specified in the given UML diagram

Good evening! I'm working on designing my very first actual database from the following UML class diagram (in French unfortunately): I'm at the point of creating the relational sketch of it which ...
0
votes
1answer
35 views

What are the conditions for a functional dependency to exist?

Let be a relation R of scheme: R(A,B,C,D,E) and r an instance of the relation. What functional dependencies verify r? Observing the functional dependencies that r verify are doesn't show that they ...
0
votes
1answer
40 views

Decomposition In Boyce-Codd Normal Form may lost relations?

Let be the following Realtion R={UtilisateurID, Nom, Prenom, AdresseEmail, Login, Passwd, ServeurMail} with the functional dependencies: F = { UtilisateurID → Nom, Prenom UtilisateurID, ...
1
vote
1answer
31 views

Why does 3NF Normal form allow transitive dependency of prime attributes?

I'm just a beginner in Relational Design, When i came across the definitions of 3NF and BCNF. According to 3NF, Any non-trivial functional dependency X-> A shouldnt exist unless X is a super key or A ...
1
vote
2answers
62 views

Is this table in third normal form?

I have a table L(A, B, C). Functional dependencies are: A->B, A->C, B->A, B->C. Is this table in 3nf? My thoughts: A and B are keys of this table. Table is in 3nf if there are no transitive ...
0
votes
0answers
26 views

Modeling a database with UML scheme and every type of relations

Good evening! This is my second database designing, the first one can be found here. I want to find the relational scheme of bridal registry database given in the following French UML graph: I ...
0
votes
0answers
15 views

Algorithm of decomposition in Boyce-Codd Normal Form

I have to give the keys of the following relation, say if they are 1,2 or 3NF and give a BCNF decomposition. Yet I think I misunderstand the difference between 2NF and 3NF: R(A,B,C,D,E) with F¹={A→B;...
0
votes
1answer
38 views

Grouping operator in DBMS (γ) is duplicate-impervious. Why?

I'm reading Database Systems by Ullman where its mentioned that γ is duplicate-impervious. I don't understand why a simple group operation should cause elimination of duplicates. Aliter, Duplicate-...
1
vote
1answer
60 views

How to decompose this relation into 3NF relations?

Today I read about the 3NF decomposition algorithm. It said: Find a minimal basis of F, say G For each FD X → A in G, use {X, A} as the schema of one of the relations in the decomposition ...
2
votes
1answer
32 views

Decompostion with loss of information shown by junction

F={A → B; B → C; C → D} R is decomposed in R¹(A,B) & R²(A,D) & R³(C, D) Is it without loss of information? I would have said yes as far as with the following array A → B x²²= b B → C x¹...
2
votes
0answers
20 views

Decomposition and loss of dependencies

I'm lost in the sea with the following example of decomposition without loss of dependencies... Let be the dependencies F= {A → BC, C → AD} R is decomposed in R¹(A,B,C) & R²(A,D) I want to know ...
2
votes
1answer
20 views

Multiple columns from one table rely on one single table

I'm working with PostgreSQL 9.2 and have the following relation between 2 tables: The table town stores a list of town codes. The table perimeter stores perimeters denomination. Towns are almost ...
5
votes
4answers
228 views

How can I represent discrete ages in a relational database?

I am using PostgreSQL to store data on a Person. I need to store whether each Person is capable of teaching a Child of each age year, from 0-17. The ages are discrete values, and a Person can have any ...
1
vote
1answer
17 views

Many-to-many tables tracking participation at multiple events

I am working on a side project to track observations of different birds, and the time spent during each observation. Right now I have a table called Observations: obs_id | start_time | end_time ...
0
votes
1answer
24 views

Grouping in relational algebra with more than one grouping attribute

So I am having a bit of trouble understanding the Grouping operator, Ɣ. If had a the relation Sales(employeeId, date, salePrice) and I wanted to list the largest salePrice for each employee per day, ...
0
votes
1answer
53 views

Explaining how to design a database to model the stocks of a firm to my Grand'ma

My teacher always asked us to create simple but precise databases. Being able to explain it simply but not without leaving the theory "to your wise but aged loved Grand'ma"... I have to create a ...
0
votes
0answers
11 views

Find missing associations in many to many relationship [duplicate]

I have client and category tables with a many to many relationship via client_category_association. table: client id name 1 ek 2 do table: category id name 1 un 2 dos 3 tres table: ...
2
votes
1answer
98 views

Lost (and found?) on 4NF

I'm so extremely lost on 4NF it's not even funny. I've been reading on it for literally days and, except for about 15 minutes ago, I wasn't sure that I had even broken the surface. I think I might ...
3
votes
0answers
52 views

What is the difference between a field and a column? [duplicate]

Although I have always regarded the terms as interchangeable, I have read somewhere that they’re not the same. I suppose this means that a record is not exactly the same as a row either. I teach that ...
3
votes
3answers
2k views

First Normal Form, why is it good and how does it reduce redundancy

I asked a similar question on SO and was advised to ask the type of question here. This is for a course on relational databases. A sample problem asks "how come every table in a relational database ...
0
votes
0answers
40 views

Registration Schema Implementation

I'm building an online app that is going to handle reservations. Individuals making reservations can make one for a single day or multiple days. I have come up with two schema and cannot see much of a ...
3
votes
1answer
35 views

Why are multivalued dependencies named that way?

I'm doing a relational design course on Stanford open courseware. I understand why functional dependencies are named that way - A->B means B is specified when A is specified, or in other words, the ...
2
votes
2answers
370 views

Multiple relationships between the same entities

Is there a name for when 2 entities can have multiple relationships between them?
1
vote
1answer
43 views

Counterexample to demonstrate there are no functional dependencies

For instance in the following example Let be F={AB→C, B→D, CD→E, CE→GH, G→A} Do we have AB→G? We don't have any functional dependencies. I am able to show a functional dependency when it ...
4
votes
1answer
138 views

Are three equalities on a join operation legal in relational algebra?

Let be the following database: Film(Title,Director,Actor) Produce(Producer,Title) Express in relational algebra the following questions: Which actors produce at least a Film they directed? ...
1
vote
1answer
19 views

How to normalised a relation using fds

G = {{A,B}→{C},{B,D}→{E,F},{A,D}→{G,H},{A}→{I},{H}→{J} }. Which is a key attribute? {A,B} or {A,B,D}?
1
vote
1answer
35 views

how to represent what functional dependencies are?

I'm trying to understand how to represent what functional dependencies are: A1, A2,..., An → B If two tuples of R have the same attributes for A1, A2,..., An then they have the same value for ...
1
vote
1answer
30 views

If my understanding of BCNF is correct, how did we know that R1 was not in BCNF?

Given that R(ABCDE) AB->C BC->D CD-> E DE->A Since, B is the only attribute absent on the right-hand side, we would start with B. {B}+ = B . Not a CK. Next, we ...
1
vote
0answers
25 views

Cartesian product and Division in Relational Algebra

Let be the following database sketch: Cineroom(Name, Hour, Name) Film(Name, Director, Actor) Saw(Spectator, Name) Produce(Producer, Name) Likes(Amateur, Name) How to express, ...
1
vote
0answers
16 views

How to express inclusive and exclusive relations in relational algebra and relational calculus?

Let be the following simplified database sketch R1(P,S),R2(S,T) and R3(T,S) with P= people S = Sport and T= Sports Center How to find in relational algebra and relational calculus which couples ...
3
votes
1answer
53 views

Database design, 1-to-many or many-to-many?

Just a little background information pertaining to the question at hand: I'm developing an application for users to be able to log the work they have been doing hourly, to be compiled into a weekly ...
1
vote
1answer
33 views

Store a revenue based dataset in a relational database

I have several revenue based datasets with below structure: Subject 2012 2013 2014 2015 online marketing 54 50 60 80 website ads 900 850 ...
3
votes
2answers
59 views

How to model A Shop Database

I want to draw the ER model of a store which The scenario is like this: They have list of Goods and Some Seller which sells them to customers they want to know how much they get profit from their ...