The tag has no wiki summary.

learn more… | top users | synonyms

7
votes
3answers
5k views

Inventory database structure when inventory items have varying attributes

I'm building an inventory database to store enterprise hardware information. The devices the database keeps track of range from workstations, laptops, switches, routers, mobile phones, etc. I'm using ...
6
votes
2answers
204 views

Am I violating any NF rule on my database design?

I am a newbie on creating database... I need to create it for my recruitment web application. My application needs to schedule screenings, exams and interviews of applicants and save result in the ...
4
votes
2answers
1k views

What exactly is a database engine?

I have gone through the definition on http://en.wikipedia.org/wiki/Database_engine several times: A database engine (or "storage engine") is the underlying software component that a database ...
4
votes
1answer
88 views

How do you manage a list for particular object. for eg. user comments on specific object(user post etc.)

I am new to database and web application development. I want to know how to store a list for a particular object in a database. For example, user comments for a particular post(object), or the ...
3
votes
1answer
660 views

Schema design: Use of association (aka: bridge/junction) table vs foreign key constraint with composite index containing a non-key field

This is an inventory database for IT assets. The models used are trimmed in order to focus on the problem at hand. Using SQL Server 2008. Thanks for taking the time to read and for any input you can ...
2
votes
1answer
116 views

One table or several tables?

I have several types of writings: articles, projects, reviews, etc. I have a table containing paragraphs (fields id (INT) and partext (TEXT)). Each writing consists of several (ordered) paragraphs. ...
2
votes
1answer
53 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 ...
2
votes
1answer
630 views

Under what conditions are polymorphic associations used? What are the alternatives?

As I understand it, polymorphic relationships among tables in a database allow one table to have one foreign key that references many tables. I have found that tags are a common application of this ...
2
votes
1answer
6k views

Multiple left joins or subquery?

I'm working on joining multiple tables together to extract some data related to user "runs", this includes basics like runID, username etc but also joins to the run times and favourites. I have the ...
2
votes
0answers
37 views

Single table row “sharding/versioning” to customize values

Introduction Hello everyone, I have done quite a bit of searching and I cannot find a solution for my specific issue. There are a few factors that complicate my situation, which I have outlined ...
1
vote
1answer
30 views

Stroring a type of an entry

There is a table estate with numeric fields districtru and districthe (for a name of a district in Russian and Hebrew), which refer to primary keys of the table districts. The districts table has the ...
1
vote
1answer
222 views

UNF to 3NF is this relation workable?

I've inherited a flat table of data consisting of around 2 million records. Looking at the data its already in 1NF, i'd like to get this into 3NF. The data is Australian so suburb can't determine ...
1
vote
1answer
193 views

Structuring data in MongoDB for a to-do list type application

This is a fairly high level question as I am in the initial stages of planning this application, and am also very new to MongoDB and document-based databases in general. Disclaimer aside, I am ...
1
vote
2answers
71 views

How to Handle Database for Application which Starts from Scratch Annually

I am working on an application which will be used by an organisation annually, however each year they will be starting from a clean sheet. Which of the following two approaches (or any other approach) ...
1
vote
1answer
361 views

Stock management - needs suggestions

I need to create a database which will have below modules: Items [Food items, stationary] Items Stock Management [stock in out] Customers Items Sale Management Issue: The system will have ...
1
vote
0answers
46 views

How to design a database structure for different groups of contacts?

I've been looking around for a while how systems manage their contacts. Most I encounter is creating a people or party table including a type to define the type of people/party. These types are either ...
1
vote
0answers
29 views

Database design: Normalizing a “(many-to-many)-to-many” relationship

Short version I have to add a fixed number of additional properties to each pair in an existing many-to-many join. Skipping to the diagrams below, which of Options 1-4 is the best way, in terms of ...
1
vote
1answer
52 views

Product quantity bound to colors and sizes table structures

I've been thinking about how I'll be able to create products with sizes and colors which will match the max quantity of a product (or their total will be the max.quantity ). Let's say I got a product ...
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
34 views

A separate table or ENUM? [duplicate]

There is a table person (which has among autoincremented primary key field id such fields as firtsname and lastname). There is a table employee whose primary (but not autoincremented) personid is a ...
0
votes
1answer
170 views

Database structure for tags?

I posted a thread on Stack Overflow and one person pointed out that my database structure wasn't the best so now I'm here to ask how to do this in a good and proper way. Currently I have one table ...
0
votes
2answers
65 views

Primary key for link/junction table with time-dependent data

