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
0answers
34 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
320 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
75 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
87 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
115 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
111 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
158 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
112 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 ...
1
vote
1answer
67 views

Query for View with unique entries from Database with repeated entries

I have a table with columns of Hotel names, city name and country name (of the respective hotels). I need to create a view of unique entries which will contain city name and country name columns. Any ...
0
votes
1answer
91 views

Database Structure and Design [closed]

Okay my project in simple words. Multiple shop sites are hosted on different hosting services receiving orders from customers. All the orders are to be directed to the main company website where the ...
3
votes
0answers
203 views

Mathematical method for spotting irregularity in numbers flow

I am trying to build an engine which is going to predict orders for items inside shop. Three main variables are: Time-dates (x-axe etc 1.1.2013,1.2.2013 etc I do calculation one per day) Available ...
1
vote
1answer
143 views

Handling or preventing conflicts in a multi-user system

I have a web application that is accessed by multiple users from different locations worldwide. Let's say I have an "edit" form for a specific document and two (or more) users are editing the document ...
0
votes
1answer
55 views

Creating groups and members [closed]

Is this a good idea to manage members of a group like so: *Assuming members can belong to one group and no other *Simplified model Group: name someid User: name ForeignKey(Group) state ...
6
votes
2answers
227 views

Should I add a column or 1-1 table if property is usualy null

There's a new unique property we need to add, which is relevant only to a specific subset (less than 1%). We thought it's better to add a new table which will be 1-1, than to add a new column which ...
1
vote
1answer
131 views

How to link a customer to a country when the city/state isn't known

We have a situation where medical systems are sold to hospital groups, but at the time of the order, we don't always know into which state and city the system will be installed. We always know the ...
7
votes
4answers
302 views

how to explain indexes

This question is about teaching: When I learned databases, we talked about indexes being like the card catalog in the town library. We had at least an author index, a title index, then the Dewey ...
0
votes
1answer
125 views

store country name or country id [closed]

I am designing a database layout for a site. Agents registering on the site will have to enter their address including the country. Later I will build a dashboard where you would be able to ...
0
votes
2answers
56 views

Managing constants changes to database

Here's the deal, I'm in charge of creating a website that will host small web apps. This apps will be photo contests, creatives sentences and other similar gibberish. The deal is, since apps we'll be ...
0
votes
1answer
100 views

Cardinality showing the nature of relationships among tables

Lets say there's a table named Department and a table named Instructor. We've conditions that says : A Department can have many instructors. An instructor can be associated to only single ...
5
votes
1answer
548 views

Full text search through many tables in MySQL

We have high traffic NEWS websites, I want to add a feature that every user can search through over all content of site, such as news, polls, comments, galleries,etc . Each of contents type has its ...
-3
votes
1answer
84 views

Make “NOT NULL” default in Postgresql 9.2 [closed]

