Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
3answers
57 views

Oracle static lookup table

What is the best approach (or what options am I not aware of) to creating a static table or view where the data rarely, if ever, changes? An example use-case is a list of US states, where my ...
0
votes
1answer
27 views

Ensuring that 1 row has 5 specific records referencing it

Context: a TEST has many CASEs. Typical. However, the catch is that a TEST instance must have exactly 5 instances of CASE (1 to 5). I could do something like this: create table TEST ( ID ...
1
vote
2answers
104 views

Working NoSQL scheme for a betting app

I'm building an app where a user can bet on the result of a sports game. Basically, we feed the database with competitions and games, and the users can place their bet in the form of a score ...
0
votes
1answer
43 views

ERD Design for Employee Leave

I found the following ERD design: Which trying to capture as much information about employee leave (i.e sick, travel, etc). What am trying to understand is what does the columns: Table : ...
0
votes
0answers
17 views

Does storing page views in my page table slow performance?

I am storing page views in a view_countcolumn on my page table. So every time the page gets loaded I increment the view count and update the entry. What affect can this have on the performance of my ...
1
vote
1answer
74 views

Friendship and Messages in a MySQL table relational schema problem (concerning big data manipulation)

Before you start suggesting this question for duplicate read it, I have searched and i haven't found any proper solution. So, i'm building a social networking site (I know that you are laughing ...
1
vote
2answers
36 views

DB for storing simple time-stamped values

I don't have that much experience in databases but I need to accomplish this as best as I can. It is rather specific. Database will contain only data structured like this: dataID-timestamp-value ...
0
votes
1answer
35 views

Database structure for bonus system in MySQL

I have a problem with creating the structure for my database in MySQL as I'm new in creating databases. The problem is in this: there are three tables sellers, clients and bonus. Table sellers stores ...
3
votes
2answers
134 views

PowerShell Script To Identify Databases

I have enough PowerShell skills to get off the ground, but have none with SQL server. Can someone please point me in the right direction of how to use PowerShell to get information on remote SQL ...
0
votes
2answers
123 views

1 million strings and exact match search

I need to chose the best solution (software and algorithm) to solve my problem. I need to store up to million strings and data associated with them. Strings are search queries and data is cached ...
0
votes
0answers
14 views

Database for large dynamic network graph - best practise?

I am constructing a MySql database which is to contain data for a large network graph. There will be thousands of nodes and ten thousands of edges. The nodes and edges will be assigned a category. ...
1
vote
2answers
33 views

What's the best design for a logical structure that contains different properties of various types for different entity categories? (MySQL or NoSQL)

I'm designing a MySQL database that needs to contain a list of products. Those products, based on their category, will need to have a list of various properties. Let's say all products in category ...
0
votes
0answers
22 views

Storing IDs of strings instead of strings?

I store every visit of a user to our site. In the table describing users (not visits!) I store his device name, device type (desktop, mobile, tablet), device manufacturer, browser name and version, ...
0
votes
0answers
41 views

Store both a city and its region?

I store various events (such as a search on the site) into a table (in fact I have two tables: one for the event and other (linking to the first) with characteristics of the event). Each city belongs ...
0
votes
1answer
72 views

Creating and designing Air Trafic Control System [closed]

I'm having a class about Database management system, and the prof. gave us a project regarding Air traffic controller system, exact question is "Design and create a system which can manage ...
3
votes
1answer
123 views

Optimum design / structure for product data database?

What would be the optimum design/structure for product data database, where each product have many variations and many attributes? Attribute sets vary between products, and some attributes have values ...
0
votes
1answer
107 views

is this database structure correct?

I need some help with a new database structure because I want to make it right. Later in the app you should be able to create users, events and groups. When you create a group you can add members ...
0
votes
1answer
64 views

Which one is correct and optimized in sql?

Imagine that I have three entities (EntityA, EntityB, EntityC) that can have some images. So there are two ways: Make an image table for each entity. It means that EntityA has a image table named ...
0
votes
0answers
35 views

Designing a multi-language searchable translation database

Good morning, I am currently building an application where I have different sets of terms(yes could be sentences) or words represented in different languages. Example: english | french | german | ...
1
vote
2answers
88 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
1answer
76 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 ...
1
vote
0answers
562 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 ...
0
votes
1answer
212 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
359 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
2answers
120 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
0answers
46 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
100 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 ...
2
votes
0answers
64 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 ...
0
votes
1answer
41 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 ...
-1
votes
2answers
718 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 ...
0
votes
1answer
72 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 ...
1
vote
1answer
119 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
votes
1answer
45 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
vote
0answers
108 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
votes
1answer
389 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
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 ...
-2
votes
1answer
193 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 ...
1
vote
1answer
316 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 ...
0
votes
1answer
145 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
405 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 ...
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
0answers
486 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
vote
1answer
297 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 ...
3
votes
1answer
1k 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 ...
1
vote
2answers
77 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
31 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 ...
0
votes
1answer
64 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
257 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
1k 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 ...
4
votes
1answer
96 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 ...