Category of database management systems characterised by the ability to join two data sets by matching on common fields, using mathematics-based relational logic.

learn more… | top users | synonyms

1
vote
1answer
30 views

Relational or NoSQL Database Design

Disclaimer: I also posted this question on Stack Programmers, because I was not sure which was the most appropriate. This database holds assembly instructions data for shipbuilding, later use in a ...
1
vote
1answer
36 views

Adding restaurants in database

I wanna store some vendors (like McDonald ,etc) and it's branches in a table. a vendor may,or may not have branches. I have created two tables: 1- A vendors table which have name,logo, etc. 2-A ...
0
votes
3answers
35 views

How to design a Table in which its fields varies on its categories?

I am trying to design a database to post free ads. Eg http://www.gumtree.com.au/p-post-ad.html Scenario: Every ad will have different categories and some categories will have further sub categories. ...
-2
votes
0answers
31 views

Entity-Relationship Modelling [closed]

WWLS staff consists of lawyers and secretaries. Lawyers work on cases, while secretaries provide assistance to lawyers , while some secretaries assist only one lawyer, some of them assist multiple ...
1
vote
1answer
19 views

Is this the correct way to model a relationship between an object which may or may not have another object?

I'm creating a database for a department store and the database has two tables: Items and Coupons. An item, like a TV, can only ever have one coupon. Some items don't have a coupon at a given time. ...
4
votes
0answers
31 views

Decomposing a relation into 3NF/BCNF

I am having trouble decomposing a relation to 3NF/BCNF. I have determined that for the relation: R (A,B,C,D,E,F,G,H,I) where: {A -> B,C} {E -> F} {D -> I} {A,D -> G} {G -> H} ...
2
votes
1answer
55 views

Dynamic relations in MongoDB

I'm designing a document with MongoDB where users have relationships with each other. Easy enough, right? { _id: "012", username: "happy4u", // ... related: [ '123', // user ...
1
vote
1answer
41 views

Missing diagram option SSMS

I would like to create a relationship between to tables. Normally and in previous versions of sql server and the management studio I would go to database diagrams and draw the relation in the diagram. ...
0
votes
1answer
18 views

Updating inverse side bidirectional association

I understand (more or less) the concept of unidirectional and bidirectional association in a relationship, but I don't see the correct practical application of it. For example, I want an contact ...
0
votes
3answers
35 views

Table with relationship to multiple tables

I want to persist contact details for persons. This contact details can belong to a client, or a next of kin member, or whatever other entity. I'll be using Doctrine2 in a Symfony project, that will ...
3
votes
1answer
28 views

What is the correct way to map relationships between structurally similar comments tables and commentable entities?

I'm working on the usual comments table in postgres that has a one-to-many relationship with a commentable entity. In other words, one comment belongs to a post, and a post can have many comments. ...
1
vote
1answer
42 views

Laravel MySQL relation difficulties

I have a "users" table: And an organisations table ("orgs"): And this is the pivot table: I have some relations: On the "users" table, I have a function called "orgs()" which is a ...
1
vote
0answers
18 views

Type of relational/object-oriented database with improved joins for object graphs?

I would like to know if there is a specific name or term for the kind of database described below: I notice one of the biggest problems when working with relational databases and object trees/graphs ...
2
votes
1answer
31 views

I created a DB schema for a project relating to collecting comments for web pages, is relational the way to go and how are my relationships?

I'm curious if relational DB is the way to go, if the current relationships in the diagram make sense, and whether it will bode well for coding.
0
votes
1answer
64 views

Proof for this answer

I am not sure whether this is offtopic. However, please read on. A person whom I know has encountered a problem in the answer key published by CBSE, India. As their key challenging form contains a ...
1
vote
2answers
38 views

Trying to design database for eSports Teams - Issue with dependencies

I am trying to design a database in Access for an eSport league (specifically League of Legends North America). I will post what I have and then explain my issue. My issue comes when I try to ...
1
vote
1answer
28 views

How to model state change timeline

I've got an app where users can place orders for recurring delivery of a particular service. The orders table has columns service_id and state, where service_id links to the service the user has ...
3
votes
3answers
77 views

Is it better to create another table to possible null values in relational databases?

I'm designing a relational database to use in MySQL. I have the next situation: In one table there are fields that in the most of situations are NULL. The fields would be like: Table name: tabla ...
0
votes
0answers
29 views

Role based access control protocol for resources in mysql database

I have a mysql database for an application which contains users and resources, like for example books, movies, tv-shows and music. Users should be able to view and edit specific entries of this ...
0
votes
0answers
26 views

For any SQL query, do there exists a unique translation into relation algebra

I have been studying databases and I understand that for each query that a database user type, the DBMS translate them into relational algebra operations before applying them to the database. My worry ...
3
votes
2answers
58 views

XML vs. Relational databases?

I feel like this isn't the best question to ask on a programming site like this, but I haven't really found a satisfying answer online and I would really like to get a different perspective on this. ...
0
votes
0answers
20 views

Using logic or in relational algebra

