Database design is the process of specifying the logical and/or physical parts of a database. The goal of database design is to make a representation of some "universe of discourse" - the types of facts, business rules and other requirements that the database is intended to model.

learn more… | top users | synonyms (3)

5
votes
0answers
467 views

Enterprise Architect: Hide only some Foreign Key Labels to all connectors at once

I am using Enterprise Architect 9 and I want do hide some Foreign Key Labels in all connectors, but not all. I'm using Associate connector often, and when I set foreign keys, it shows some labels I ...
4
votes
0answers
385 views

Design pattern for directed acyclic graphs in MongoDB

The problem As usual the problem is to display a directed acyclic graph in a database. The choices for a Database I had were a relational database like mysql or mongodb. I chose mongoDb because DAGs ...
4
votes
0answers
518 views

How can I do complex entity associations queries in doctrine 2? (virtual entity)

Let's say I have a blog application. The author can add multiple images to a post either by giving a link to a url of an existing image on the web, or upload a new image. I want to be able to back ...
2
votes
0answers
41 views

Cannot get all subject from student and grade with mysql query

I would like to select grade_point and grade_name from table grade which according to mark in table exam, so my expectation is that if mark in table exam are between grade_mark_from and grade_mark_up ...
2
votes
0answers
36 views

Most efficient database structure for multiple user types

We are developing a system using asp.net MVC and have encountered issues with our database design in terms of handling multiple user types. We are currently using an inheritance structure to split ...
2
votes
0answers
54 views

Multi tenancy database in symfony2

I wanted to learn about the creation of "multi tenancy databases in Symfony2" (i.e only specific to Symfony2). But, I could not find the documentation anywhere. I wanted to know the "Concept" behind ...
2
votes
0answers
29 views

Persisting events/objects with many different dependencies

I believe the following is a pretty common use case, yet even after thinking about for a couple of hours and discussing it with a friend I found no satisfactory solution. Basic problem: How do you ...
2
votes
0answers
63 views

How to prove that a decomposition into BCNF which is both dependency preserving and loss-less doesn't exist?

How to prove that a decomposition into BCNF which is both dependency preserving and loss-less doesn't exist for a specific schema? Is there a rule that holds? Or do I need to go through all BCNF ...
2
votes
0answers
130 views

3NF synthesis reduction algorithm

I am working for a DBMS class and came across 3NF synthesis algorithm here http://cis.csuohio.edu/~matos/notes/cis-611/ClassNotes/13-3NF-Synthesis.html I am stuck with canonical cover computation. ...
2
votes
0answers
1k views

Improving Database Design for a Notification System in MySQL

I'm in the process of building a common notification system for a webapp. The main technologies I'm using are Java, Spring MVC and Hibernate. I've been looking at several posts here and there, trying ...
2
votes
0answers
340 views

How to generate Hibernate Annotated Entity classes with associations from Tables

I know plugins are available to generate hibernate pojos and mapping configuration xml file in eclipse. As hibernate with aanotations are now used more ofter than hibernate xml files, I wonder how do ...
2
votes
0answers
345 views

MongoDB Schema design for Events Management System with Full Text Search

I'm designing a solution for Events Management System with Full Text Search functionality (preferably Solr). Following are 4 major Entities/Document Types in this system: A Venue is a place where ...
2
votes
0answers
379 views

Doctrine - One-To-One Bidirectional Relationship not allowed

i have a problem to transfer my databse design into Doctrine. At first some details: I get many football-related data from xml files and have to save it in my own database. One part of these data ...
2
votes
0answers
382 views

Nested Sets with rational numbers on Redis

I'm tried to implement a nested set DB model on Redis with rational number how is described in this paper http://arxiv.org/abs/0806.3115 But, after two weeks of study, I'm stuck with design... here ...
2
votes
0answers
317 views

what is the logic behind facebook group notification?

i want to know what is the logic of facebook group notification and how it works? if one user turn off the notification than what kind of process under goes so that user will not get the notification ...
2
votes
0answers
630 views

Some database design ideas for Activity Stream/Log per page

