The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
11 views

What is the hierarchical DB schema for this xml?

As per this link, this is the xml that maintains "BookStore" data. I see that number of occurences of author are varying for any book. xml's hierarchical representation of BookStore looks more ...
7
votes
3answers
145 views

How to model and store an entity which has “one or more” values

I'll use C# to design the model to be persisted Let's suppose I have the following entity: public class Episode { public int Id { get; set; } public string Title { get; set; } public ...
4
votes
2answers
95 views

Using audit trail as time machine?

I would like to do SELECT * TABLE t (using data from 1st of march 2012) I already have a nice audit trail of all tables in the database. It basically makes a copy of all rows that change, storing ...
2
votes
1answer
59 views

In a Table Data Gateway, where do I put queries that use joins

The book Pattern of Enterprise Application Architecture has the following description over the Table Data Gateway pattern: “A Table Data Gateway holds all the SQL for accessing a single table or ...
0
votes
0answers
29 views

I have two applications… use NoSQL or RDBMS? [duplicate]

I have two applications in the making: one is a budget management tool; the other is a article based places/restaurant guide. The budget management tool works where users create accounts (e.g. bank ...
2
votes
2answers
95 views

Alternative locking strategies

I'm having a problem with the design of my application, that neither optimistic nor pessimistic locking tends to solve. Here is a simplified/altered version of the problem that describes the ...
4
votes
3answers
114 views

How to track temporal changes in a database?

Imagine a software for theater owners. You can accept reservations for the different cinema halls. Each hall has a different number of seats. Say the owner wants to know how many people visited the ...
2
votes
2answers
116 views

Should I use relational or noSQL databases for this problem

I'm working on a project where one part is to save data of different people. A typical person might have the following structure: Email: Multiple values possible City: Multiple values possible ...
2
votes
1answer
51 views

How to represent an optional-to-optional relationship in a database

I have two types of users: a CRM user and a system user. We have a record of every CRM user, thanks to a nightly sync that we run (so we don't have to hit the CRM API every time). We have system users ...
0
votes
1answer
21 views

Looking for advice for the following MS SQL Schema

We currently have the following SQL Schema: Projects Budgets BudgetTabs BudgetSections BudgetTasks BudgetTaskDetails ...
0
votes
1answer
90 views

RDBMS (MySQL) logic question. How to join multiple “FRIENDS”

so this is a logic question as to creating the proper relationships in a MySQL database. What logic would you choose for the following scenario? This is a back-end for an app where people can have ...
5
votes
2answers
248 views

Database Normalisation - stuck with “categories”

Context: I'm working on a database of museums and Categories will be one way the user will be able to search. e.g click on "Music" and a list of music related museums turn up. Pretty simple. ...
0
votes
1answer
33 views

is there anything called logical schema and the conceptual schema of a database table?

i want to know whether there is anything called logical schema and the conceptual schema of database table. if so what is it.i searched lot of places for this specific two words, but did not find ...
0
votes
2answers
94 views

Optimal Database design for 3-way relationship

All right, I know this sounds complicated, but all relationships are, lemme clarify. Well, I have three entities in my database which are tied to each other in a string of relationships, the app is ...
1
vote
5answers
155 views

Database design with performance issue and use of views

I am designing database for a school system. I am having to create a lot of tables and a lot of link tables to maintain a structure in the system. I am trying to maintain foreign integrity and trying ...
0
votes
1answer
55 views

Does this Relational Database Model make sense?

Here is a flat version of my datamodel. It is sensor readings for various data acquisition equipment. ...
1
vote
4answers
145 views

Are there any benefits in not having referential integrity keys in database?

So Referential integrity is good, but are there scenarios where not having constraints is better? For example when all the logic of relationships is kept in code? or when the database upgrade is ...
1
vote
1answer
151 views

Algorithm for rating books: Relative perception

So I am developing this application for rating books (think like IMDB for books) using relational database. Problem statement : Let's say book "A" deserves 8.5 in absolute sense. In case if A is ...
2
votes
1answer
138 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
103 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
741 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
371 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
2answers
116 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
193 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
100 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
68 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
0answers
94 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
218 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
33 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
118 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
42 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
2k 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
274 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
117 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
418 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
107 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
237 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
339 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 ...
6
votes
4answers
2k 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
1k 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
196 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
201 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
115 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 ...
17
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
109 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
1k 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
75 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 ...
0
votes
0answers
82 views

Fixing data duplication in two similar tables in different databases

I'm currently doing maintenance on an old order system that has grown into the poster child for bad coding practice. One of the tings I'm dealing with is a lot of data duplication, which I want to ...
3
votes
1answer
640 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 ...