The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
64 views

How to define item level permissions in a relational database

I need to model a database design to provide item level permissions to users based on the user's role access. I am using asp.net with sql server 2012 I am looking at similar experience on how ...
2
votes
2answers
87 views

Should I be using a composite key for this table?

My database is going to store words, so the Word table is the most important. The Rhyme table lists which words a particular word perfectly rhymes with. It consists of three fields: RhymeID - primary ...
3
votes
4answers
711 views

Is this database design sound and fully normalised?

I'm creating a database to store words. The intended usage is to query the database to find a word matching a set of filters. E.g. if I wanted to find a word with < 10 letters, < 3 syllables, ...
2
votes
1answer
68 views

When deciding a Primary Key, can I use Date part of a DateTime field

I'm designing a payroll system I have designed a database with several tables and this question is related to following tables EMPLOYEE (Employee_ID [pk], Name,... etc) LOCATION (Location_ID [pk], ...
0
votes
0answers
22 views

How to describe the semantic of Database [closed]

I want to describe my Employee databse so I can use this semantic description in the process of translating it inot SQL query. I came across quepy example where they have used RDF as Domain specific ...
0
votes
2answers
96 views

Should all foreign table references use foreign key constraints

Closely related to: Foreign key restrictions -> yes or no? I asked a question on SO and it led me to ask this here. If I'm faced with a choice of having a circular reference or just not enforcing ...
0
votes
1answer
151 views

Is NoSQL a better choice when working with OOP? [closed]

This might be a silly question, but I've reading a little bit about NoSQL databases on the past few days and I'm trying to understand when really they help us. One thing I've realized though is that ...
1
vote
0answers
54 views

Redmine - Database Structure/Normalization

I am using redmine for project management and issue tracking. I was looking at the database tables and the underlying structure and was wondering if anyone who is experienced with database ...
1
vote
3answers
66 views

What are the use cases for these relationship types?

Use Case What are the use cases for creating a one-to-one relationship where the parent points to the child compared to a child pointing to the parent? If there is no difference, is one preferred ...
0
votes
1answer
95 views

Database design grouping many tables with their common fields [closed]

Is this a valid DB design? A user can create an organization, link as many offices to it, have an inventories that host items linked to organization or office, have clients for his business etc. | ...
0
votes
0answers
67 views

Event sourcing with a read store - normal relational tables too?

I will be implementing Event Sourcing for the first time on a hobby project and I have what could be a really simple question: should the event store be the only storage area if you have a ...
0
votes
1answer
177 views

What happens if computer crashes after giving commit command

If we are updating a field in SQL and ALTER the row also. After giving the COMMIT command, the system is crashed. What will happen to the commands given, whether it will UPDATE and ALTER the table ...
0
votes
0answers
24 views

Not using Weak entities could denormalize DB?

In the following scenery in a ER and relational Model: Object 1-----N [Part] 1-----N [Subpart] 1-----N [Item] (Where "1-----N" is a 1 to N relationship; and [Entity] is weak). Solution 1: ...
2
votes
1answer
108 views

Is it substandard if I have multiple tables in my database yet there's no relationship at all? [closed]

I have multiple tables in my database. Some tables have relationship to others and some don't have. My friend told me that it is not advisable to have a table that is not related to others. Is it ...
1
vote
1answer
41 views

How to represent one special related record

I have two tables, project and photo. photo has ID,projectID,path : each project has multiple photos. Now one of these photos is the one that has to be displayed. The question is how to represent ...
2
votes
2answers
690 views

single table w/ extra columns vs multiple tables which duplicate schema

I am working on a project where at some point, I needed to make a decision on whether or not, in the database, I should have a single table with multiple columns that not every record uses, or ...
2
votes
3answers
195 views

Tracking correct order details in commerce database when modifying 'products'

I am implementing an ecommerce database. This is slightly different than most as the 'products' that are for sale are for services provided. For example a user (vendor) of the system may define a ...
0
votes
1answer
78 views

Relationships in a Chen ERD

I am working on a Chen ERD to model our organizations merchandise. Our central entity is a Style. We have supplemental entities of Color and Season. I am defining our assortment as the ...
2
votes
3answers
296 views

db design: circular references for the-one-of-many case

There are many questions about circular references around (if they are bad or not) but this one will be concrete. Consider the following case. There are two models Image and User. Users have ...
2
votes
2answers
99 views

How should this relationship be structured in a relational database?

In a recent project I was asked to implement an events system. An Event had to have a Location which was originally specced out as simply a physical location with some optional extra notes. Then the ...
7
votes
1answer
196 views

Can relational algebra/calculus proofs be used to test/verify SQL?

Is it feasible or even possible to use relational algebra and/or relational calculus in the form of proofs to test/verify the correctness of SQL statements, functions, and stored procedures? It seems ...
2
votes
2answers
246 views

How should I make searching a relational database more efficient? [duplicate]

This is in the scope of a web application. I have a database which has a few nested relations. There is a feature which depicts the history of a large chain of relations. It is essentially a data ...
5
votes
4answers
1k views

I want a trivial example of where MongoDB can scale but a relational database will have trouble

I'm just learning to use MongoDB, and when discussing with other programmers would like a quick example of why NoSQL can be a good choice compared to a traditional RDBMS - however the scenarios I come ...
2
votes
2answers
638 views

Database model for keeping track of likes/shares/comments on blog posts over time

My goal is to keep track of the popular posts on different blog sites based on social network activity at any given time. The goal is not to simply get the most popular now, but instead find posts ...
3
votes
1answer
173 views

At what point does caching become necessary for a web application?