In relational algebra I can obtain the courses taught in Fall 2009 or Spring 2010 with Π_{course_id} (σ_{semester=“Fall” Λ year=2009} (section)) ∪ Π_{course_id} (σ_{semester=“Spring” Λ year=2010} ...
1
vote
1answer
54 views

What is the best way to represent an Team and player relationship in ERD

I am working on designing an ER diagram for a football system, i stopped in the relationship between the player and team, as we know the player plays for only one team and team have many players, so ...
1
vote
0answers
31 views

A design pattern for category features [closed]

I work for a system which has these tables: products , categories , features User wants to add some feature like color dynamically. Which of this following ways are true? First one: Product ...
2
votes
0answers
26 views

Method to Obtain LossLess Join BCNF Decomposition

I have been told a way to obtain loss less join BCNF but I don't know how to calculate candidate keys(also called super key in some cases) and trivial Dependency. I have been given a relation R = ...
1
vote
1answer
57 views

Do data types go into a Relational Data Model (RDM)?

I have recently been asked to draw a Relational Data Model for a flight information database. I came up with the design in the picture below, but I was told that the drawing is not correct because ...
2
votes
1answer
82 views

PostgreSQL JSON data type used as NOSQL, But VIEW as Relational Data Structure

Could I create a VIEW from the JSON data type but have it as a relational structure? Example: SELECT * FROM json_test; Results [ { "name": "Roy", "Country": "USA", ...
0
votes
0answers
30 views

Foreign keys in MySQL Workbench

I am defining an EER model in MySQL Workbench. I have a library with multiple copies of each book and each book has its location in the library listed in the system. When I'm creating one-to-many ...
0
votes
0answers
49 views

Normalization and multivalued attributes

I am designing a relational database in mySQL - a library management system. I want to show examples of the data in 1NF, 2NF, 3NF, BCNF, etc. My example of 1NF looks something like this 'A relation ...
1
vote
1answer
77 views

Data normalization (from 0NF to 1NF)

I am designing a relational database in mySQL - a library management system. I want to show examples of the data in 1NF, 2NF, 3NF, BCNF, etc. My example of 1NF looks something like this "A relation ...
0
votes
1answer
43 views

How Wide-columns databases achieve dynamic columns on the storage layout? [closed]

As known, in relational databases, when adding a new column, data must be reallocated (http://stackoverflow.com/questions/463677/alter-table-without-locking-the-table) to maintain a single row ...
1
vote
1answer
34 views

design database with 2 simillar tables

I have a database which has product_sell and product_buy tables, these two tables are different in a few fields and each one has own comment table product_sell >---< product_sell_cmt ...
1
vote
1answer
17 views

Groups relationships - Detailed or Direct?

I have a Person model: PersonId Name ----------- ---------------- 1 Jessica 2 Jennifer Then I have a ShareModel which have the Personand an ...
2
votes
2answers
60 views

unusual relation, binary aspect

I have question very unusual for databases. I’m not a good English speaker, but good English reader :) so for explanation I’ll give you examples. Part1 In MySQL, I have two tables with relations ...
0
votes
1answer
25 views

Determining Functional and Transitive dependencies from Relational Model (with no sample data)

I have a relational model which I've converted from an EER diagram... I've been asked to find the functional and transitive dependencies but how does one do that when there's no sample data to start ...
0
votes
3answers
178 views

What is the term for a “wide”, non-normalized view/query?

A well-designed relational DB schema tends to have a relatively large count of relatively small, normalized tables — a cluster of snowflakes, I think, describes the situation. In order to ...
1
vote
1answer
93 views

How to manage many-to-many relationships when there is also a hierarchy among the many?

I have these entities – employee, task, phase, project – and these relationships: project 1:m phase phase 1:m task employee m:m task, phase, project The first two relationships form a ...
0
votes
1answer
32 views

sub and sub-sub item organization system [duplicate]

So I am looking to find the best database design for the following situation. I will refer to my entities as 'articles' as that would best/most-easily describe them. So the articles have already ...
2
votes
1answer
38 views

How to keep updates (diffs) of some entity in the database

What is the best way to keep updates (diffs) of the some entity in the database? At StackOverflow we can edit questions and answers. And then we can look at any revision of the question or answer we ...
0
votes
0answers
11 views

Translating duplicated data entries into Domain Relational Calculus

Given a following table named BOOKING, which contains three columns, guest_name, room_number and booking_date, how do I find the all the guest_name that have the same room_number and booking_date? I ...
0
votes
0answers
63 views

Converting Entity Relation(ER) Model to Relational Schema?

I have the following ER Model I am trying to convert this to a relational database schema but I am not sure about several things: PORT_VISIT and PORT are weak entities. How do I figure on which ...
0
votes
0answers
20 views

Is the use of my lookup table efficient?

I'm trying to find the best way to architect the relationship in the scenario that: A team can have multiple players, a player may also have multiple teams My first thought was to use a lookup ...
0
votes
0answers
21 views

Data base design for handling website subscriptions

I have a website where at least 20 posts are posted in a day and each post contains more than 5 categories and each category has further tags. I wanted to build a subscription module that users can ...
0
votes
1answer
92 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. ...
0
votes
0answers
25 views

Medical History - Is this DB properly design?

Could you please tell me if this DB is properly design? Are relationships type correct? Is there anything I should delete or add? Thanks you all very much!
1
vote
0answers
57 views

Database schema design for individual configurations

I'm trying to design a database schema that allows me to store customer custom built products. As a simplified example: A user can buy a cupboard, draws, boxes, and dividers. A cupboard has 2 tiers. ...
0
votes
1answer
42 views

Help with relational database design

I have a data model where each user profile belongs to a department. Each job is also available for a specific department. The department names are formatted like this: AAA-BBB-CCC-DDD-EEE, but of ...
2
votes
1answer
91 views

If A and B are candidate keys, then AB is candidate key or not ?

If R{abc} is a relation, f{ a->b b->a a->c b->c }, then a and b are candidate keys. What about ab ? Is it a candidate key or is it a super key or both ?
0
votes
0answers
52 views

MySQL Query Causing Massive Slowdown Over Time

I've been experiencing massive slowdown on my server after launching a new website. Using MONyog I can see that after an apache/mysql restart, the queries/second starts out nice and low for around 10 ...
0
votes
0answers
41 views

Database systems with users and sub users accessing the data

I am making a database for school student maintenance. Below is the basic description. There are schools. One school has many staff (i.e: Principles,Teachers, Section Head, Office Staff etc) These ...