The logical model and/or physical design of a database.

learn more… | top users | synonyms (4)

1
vote
1answer
67 views

What kind of database should I use?

I'm designing a new system and I'm wondering what kind of DB should I use for my needs. I have a tree structure of nodes, where each node has historic values. For each historic value it should hold 2 ...
6
votes
1answer
138 views

MySQL database design to sort and filter air traffic data

I am struggling to design the correct database / structure for what I'm trying to do. Let me try and explain the situation. Background We are a group of enthusiasts who monitor air traffic via ADS-...
17
votes
4answers
463 views

Entity relationship problem

I have 4 tables related like this (it's an example): Company: ID Name CNPJ Department: ID Name Code ID_Company Classification: ID Name Code ID_Company Workers: Id Name Code ID_Classification ...
0
votes
0answers
137 views

User is An employee. Role or relation

I've created a database based on a party-model. In short I show you the tables: parties, kind, party_to_party_relations, role, party_roles table parties: CREATE TABLE `parties` ( `id` int(11) NOT ...
0
votes
1answer
53 views

Is it good to save Keywords stored by users in a new DB schema?

My question is more from the schema design and of further performance of the DB. I'm designing a DB schema which will store primarily strings. Actually, users work on these string, as normal mortals, ...
0
votes
3answers
67 views

How to design a Table in which its fields varies on its categories?

I am trying to design a database to post free ads. Eg http://www.gumtree.com.au/p-post-ad.html Scenario: Every ad will have different categories and some categories will have further sub categories. ...
0
votes
1answer
31 views

Slow query - just error count

I deal with slow queries in whole project. I indexed heavily but the results are nowhere. I had a lot of logs (thousands per minute) from SCADA systems and I am trying to count them for each SCADA ...
8
votes
2answers
597 views

NoSQL : What is unstructured data?

we are currently running at the edge of resources with our mssql server based solution. We have now many traditional options regarding the next move to tackle the load: buy faster CPUs and IO ...
1
vote
3answers
156 views

Users vs. People - where to keep the email address?

I'm designing an app similar to Facebook, called Headtome. I want to have users that create public profiles, including email addresses. Then, Mary can choose to message John, and that message goes ...
1
vote
2answers
103 views

Suggestion for enforcing unique constraint in a table where soft delete is implemented [duplicate]

I am using SQL Server 2014 and in my database, I have a Position table which is structured like this: ID int PK Name nvarchar(50) Unique Index IsDeleted bit A ...
3
votes
2answers
127 views

Computed Column Update when Table Value changes

I have environmental sensors collecting some raw data from environmental stations. In addition to the sensors, there is a physical gauge measuring water height (staff gauge). I'm trying to set up the ...
1
vote
1answer
49 views

Is this the correct way to model a relationship between an object which may or may not have another object?

I'm creating a database for a department store and the database has two tables: Items and Coupons. An item, like a TV, can only ever have one coupon. Some items don't have a coupon at a given time. ...
7
votes
3answers
554 views

Implementing versioning system with MySQL

I know this has been asked here and here, but I have the same idea with a different possible implementation and I need some help. Initially I had my blogstories table with this structure: | Column ...
4
votes
2answers
284 views

Potential schema for product failures and repairs

I'm creating a schema for product failures and repairs and would appreciate feedback on the schema. The database is intended to capture all product failures and corresponding repairs. A product can ...
11
votes
3answers
443 views

Constraint to enforce “at least one” or “exactly one” in a database

Say we have users and each user can have multiple email addresses CREATE TABLE emails ( user_id integer, email_address text, is_active boolean ) Some sample rows user_id | ...
4
votes
1answer
102 views

How can I design a database to track each individual's stat changes weekly, in a group?

There is a group of people, and I need to track each person's individual numbers weekly such as their weight lost, steps walked, and bad foods eaten. I plan on implementing this database into ...
0
votes
1answer
42 views

A form including content from two tables

I am working to create a database of all the places or administrative entities of one country. Most work will be about adding new districts. I have to detail which region every district belongs to. ...
1
vote
1answer
222 views

Best practice to create a database schema for Open Auth (Social logins)

I've done a database schema for user management alongs with their roles and permissions. The problem actually began, when I decide to integrate a multiple "Open Auths" such as Facebook Login, Google ...
2
votes
0answers
94 views

Networking (classmate like) website database model

I am working on a project that consists in building a networking website like the Classmate web site. I have proposed a database model based on the social media database model presented on the ...
4
votes
1answer
104 views

Better database design

I'm using a MySQL database to store data from my java application. In java I have two classes: The VocabularyList class has a name and holds a list of vocabularies. A Vocabulary has a vocabulary ...
2
votes
1answer
109 views

Database schema for passing requests to role based users

I am working on a Database schema where the scenario should be: There are role based Users; Role 1, Role 2, Role 3 and Role 4 There is a Request model (or class, or table) User with role Role 1 will ...
0
votes
0answers
52 views

mysql - suggestions for table design with huge number of columns [duplicate]

We have a table that consists of a huge number of columns (usually between 500 to 1000, depends on our clients websites). We are suffering from speed issues due to this, and we're looking for the best ...
3
votes
0answers
81 views

One table or four?

I have four entities: Absence { ID, StartDate, EndDate, Days, Hours, Reason } Overtime { ID, Reason, Date (Integer), Hours (Integer) } Time in lieu { ID, Reason, Date, Hours } Holiday { ID, ...
1
vote
0answers
191 views

Search a value from multiple column and multiple table [closed]

I have to search a value from multiple column and multiple table and each table is linked by foreign key and private key (in parent table , there is only one parent table and rest is child table of ...
5
votes
2answers
149 views

Which to store: miles or kilometers?

My app is launching to a US audience first, but I want to internationalize the database schema for future expansion. Obviously I will convert between the two units as necessary regardless, but are ...
1
vote
0answers
56 views

How to make a query from a database with schemas to a database without schemas, and vice versa, with DBLINK in postgres

I have a DB (DB1) in postgres 9.4 who use DBLINK to query another DB (DB2), and vice versa, using views and functions. But now i have to add 2 schemes to DB1 (CLIENT1 And CLIENT2) and i want when i ...
3
votes
1answer
67 views

How are databases able to process queries in parallel while still retaining correct order?

How do databases process queries in parallel (more than one query at a time) while still keeping the correct order (queries are performed in the same order that they are submitted)? Is there a kind of ...
0
votes
0answers
153 views

FastReport / Report Query Help - How do i convert a integer value into a string?

I am using FastReport to create my reports and I have an issue. I am trying to make a form with the data in ProductMaster.ITEMBUYINGPRICE. The output of this column is a 6-digit value showing the ...
3
votes
3answers
481 views

Implementing User Privacy Settings with MySQL Database

I am actually working on a social website. Not big, aimed at a very small group of folks. And I am curious, to how I can best implement Privacy settings for my users in a MySQL driven database. For ...
5
votes
1answer
348 views

How to model complex systems like networks in Postgres

I need help with modelling of a network involving switches (24 port, 48 port, POE, and a combination of those) and edge devices (computers, IP cameras, telephones). From an object oriented perspective,...
1
vote
0answers
56 views

Which database technologies to use? [closed]

We are a small construction company that currently has a very old, outdated database system that has been written over the past 20 years in Visual FoxPro. I have now been designated with the task of ...
0
votes
1answer
29 views

Are cut and paste of records from a table to another a correct pratice?

I am working on an app that does task dispatching. A user inputs a task with a start date and end date. The app gives the user a list of workers available and chooses to offer the task to some of ...
2
votes
0answers
54 views

How to implement search for world-wide Wikipedia/OSM places with alternative-names

I would like to implement a search-backend which returns a location-aware search results of all Wikipedia / OSM place names, while recognising place names in all languages. Thus, if you search for "...
4
votes
1answer
496 views

Database design for a car dealers website

I am creating a new website for all the car dealers in my region to show their cars on and i need your opinion on the database I have created because I have some doubts. For instance, is it best to ...
0
votes
0answers
51 views

Does MySQL InnoDB compression combined with Windows compression save more space?

We have a very large MySQL InnoDB database, compressed using the following syntax at the end of the table declaration: ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 We also have windows ...
4
votes
1answer
139 views

Do I relate entities that are indirectly related when creating a student-course ERD?

I'm trying to create an ERD for a tutor center, this is what I understood from their operations: There is the tutor center director, then under her there are sections/departments. It, math/calculus, ...
0
votes
1answer
127 views

MySQL Circular Replication

I have this scenario where I have 4 MySQL servers (A,B,C,D), as this: Server (A) is always online, and serves as the main website. Servers (B,C and D) are online on random periods of the day, and ...
1
vote
0answers
28 views

Storing resource information efficiently

I'm looking for any advice on how to efficiently store some resourcing data for our app. For each project in our system we need to store the resources required and this comes in the following form: ...
3
votes
1answer
116 views

Inventory management in Rails

I'm creating a inventory management app in rails. I have an User Table and a Recipe table, there is also some tables with types of material (pens, sharpies, paper, and so on). Because there is a lot ...
3
votes
0answers
25 views

Is it a good way to use an auto increment integer field as the primary key? [duplicate]

In database design, is it a good way to use an auto-increment integer field as the primary key? For Example, I have a tenant table, tenant_id is unique. In this case, do I need a auto_increment key? ...
3
votes
4answers
370 views

What architecture is best to store a large 3 dimensional array in MySQL?

I am looking to create a large 3 dimensional database in MySQL. The structure will basically be a standard MySQL table, with a time component / dimension added. See the following analogy: { x, y, ...
5
votes
2answers
1k views

Storing a Billing Address Best Practice in Orders Table

Can someone help me understand this user's answer for a CustomerLocation table. I really want a good method for storing addresses in the orders table. What I'm looking for is how I can set up my ...
2
votes
2answers
45 views

How to set-up a distributed data storage system for The Real Junkfood Project

Context The Real Junkfood Project consists of a network of pay as you feel (PAYF) cafes. We need to log the data from each of ~100 cafes, generating perhaps 50 rows each par day. I estimate that this ...
3
votes
4answers
799 views

Normalization for postal addresses in US (address, county, city, state, zipcode)?

I've been trying to understand for the last few years which way is good for storing addresses. I've been getting "normalize all the way" but also "denormalize as much as you can" and I just cannot get ...
2
votes
0answers
78 views

Design Question - Stock and OnSale Table

Background : I'm designing a solution for a repair toy association. Since they have office - I'll use Access. Plot : Stock will store items - I choose this primary key (Item_Id,Record_date) ...
0
votes
1answer
62 views

TOTAL column or VIEW that computes?

I've got a couple of tables to track volunteer workers at our non-profit. One stores Volunteers and tracks information about a volunteer such as the person's name, a contact number, primary location ...
5
votes
1answer
275 views

Managing and speeding up queries on PostgreSQL table with over 3 trillion rows

I have time series data which spans over 10 years and has over 3 trillion rows and 10 columns. At the moment I use a PCIe SSD with 128GB of RAM and I am finding that querying takes a significant ...
1
vote
1answer
96 views

Database design for 2 1-to-many?

It's the first time here so I don't know if it's the right place to ask.. I'm not good in database design, just learning, so I'd like some advice if possible. The case: I'm building a really small ...
0
votes
2answers
57 views

MySQL - replicate some tables between transaction and report database

I have two different database (on two different hosts). One database is transactional and another database is reporting. Let us say, it stores information about departments and their employees. ...
3
votes
1answer
377 views

Supertypes and subtypes

I am trying to design a database that has supertype/subtypes. I have the following users: - basic user - business user - administrator (super user). All three users share a common table (users) ...