I'm considering the architecture for a web application. It's going to be a single page application that updates itself whenever the user selects different information on several forms that are ...
0
votes
1answer
160 views

Best way to implement database design for a set of entities

Lets say I have a scenario like so: I have many claims to get money from another entity and this claim has to go through two gateways. This claim is sent from an origin system and can possibly be ...
1
vote
1answer
99 views

Storing donor addresses in a relational database

I am building a donor database for a non-profit organization and one issue I'm mulling over is how to store some of the donor data. There are some families for whom we capture the names of both ...
15
votes
4answers
2k views

Why many designs ignore normalization in RDBMS?

I got to see many designs that normalization wasn't the first consideration in decision making phase. In many cases those designs included more than 30 columns, and the main approach was "to put ...
1
vote
1answer
83 views

How can I find all connections in a mesh network/graph?

Suppose I have a mesh of relationships, such as Friends who trust some friends and not others A IPv6 router that needs to locate peers across the Internet A PGP Web Of Trust that needs two people ...
1
vote
2answers
2k views

Using Autoincrement Primary keys as Foreign Keys

When creating a table, there is an option for us to set the numeric primary key as autoincrement where it's value increases whenever a new data in inserted. This primary number can be used for ...
2
votes
5answers
990 views

Planning relational database - one or two tables?

I'm currently planning the database structure of a used car's advertisements site. Each advert contains information about a vehicle, and a vehicle can be advertised multiple times over its lifespan ...
1
vote
1answer
65 views

How is data integrity maintained in a clustered environment when schema changes?

Scenario A clustered environment running N identical application nodes interacting with a single relational database. Problem Is it possible to upgrade the nodes to a new application version, which ...
2
votes
1answer
462 views

Data integrity in NoSQL situations

Background To start off, at work I work with a legacy system that, in its day, was quite spectacular, but now is ...interesting... to work with. It uses IBM (now Rocket) UniVerse as its backing ...
8
votes
7answers
635 views

Should a surrogate key ever be exposed to a user?

Often in a table that has no natural key, it is still useful for users to be able to have a uniquely generated identifier. If the table has a surrogate primary key (and in such a case you would ...
9
votes
4answers
336 views

Do these specific tables need surrogate keys?

Background I have this tables +-------------------------+ +------------------------+ |Airport | |Country | |-------------------------| |------------------------| ...
5
votes
7answers
572 views

Is there value denoting a key as “Primary”?

Question: Is there value in denoting a key as "Primary"? This question is not about the definition of a primary key. It is not about the fact primary's aren't nullable. It is not about ...
1
vote
2answers
298 views

External id for every relational table

Should I add an external id for every table? For example if I have these tables : Customer ======================================= Id Name Gender --------------------------------------- ...
3
votes
1answer
259 views

Suitable algorithm for joining records from multiple databases

I am in the process of writing a library that is used to be able to access data from a database. The library requires the initial definition of all the tables that the application will be using in the ...
5
votes
2answers
1k views

Handling subscriptions, balances and pricing plan changes

Preamble My aim is to create reusable code for multiple projects (and also publish it on github) to manage subscriptions. I know about stripe and recurring billing providers, but that's not what this ...
0
votes
4answers
223 views

Create a database for database tables

I'm working on a project where I have to give users the ability to build their own tables, each user can create more than one table. (the type of all data is string). The user can create a table and ...
12
votes
6answers
1k views

In plain English, what is a database index most similar to?

Setup: Suppose you are teaching an introduction to Databases class, the students are CS students that have a working knowledge of tree structures, how they can speed up searches, and have probably ...
1
vote
3answers
656 views

Should lookup tables enumerating strings have an integer primary key?

When I learned relational databases, the prof said that one would "almost always" want an artificial int as the primary key in a table, but did not specify what the exceptions are. At some time I ...
5
votes
1answer
146 views

What is the common approach to component template databases?

My Project: I have employees who are required to go through a checklist when they encounter a duck, a cat, and a human. In our business, we have a set number of ducks, cats, and humans that come in ...
0
votes
1answer
855 views

Retrieving hierarchy of tree-nodes stored in relational database

I have a hierarchical ADT that I want to store in a database. Nodes have exactly one parent element that is a node as well. Multiple nodes can have the same parent node. My current approach uses an ...
1
vote
2answers
190 views

Referential integrity in a database where tuples are not physically deleted

Many modern Relational Database Management Systems automatically support referential integrity, i.e. when you try to delete a tuple which has a reference (in the form of foreign key, for example), the ...
3
votes
3answers
694 views

How should I represent an enumerated type in a relational database?

I am working on developing a relational database that tracks transactions that occur on a device I'm working on for my company. There are different types of transactions that could occur on the ...
2
votes
2answers
167 views

Should database-models (conceptual or physical) be reviewed by DBAs?

Where I work, new applications that are being developed that will use their own relational database, must have their database-models (conceptual, then physical ) reviewed and aproved by DBAs. Things ...
2
votes
1answer
322 views

Designing persistence schema for BigTable on AppEngine

I have tried to design the datastore schema for a very small application. That schema would have been very simple, if not trivial, using a relational database with foreign keys, many-to-many ...
6
votes
5answers
398 views

Type of AI to tackle this problem?

I posted this on stackoverflow but want to get your recommendations as well as a user on overflow recommended I post it here. I'm going to say from the beginning that I am not a programmer, I have a ...
0
votes
3answers
92 views

On merging database records, constraint violation in the intermediate table of M2M

If you are merging two or more database records from table X, that have a many-to-many relationship with table Y, how should you solve the problem of records in intermediate table Z that would violate ...