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 (2)

1
vote
1answer
113 views

Enforce a constraint problem

This business model is for a case management database. This is closely modeled on the idea of a file folder representing the phase and a sequential checklist representing the stages. A case consists ...
1
vote
0answers
60 views

The correct way of representing folders

I'm trying to kind of emulate a folder structure in my application. Now I've thought of two ways to achieve this, but what is the best practice for that? Table: Attachments Columns: Id (PK), ...
2
votes
1answer
155 views

SQL table architecture

I'm looking for a SQL architecture solution for the following problem. The idea is that I have a validation form that contains the client's data. Each client can log in to his account and edit his ...
0
votes
1answer
60 views

Multiple values for unique id? [closed]

I have two tables: customer and boxes in one-to-many relationship. The structure of the tables is in addition : Customer table : id#| name | date_purchased | address | 1 John ...
0
votes
1answer
53 views

What do you call numerical coding systems that are left-aligned?

I'm writing an importing mechanism for the NAICS database. I have a few questions about this code-format. I've seen it before and I like it the setup. I'm going to ask some other questions about ...
0
votes
1answer
87 views

How to handle versions of an Entity in Database Design

I am working on a new project. The domain logic of the project is as follows: A user uploads a file (Document) and gives a title, then another user comes along and (s)he also tries to upload a file ...
-3
votes
1answer
624 views

How to retrieve a query from 3000 tables in SQL? [closed]

I have plan to create 3000 tables for my database. But I am afraid how will I retrieve some data from those many tables. Eg: Select * from table1, table2, table3.... table3000 where ...
0
votes
0answers
53 views

Can I have a Distributed Database in which one database is MariaDB and the other one is MySQL Cluster?

This is a hypothetical question of course, I just want to know, because that's one of the question i'm going to be asked in my presentation and I have a feeling that the answer is "yes" after all my ...
0
votes
1answer
142 views

Accumulo table design methodology

I am just getting started with Accumulo and NoSQL databases and I am looking for some discussion on table design. I get the key value structure that is seen in the manual. However, if I am trying to ...
1
vote
0answers
39 views

Is it always bad to have an own table for value objects?

I know that value objects should be embedded in the table of the object they belong to but what if the value object is more than a simple object and contains many fields/columns or even sub-objects? ...
0
votes
1answer
108 views

To EAV or not to EAV?

I am working on an application which records data from different forms. New forms can (and will be) constructed dynamically by an admin. I am wondering what would be the correct way to save this data ...
2
votes
1answer
334 views

Classifieds Database Design

I have always worked with CMSs, but I am trying to get into using frameworks like Laravel and Yii. My main issue is when working with CMSs, I didn't have to think much about the database design since ...
2
votes
2answers
120 views

Normalizing nearly identical tables

Background I'm managing a relatively small database project in which we are adding support for reporting involving status updates for items in out product table. I was bit thrown into this and I've ...
2
votes
1answer
69 views

Constrains relationship

I have the following design. Each user has it's own contacts, it's own hosts and assign those to a domain which belongs only to him. I want to insure that the host you assign to the domain belongs ...
0
votes
1answer
221 views

Database Design for lookup tables

I have a transaction table called questionnaire and a question lookup table called question_codes. questionnaire qst_id - number (primary key) question_type - number (foreign key) ...
1
vote
4answers
63 views

Better Indexing for MySQL?

Is it better to index each column individually with it's own key or to index multiple columns under the primary key? I've seen it done both ways in many different applications and I don't see a clear ...
0
votes
2answers
189 views

Which schema is better for a shopping project? [closed]

I'm working on a business-to-customer project that has variety of product types. There are a few properties like name, description, brand_id that each product has but there are also many specialized ...
0
votes
2answers
121 views

To normalize or not

I'm scraping data from a website and they have pages for Users and Groups. The pages are pretty similar; id, name, description, created date, number of elements and custom background. They also have a ...
0
votes
3answers
77 views

Design concerns for using 3x bit or one char(1) or one integer in table for holding status of item

I need to extend my existing table with status column. I am in doubt how to do that in most appropriate way regarding of future use of that status and performances of existing table. My table is ...
0
votes
0answers
62 views

Import only selected column from tsv into mongodb

Edit I am uploading very big tsv file thats why i dont want to import unnecessary column in mongodb, I know how to upload file into mongodb(just as attachment) as:- mongoimport --db xyztsv--c ...
0
votes
2answers
64 views

Best way to handle temporary data