I use NOT NULL a lot when creating columns. Is there a way to make this default when defining columns? In other words, make column is_nullable default to NO. (I realize this would make it harder ...
2
votes
1answer
130 views

DB: Having redundant fields in Table

This is a basic DB design question but I now run multiple times into the same situation which I try to illustrate in the following example. Lets say I have make a DB-system for messaging in a ...
1
vote
1answer
615 views

Need advice for table design for multi-user access

I have an inventory application that needs to support multi-user. As of right now, only one user can access and manage their items. I've gotten a lot of requests to support multiple users so they can ...
0
votes
1answer
295 views

Database design for surveys in MySQL

I'm trying to design an app where users take a new survey everyday (that's not the main part of app but it's an important part). I've never designed a database before so what I'm trying to do might ...
0
votes
1answer
493 views

Need help designing table with list of IDs to store

I have a table that I need to create to hold saved emails for FUTURE delivery (to, from, message, scheduled send date, etc). The catch here is that I don't know who's supposed to receive the email ...
2
votes
1answer
57 views

How to handle “or” possibilities in MongoDB

I'm new to MongoDB and by no means an expert in DB design in general. This feels like a really basic question that's probably been answered a million times, but I'm having a surprisingly hard time ...
-4
votes
4answers
131 views

Is there a DB that will allow the same field name with different cases?

Is there a DB that will allow a user to create a table with two fields, one calls MYFIELD, the other called myfield?
-1
votes
2answers
230 views

Relationship between professor and course [closed]

I'm designing a database where I have a Course table and and Professor table. The business rules are : 1) A professor can teach many courses. (This is obvious). However, I get stuck in the second ...
2
votes
1answer
172 views

One to one mapping vs many to one mapping on data base design

I'm currently doing call detail records (CDR) data analysis as my project. On course of data-base design, I had separated the date (table contain id, day,month,year), time field (table contain id, ...
1
vote
1answer
651 views

Bus time schedule database design

Hi I'm trying to figure out how to design a database for bus time schedule. There are several lines, each line have two routes (forward and back), each route have several stations (stops) and each ...
1
vote
1answer
196 views

Database schema for a variable-level hierarchy with variable types?

A client is asking for a database structure for a medical translation app that involves narrowing down a health issue and then asking specific questions on it. The tricky part of representing this in ...
1
vote
1answer
257 views

Multiple foreign keys with shared columns for weak entities

this is my first question at stackexchange. I have a parent table (P) with two child (CC and CD): CREATE TABLE P ( A CHAR(3), B CHAR(2), CONSTRAINT PK_P PRIMARY KEY(A, B) ) CREATE TABLE CC ...
3
votes
1answer
414 views

Learning to draw entity relational diagram

I am trying to learn entity relationship diagram, following question is the objective. Information consulting firm has number of offices with employees. The employees can move offices depend on the ...
0
votes
1answer
1k views

Oracle db_name, db_unique_name, and ORACLE_HOME

I'm studying Oracle and I would like to understand the uniqueness or constrains when assigning these parameters. Suppose a machine with a single OS (host) and 2 different databases (physical). Are ...
0
votes
1answer
67 views

Modeling a database for easy counting / reporting

I have an app where user is known (user_id) and he can do several actions (action_id). Every time he makes an action I need to save the fact that he made it for reports/analytics. I guess it is ...
4
votes
2answers
3k views

How to choose a collation for international database?

I'm designing a database which will store data in different languages (using UTF-8), so I think the best way to display the queries results is ordering it according to the user's language during the ...
1
vote
1answer
2k views

Get top most parent by nth child id?

Now there is a question we commonly use this technique to maintain the parent child relation i.e we store all the entities in one tables with a parent_id column and all top most parents have 0 in the ...
1
vote
1answer
1k views

School database design

I am trying to design a database management system with my PHP and intermediate MySQL knowledge, keeping normalization in mind. These are the assumptions: The school has many students from grade 1 ...
2
votes
2answers
855 views

Should I use a separate table to store image file names?

I am learning about database design and I'm writing a Java GUI program with a back-end database. The main table in my database stores a different product in each row. I have some columns such as: ...
2
votes
1answer
136 views

Most efficient ordering post database design

I have posts table that is has post_order column. I store order of each post in it. when I change the order of a row from 25 to 15, I should update all the row from 15 to end. It's good for few rows, ...
1
vote
1answer
77 views

representation in ms-access

I have a database in microsoft access. I want to know how to look up a singular datum from a reference table giving a dynamic set of values. Here is a representation of what I mean: I have the ...
1
vote
3answers
204 views

Is this good/bad database design and why?

I am building a database for a small project. I don't have much experience so I am unsure, but I get the feeling I am not approaching this correctly. I have a system which allows users to create ...
0
votes
2answers
1k views

Order table Database design

I'm in need of some help with the database design of order table of a shopping cart for online food ordering system. I have a design below. Tables about which I'm Concerned are order_details and ...
2
votes
0answers
158 views

Geographic Hierarchies in a OLAP Cube / Data Warehouse

Are the following geographic hierarchies correct? Do any US/Canadian area codes cross state/province lines? Do any US/Canadian counties cross state/province lines? Are there countries with counties ...
0
votes
0answers
320 views

Trouble converting MySql Database to SQL Server

I have an mysql database that contains 38 tables. I used "SQL Server Migration Assistant for Mysql" tool to convert this database to SQL server Database. I successfully converted 37 tables. Only one ...
3
votes
1answer
101 views

Constraint to one of the primary keys as foreign key

Table1: grid_col (col_id,f_id,f_value) (col_id,f_id) is primary key. Table2: grid (grid_id,col_id,text) (grid_id) is primary key. I want to have a constraint for grid that, col_id ...
0
votes
1answer
95 views

Database design in MySQL

I am designing a database for an web application, in this system there are multiple users. Consider, Public (Buyer). Merchant. Tele Marketing Executive(TME). Marketing Executive(ME). Lead ...
1
vote
1answer
76 views

When do you add your foreign keys?

I'm scripting out a fairly simple database so I can simply hand off a script to someone else for an application to use. I'm curious about where best practice/the community stand on this: When should ...
3
votes
2answers
182 views

Scalability: Desiging a message table

This question might be deadly simple but I wanted to make sure I am going through the correct path and not making any simple and irrevertible mistakes. My project will be based on messaging and it ...
-4
votes
2answers
151 views

Inserting images in database [closed]

How can the images be inserted in a table? Var binary is not working in structured query language command prompt,what can be the syntax?