I want to link two tables in such a way that for any given time period the relationship is one-to-one, but over time the relationship can change. As an minimal example, suppose I want to list the ...
0
votes
1answer
12 views

How to structure renting and sale as type of purchase?

I'm currently planning a database which involves two different types of Products that can be bought outright, or rented for a weekly or monthly amount. I'm just trying to figure out how to structure ...
0
votes
1answer
34 views

How to relate 2 tables to a third when the first 2 tables have a relationship?

For once, I find myself at an utter loss in terms of coming up with a good question title. Consider the three following tables. Each has additional columns, but only the columns relevant to the ...
0
votes
1answer
50 views

How to check how the table structure effects the performance of my query

I want to check how the table structure of a certain table effects the performance of a delete query. This is not a generalised question, I have a table, with currently 2.2 million records ...
0
votes
1answer
101 views

Implementing something similar to “pointer arrays” with MySQL

While building a site I came across the following issue: I want to be able to have multiple containers and within each container have ids pointing to multiple items that lie on another table. Scheme: ...
0
votes
1answer
63 views

Several variants of a string in tables

I need: a table containing keyword phrases; a table containing URLs; a table (or maybe a view) with keyword-URL pairs (referring to IDs of the two previous tables); tables holding keywords/URLs for ...
0
votes
1answer
182 views

Users database to store access levels, can I move the non-essential information to another table?

I would like some advice on the best database structure for my system. I have different kinds of users with different access levels, and different information of course. I created a users table with ...
0
votes
1answer
903 views

Db design for a quiz with variable number of answer choices, and each worth different score in a different category?

I'm working on a question/answer project and having a hard time coming up with a suitable database structure. Each question can have from 1 - "n" answers, and each answer is associated with one of ...
0
votes
2answers
38 views

JOIN on variable number of columns

I have the two tables courses AND something_about_courses: courses course_code course_session course_type something_about_courses course_code course_session some_description To ensure that I ...
0
votes
0answers
11 views

What are suitable databases for GIS data for MapInfo and ArcGIS and WindPro? [on hold]

At the moment all data is stored in a windows folder structure. There are no meta data tools in place. The way of storing the data can definitely be improved, but how can I determine: a) How the ...
0
votes
1answer
46 views

How to organize the tables of a MySQL database with several statistics data of several years?

I am developing an app that must provide statistics information about the distribution of the money that a person spends each year in taxes in the city where he lives. The user should select the ...
0
votes
1answer
45 views

MySQL DB structure with Main category and several nested sub categories

I am looking to create a set of fields on my webpage identical to what eBay uses on their category selection page when you are selling something. For my purposes I am doing motorcycles, power sports, ...
0
votes
0answers
70 views

Map multiple external-id to single internal DB-id

I have been tasked to add a new functionallity to a application and I'm not really sure how the best way to go about this would be... Basically there is a application that receives messages with some ...
0
votes
0answers
22 views

How should I restructure a table that contains multiple columns that contain similar, but not same data?

I currently inherited an InnoDB table that describes a product. In the table there are a few columns that describe the maximum height at which the product may be mounted. These are the columns: ...
0
votes
0answers
30 views

Using MySQL As A Graph Database, Can It Be Done Efficiently?

So I am currently working on a startup idea with a friend and we've come a long way, it's somewhat functional and I've tried to not let database design decisions slow the progress of the site. As of ...
0
votes
0answers
412 views

InnoDB errors after having deleted “ibdata1”

By accident, I have deleted the ibdata1 file in the MySQL directory because MySQL wasn't functioning correctly. After reading so many forums, I found a post that recommended deleting the 3 files ...
-1
votes
2answers
290 views

How to structure my DB for storing page views?

I want to add a new row to my db table on page views when the user view a page. This could easily be done by incrementing the number of views for a certain page in pages table. However, I want to ...
-1
votes
1answer
37 views

One or two tables (for two things: cancellations and moves)?

A lesson may be canceled, moved to an other time, and possibly switched to an other teacher. In other words, we have lessonid INT UNSIGNED canceled BIT(1) time TIME teacherid INT UNSIGNED Should ...
-1
votes
1answer
259 views

Calculating employee's work time

I need to store and analyze employee's work time. Currently, I've developed this table structure CREATE TABLE `hirefire` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `employeeid` int(10) ...
-2
votes
1answer
143 views

How to represent it with UNIQUE indexes and foreign keys?

"Group" is a group of pupils. "Topic" is a topic of lessons. To every group corresponds exactly one topic. (So there may be multiple groups per topic.) To a pupil corresponds multiple groups, but ...