Say I have a table prices. Users can see the prices of this table (I'm simplifying it). Users also can send prices to the server, so the server is going to collect these data in another table ...
1
vote
1answer
1k views

Postgresql vs MySQL - Which is better for join queries & writing data(inserts) [closed]

I have to design a database which will end up with 50M records in a single table(there will be other tables with lesser number of records). I'm more concerned with join queries & writing ...
0
votes
1answer
114 views

Can I design this database better? [closed]

I have the following database design: Script to reproduce: /* DROP TABLE [dbo].[feedback] DROP TABLE [dbo].[action] DROP TABLE [dbo].[download] DROP TABLE [dbo].[user] DROP ...
1
vote
3answers
111 views

One or several tables for attributes

I just spent some time discussing two alternative DB designs with a coworker and I'm not convinced. Neither of us is strictly DBA so we may be missing something. The overall goal is to create the ...
0
votes
1answer
60 views

How do I setup a foreign key relationship based on two columns?

I have the following two tables: CREATE TABLE [dbo].[company] ( [CompanyID] [int] NOT NULL , [CompanyName] [varchar](150) NULL , [DepartmentID] [int] NOT NULL , ...
0
votes
0answers
21 views

Joining data from 2 different servers

It is possible to host my databases on 2 different servers? For example if I store my comments on 'heroku' and store users on some other server it is possible to join the two servers together?
1
vote
2answers
123 views

Splitting up tables with similar structures since they contain unrelated data? (huge numbers)

Is my reasoning correct in splitting up tables with similar structures since they contain unrelated data? I'll explain the situation with an example : Suppose there is a server which hosts an online ...
0
votes
2answers
149 views

Database design with multiple tables

I have a data structure as follows: Two main components: Projects and Results So I have a table called Project which has multiple fields as Id, Name, Title, StarDate, EndDate and many more which ...
0
votes
2answers
64 views

Nested one to many relationships?

I'm working on a "Bus stations" database. I want to design the next relationship: "A bus line has many stops (one stop belongs to one line) and one stop has many arrival times (one arrival time ...
1
vote
1answer
67 views

Data modeling membership and profiles

Anyone have an idea on how to solve this issue. Im modeling my membership and user profile DB and run into one issue I have to solve. I have this layout of tables. Membership (where all basic info ...
1
vote
1answer
87 views

When to stop splitting tables?

I am creating a league management system. I came up with the diagram below. I am no database expert but I feel it would be better to merge the three following tables: season_league, league_division ...
3
votes
2answers
94 views

How do I deal with items that I need to repeat monthly?

I have a table where users will enter transactions on a weekly basis, these transactions will either be single items or will be recurring i.e. rent would be recurring and should be the same for every ...
2
votes
1answer
136 views

Removing “duplicates” within a time range

I have a table that contains number plate data with a date and time stamp, collected by a plate-reading CCTV camera at a site entrance. Vehicles stopping at the site entrance will create multiple ...
1
vote
1answer
57 views

Should I duplicate the data or have linking table?

We have the following data: Collections of items Individual items These will go into the following tables: ItemCollectionTable (Id, Name, OtherFields (desc, date, etc..)) ItemTable (Id, ...
0
votes
1answer
110 views

How to model medium.com paragraph comment

If you have used medium.com, I am interested to know more about how to model readers' paragraph comments in database. Specifically, how connections between these comments and paragraphs are modeled? ...
1
vote
2answers
185 views

Constant values in columns

I have a SQL Server 2000 database used by our ERP system. There are many columns that always have the same value. A table row is really huge, potentially exceeding the maximum row size in SQL Server ...
1
vote
0answers
73 views

How to store object with property of generic type in DB

In my business domain there exists an entity parameter. Beside other properties which are identical for each parameter, they have values. These values can be of different data types. There might be ...
2
votes
1answer
55 views

How to go about modeling the main object of relationship?

I'm using MySQL and MyISAM tables. I have a bunch of objects that I want to group together 1 object belongs to 1 and only 1 group 1 group can have many objects 1 group has 1 required main object ...
1
vote
2answers
116 views

Designing a user table, FName LName v.s Username

I did some research on different ways of getting user's name. Some database designers prefer to have a username that contains first name and last name with space separator, and some other designers ...
1
vote
0answers
99 views

Are duplicates ever acceptable in a database

A warehouse system I am working on allows inwards consignments [type = 0] and outwards consignments [type = 1]. The user selects multiple products for each consignment and then multiple warehouse ...
1
vote
0answers
44 views

Dynamic form from a database [closed]

I am considering to develop a dynamic form so all the fields and validation type can be stored on the database. For example I could do table design something like this: Field ID | Field title | ...
2
votes
1answer
69 views

Correct database solution?

So I work for a smaller company and currently we need to do our data processing with a desktop solution. We're running into memory limitations and the overall solution in most people's eyes ...
1
vote
0answers
28 views

What database to use for easily handling join-like queries on multiple very large tables? [closed]

I'm currently looking for a database engine than can easily handle queries on multiple collections/tables (at least 5) with aprox 10M entries each. Any advice on what to use?
4
votes
1answer
208 views

How to relate two rows in the same table

I have a table where the rows can be related to each other, and logically, the relationship goes both ways (basically, is directionless) between the two rows. (And if you're wondering, yes, this ...
0
votes
1answer
62 views

Two types of data, so two type of databases?

For a social network site, I need to propose a DB. The application is written in Java & will be hosted on VPS(s) initially. Broadly classified there is two type of data to be stored at backend: ...
1
vote
3answers
73 views

Which of these two methods is standard when creating a 1 to many database relationship?

If I have a customer that can have many addresses, I can create an Address table with columns Street, Town etc. and CustomerId. Then I can insert multiple records to have multiple addresses per ...
0
votes
1answer
102 views

Use surrogate or natural PK if a row is uniquely identified by two or more columns?

I am having a hard time choosing between natural and surrogate PK for my database table. The database is for a ranking system for an MOBA game. Here is more or less what I would do if I were to go ...
0
votes
1answer
81 views

Whether or not to create separate tables

I am working on a project, where I need to store the information related to A and B, the A and B both have identical columns.There might be thousands of As and Bs. Should I use "type" column to ...
2
votes
2answers
139 views

MySQL - unique constraints design

I am using MySQL and looking to solve a problem with relational data. I am not sure it is possible but wanted to ask the community. Please consider the diagram: I would like to add a unique ...
1
vote
2answers
99 views

Relations, dependencies and normal form

I have some issues in understanding about relations and dependencies. I will show two examples and what I want to know: Assume the relation GTX {G,T,X} with the following dependencies: G,X -> T ...