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

3
votes
2answers
40 views

Conditional Foreign Key Relationship

I currently have a foreign key between two entities, and I would like to make that relation conditional to the entityType of one of the tables. Here's the hierachy of tables, this is done via FK ...
-3
votes
0answers
17 views

PRODUCTION DATABASE HANDLING PROBLEMS [on hold]

I am working in watch company here in UAE. We source watch parts from different vendors operating in china. Most of the watches contains 8-10 components & each component is purchased by different ...
1
vote
2answers
34 views

Duplicate Same Table for Multiple locations

We have an "appointments" table with following schema. appointments(app_id,.....,app_type,location_id) app_type - type of appointment location_id - keeping the location for multiple location setup. ...
1
vote
2answers
24 views

Making sense of these business rules

My scenario is a shop/warehouse and I have a Product table which contains basic product details including it's name, price, quantity on hand etc. I have a Customer table that has the shops customers ...
1
vote
3answers
61 views

Create database design with requirement

I has a small database structure with an Account and Person. I want apply the following requirement: Account have one Person Person do not have necessarily one Account (can be null) When I delete ...
1
vote
1answer
24 views

Using REGEX_LIKE to Implement a Check Constraint

Background I am working on the database design for an application that tracks information about database development projects at my company. The project management office (PMO) assigns a ...
0
votes
1answer
28 views

Developer privileges in a store scenario [on hold]

I have a scenario where a chain of shops are needing to migrate their data and I need to create an environment. I have a single developer and a DBA and I wasn't sure what object privileges to give to ...
-4
votes
0answers
18 views

MONTHLY DATE FORMAT in Nateeza [on hold]

I had a date column which is in format af 20150101, 20150103 and so on for all the months and years. I need the date column should be 2015jan, 2015feb with a single row, I don't to see the whole month ...
-5
votes
0answers
31 views

Database design: balance [on hold]

How to connect the company_balance with sales, customer deposits, transfers. The balance changes when the client makes a sale or transfer or deposit Thanks,
5
votes
3answers
70 views

First ER Diagram - Please Help

I just started my first Database course online, and I have a homework assignment to create an E-R diagram from a list of specifications. I'm really nervous about it because I've never done one before, ...
3
votes
1answer
55 views

Relational or NoSQL Database Design

Disclaimer: I also posted this question on Stack Programmers, because I was not sure which was the most appropriate. This database holds assembly instructions data for shipbuilding, later use in a ...
1
vote
2answers
57 views

Index planning for many columns with different usage

I've a table with 80 columns and that is a base table for most of the application. Daily load inserts almost 8,000 records and update upto 2,000 records. This table is now having more than 5 million ...
0
votes
0answers
10 views

Linking MS Access 2010 to Outlook Inbox: Including Attachments

I'm trying to set up a MS Access table linked to an Outlook folder. I've been able to use the external data wizard to set up a linked table, but the table seems to only include subject lines and ...
2
votes
0answers
38 views

How do I provide a failsafe for retrieval of data from excel to SQL

So say there is a process in place for importing data from excel spreadsheet to SQL using SSIS. And there are two tables, one with new data and one with data from its previous run. I sometimes have ...
0
votes
1answer
60 views

Database design help required

Need help designing in my database tables. I have a set of table which are being populated on every execution, like wise this executions are user specific if user executes an execution data at that ...
1
vote
1answer
45 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
42 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 ...
13
votes
2answers
173 views

Entity relationship problem

I think my question is stupid but I just can't figure out how to solve it: I have 4 tables related like this (it's an example): Company: ID Name CNPJ Department: ID Name Code ID_Company ...
0
votes
0answers
37 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
23 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
0answers
10 views

Modeling the living place of a Person [migrated]

I have a dwelling class which is a generalization of house and building. Those classes have their own properties, and the class floor is a composite of building. I would like to associate a person ...
0
votes
3answers
36 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. ...
1
vote
0answers
12 views

fast execution analitycs database with thousand rows to displaying in php [migrated]

i've table with a thousand rows and i want to creating analitycs with chart display my front end php my table structure is and how i display this data : by user_agent column i display operating ...
0
votes
1answer
23 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
90 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
55 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
28 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 ...
-2
votes
0answers
31 views

Entity-Relationship Modelling [closed]

WWLS staff consists of lawyers and secretaries. Lawyers work on cases, while secretaries provide assistance to lawyers , while some secretaries assist only one lawyer, some of them assist multiple ...
3
votes
2answers
52 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
20 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. ...
6
votes
3answers
192 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
190 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 ...
8
votes
3answers
136 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
58 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
30 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. ...
0
votes
0answers
23 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
49 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
73 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
39 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
42 views

mysql - suggestions for table design with huge number of columns

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
74 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
26 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
108 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 ...
0
votes
0answers
32 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
63 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
25 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
1answer
79 views
+50

User Privacy Settings DB Schema Design

On websites, like Facebook and Google+, you find settings (a.k.a. Privacy settings) which allow you to decide who is allowed to see what you share. How are such settings structured, or what is the ...
4
votes
1answer
186 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 ...
1
vote
0answers
39 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 ...
2
votes
0answers
11 views

Alternate in access database [migrated]

I want to check whether a row exists or not before inserting a new one in Access 2007. I have the following working query in SQL Server but I'm having trouble converting it to Access. update category ...