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)

0
votes
3answers
33 views

Person-Address = 1-1 or N-1 (In this context)?

I have 4 tables: Province (province_id, name) City (city_id, name, province_fk) Another Smaller subset under city say... City_sub (sub_id, name, city_fk) Address table (address_1, address_2, sub_fk, ...
1
vote
2answers
41 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
53 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 ...
0
votes
1answer
42 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[...
2
votes
2answers
63 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
93 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
153 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, ...
0
votes
1answer
45 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,...
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 ...
2
votes
2answers
67 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⁴...
1
vote
1answer
40 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 ...
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, ...
0
votes
0answers
28 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
39 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
63 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
21 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
22 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
236 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 ...
6
votes
2answers
179 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 ...
1
vote
1answer
18 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
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: ...
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 ...
3
votes
0answers
54 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 ...
0
votes
0answers
43 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
40 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 ...
4
votes
1answer
277 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 ...
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 ...
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 ...
2
votes
1answer
99 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 ...
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}?
4
votes
1answer
140 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
0answers
29 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 ...
1
vote
1answer
36 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 ...
3
votes
1answer
54 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
34 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
62 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 ...
4
votes
1answer
71 views

Make a relation of a table with three different category of id's table

I have an issue There a table that's called "Routing" this table is for routing a task for three category of object - Analyser (interne machine) - subcontractor (externe ) Manually (...
3
votes
1answer
53 views

What process would you use to determine references on a database that has no integrity?

Imagine you inherit a database which has a bunch of tables, no documentation and zero referential integrity. Now you're trying to find out what are the various relationships between different tables. ...
1
vote
1answer
69 views

Surrogate key resolution, or what am I missing in the Surrogate v Natural argument?

I've read a lot from both camps in the surrogate vs. natural key debate. What I am struggling to understand, and what seems to be glossed over, especially in explaining how surrogate keys are more ...
3
votes
1answer
67 views

Simple database structure advice

Newbie to dba. I'm creating a php/mysql inventory list and would like some advice before I start, on structuring my table(s) and database. The inventory database will eventually contain hundreds of ...
1
vote
0answers
69 views

ERD Diagram based on Crow's Foot model for Milky Way Jewelry

this was on my final exam this past winter exam season, in search for the answer since i got it wrong: Draw an ERD diagram based on the Crow's Foot model for a database to support the basic ...
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 ...
0
votes
1answer
22 views

What should be the rule for excluding an FD from consideration while doing BCNF or any other Normalization?

Let us consider this example: http://www.mathcs.emory.edu/~cheung/Courses/377/Syllabus/9-NormalForms/examples.html At the first decomposition step, it is using A -> B C D E. On the next step, ...
1
vote
1answer
101 views

Should I look into alternatives to a relational database? [closed]

I am currently in the process of going through some PHP training with procedural code and will be doing a course in OOP with PHP right after that. The course will provide a solid starting point for me ...