I'm building an activity log of users actions. But the main objective is to get all activities not per user, but per page (scope) its inside. I will explain more after. The main thing I'm concern ...
2
votes
0answers
196 views

Model/Specification describing a key-value database

I am looking for a formal/semi-formal way to describe the model of a database using a key-value approach (e.g. Redis). I guess it all comes down to describing the naming scheme (what to expect for ...
2
votes
0answers
238 views

DB choice for efficient user access permission lookups

I want to create a scheme for storing and accessing viewing permissions in a database for a social networking site. This question is similar to other questions here, for example how are viewing ...
2
votes
0answers
153 views

Rails tagging gems/plugins: Is there a way to do weighted tags?

I'm interested in using acts-as-taggable-on for a Rails 3.x app: https://github.com/mbleigh/acts-as-taggable-on Doing a quick search for other tagging solutions, this seemed like one of the ...
2
votes
0answers
172 views

Create nested set model without top level item

I'm creating a nested set model for a taxonomy database. Basically, I've re-created the same type of setup that wordpress uses for taxonomy, however instead of using parent_id for the term_taxonomy, ...
1
vote
0answers
150 views

MongoDB Schema Design for Time Tracking

I have created a simple time tracking application in which people can TimeIn, TimeOut and mark breaks. The central object to this Tracking is an Event generated by User. This combined with UserStatus ...
1
vote
0answers
35 views

SQL and VC++ how to automate SQL commands when the tables are being changed?

I am using VC++ and Mysql to build a system that reads and writes data to tables, keeps the data in structs in the memory and sends it to other functions for processing. During the process of ...
1
vote
0answers
11 views

Modelate amount in ManyToMany relationship in Hibernate

I'm creating a simple e-shop. It's java based application using hibernate for ORM. As a database I use MySQL. I have there these three entities: Order, Product and Order_contains_product for joining ...
1
vote
0answers
29 views

Relational DB concept for targeting of product offers

I got assigned a task to develop system for product offering based on target groups. Groups are defined mainly by gender, age and a type(s) of already purchased product(s). I would like to make DB ...
1
vote
0answers
17 views

How do I minimise redundancy in a set of functional dependencies that can be trivial?

Let's say if I have a set that is {{AB->C}, {C->A}}. By transitivity, I get AB->A which is trivial. My candidate keys are possibly AB and BC. However, a tool I found tells me that the key is B. How ...
1
vote
0answers
58 views

Best practice database design for composite schedules

I am working on a database which handles different schedules, in my case composed with half-days. My concept with table TBL_HalfDay, TBL_Day: TBL_HalfDay consists of a char daytime ('M' or 'A', ...
1
vote
0answers
31 views

How to implement different user roles with different information using Sentry?

I am working on a Laravel application and I am thinking of using Sentry to handle the user roles. Now I understand that Sentry ships with the migration files and will already migrate the users table, ...
1
vote
0answers
38 views

How to modify existing tables for timezone addition

I have a large application with 500+ tables, I have to convert the application to be timezone aware (currently application uses new java.util.Date(), GETDATE() with server's timezone). i.e. no ...
1
vote
0answers
35 views

nullable self reference with composite keys using doctrine

I've got a problem with Doctrine ORM 2.5. The issue happens when I try to load instances of an entity that has an optional ManyToOne reference to itself using part of its primary key as a part of the ...
1
vote
0answers
24 views

How to reference categories table in products table?

I am using modified preorder traversal algorithm to store product categories in database (like image shown above). But i don't understand how to reference it in my products table. Here is my ...
1
vote
0answers
33 views

Database design for my small CMS system - need for my exam

I'm trying create design for small cms system for my exam in school but I get stack. Basicly I would like to have table "Content". Item in "Content" table can be type of: "Article", "Event", "Static ...
1
vote
0answers
40 views

How to store row modification data in Postgres?

So I need to find a way to track modifications made to database rows. I'm thinking the best way to do this is to store object deltas for the row after the modification has been made to the row. So if ...
1
vote
0answers
75 views

Entity Framework TPT Inheritance with ObjectType Discriminator Column

I'm using Entity Framework as an ORM for my database. To model inheritance, my database uses the Table Per Type (aka Class Table Inheritance) pattern. Entity Framework does support TPT inheritance. ...
1
vote
0answers
70 views

How to create dynamic tables in MySQL

I am trying to creating a system where all new tables will be dynamically created (or objects inside a predefined databases.) Here is an over view of the design, I would have a predefined table for ...
1
vote
0answers
23 views

Data Transfer time Questions in database design

I am preparing for my exams so i am doing pass papers , i am Stuck so i need some help Suppose that records are stored on a disk with the following characteristics: Average Access Motion Time 0.033 ...
1
vote
0answers
22 views

Mysql Multilangual Database design and Query

I'm building a database for my new website. In this database I have to store articles, article images, and article tags. All this must be with multilanguage support. After some reaserch on the ...
1
vote
0answers
46 views

Setting default value of foreign key?

I have three tables in database: user (user_id(pk), username, email, password, country_code(fk), city_id(fk)); country (country_code(pk), country name); city (city_id(pk), city_name); Country and ...
1
vote
0answers
75 views

How do I display user information from table 1 and 2 that don't exist in table 3?

I have a MySQL query that I am not quite sure how to create. Here is what I have in terms of tables and also what I want to accomplish with the query. Table 1: reg_worker id name email Table 2: ...
1
vote
0answers
28 views

What is the most logical way to store the relationships between wrestlers, their characters, and their entrance music?

Necessary Background Info I know the title is specific to my project, so allow me to explain the background of my problem. I run a website that stores and displays entrance theme listings for ...
1
vote
0answers
184 views

Laravel eloquent - model extends another model

So I'm building an app to support a two sided marketplace, where there are buyers ("users") and sellers ("creatives") and each would have different profiles. However they both have to register and ...
1
vote
0answers
116 views

ACL user roles in Parse

I need help with ACL roles in Android app I'm building. I'm building app in parse where the user can create a group and invite other users. User can't see the group or the content within it before ...
1
vote
0answers
202 views

design the feature in LinkedIn where it computes how many hops there are between you and another person?

This was questioned in quora, and I'm really interested in the most efficient answer. I think one way is a sql db or a document based db get all your connections, then all your connection's ...
1
vote
0answers
44 views

Is it better to use separate tables to store rows that apply to “a more general classification”, or are nullable columns suitable?

I am building a database for a company that sells warranty packages. There are a number of attributes associated to each package that factor into the final price. For example, the age of the ...
1
vote
0answers
72 views

SqlServer large nvarchar clustered index

I have a table for caching geocoding results where I had planned to use the search string as the primary key/clustered index, since I wanted this to be both unique and indexed for quick lookup. This ...
1
vote
0answers
42 views

A table with thousands of records, and each record hundreds of attributes with PostgreSQL?

I am currently running PostgreSQL and I have a requirement of creating a table called Template. The users will be able to create lots of templates, and each template will have hundreds of attributes ...
1
vote
0answers
38 views

Setting up a graph database to query common properties across different types of nodes

I am looking at using a graph database for some data from a relational database. The way the database is setup, information related to a single item is spread across multiple tables. From what I have ...
1
vote
0answers
77 views

How can I integrate social login to my existing user schema/login system?

I have a RESTful API that multiple clients connect to (web, iOS, and Android apps). Currently, users can only create accounts with a username and password (email is optional) and they are represented ...
1
vote
0answers
42 views

[sql]Database design: preset values

Let's say we have an ice cream application. For all ice cream shops, the admin of all shops will define a list of preset icecream options (for example, shop1 will have the vanilla icecream which ...
1
vote
0answers
93 views

Data Model for analytical CRM as a service

We're developing an analytical CRM as a service and I have a question about data model. A CRM user might upload a batch (about 1 million rows a week) with his clients/customers. Also we already have ...
1
vote
0answers
183 views

Database Schema and Sql for a 5 star Rating

Requirements: 1. All "Users" have 5 fixed set of same "Services" which they are supposed to rate. 2. Given the userId, display all the Services and their corresponding "Ratings". 3. Rating would be ...