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)

0
votes
0answers
8 views

Developer privileges in a store scenario

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 ...
-2
votes
0answers
10 views

MONTHLY DATE FORMAT in Nateeza [on hold]

I HAD A DATE COLUMN WHICH IS IN FORMAT OF 20150101,20150103 AND SOO ON FOR ALL THE MONTHS AND YEARS. I NEED THE DATE COLUMN SHOULD BE 2015JAN,2015FAB WITH A SINGLE ROW , I DON'T TO SEE THE WHOLE ...
3
votes
3answers
54 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, ...
-4
votes
0answers
14 views

Database design: balance

How to solve this: 1.- A user belongs to a company 2.- Each company has a balance (money) 3.- Users sell, the balance decreases (the enterprise's balance) 4.- Users place money, the balance increases ...
6
votes
3answers
188 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 ...
2
votes
1answer
70 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 ...
1
vote
2answers
42 views

Database design - need someone to guide me

Im probably doing this wrong, but here it goes. Im trying to build something like very basic CRM. I know there are plenty of them, but I want something to learn actually. Requirements: Some ...
1
vote
1answer
128 views

Schema for yearly data models

I am developing a school management system. Most data will not be reused after the end of the school year. I am contemplating using schemas to separate data in various school years, however I am ...
0
votes
1answer
411 views

Pros and cons of using many schemas in PostgreSQL as opposed to just one?

For a large SAAS application (backed by PostgreSql 9.4), with over 300,000 accounts (and growing), what are the pros and cons of using a schema per account to partition the data vs putting all the ...
2
votes
2answers
75 views

How to model an activity feed

I'm having a hard time modeling an activity feed that should show events based on user roles. I'm using Postgresql 9.4. I have a projects table. Each project has many users through a memberships ...
3
votes
1answer
46 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 ...
0
votes
1answer
38 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 ...
3
votes
2answers
164 views
+250

Schema question

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 ...
0
votes
0answers
7 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 ...
0
votes
1answer
56 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 ...
2
votes
0answers
32 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 ...
11
votes
2answers
139 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 ...
2
votes
3answers
202 views

How to make a better Data model

I am creating a database system using MySQL for a group in my school (a University). I am new to MySQL and its usage.I have started with the data modelling process, since this process will be the main ...
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
37 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 ...
1
vote
1answer
416 views

CRM Address table and it relation

Hi I want to ask about I have this DBD for my CRM I am trying to have the addresss in one table(customer and Employee Address) and both customerID and Employee ID are guid I have in address table FK ...
2
votes
1answer
249 views

Rich text: VARCHAR, TEXT or BLOB in MySQL

Question: In my web application (php/MySQL) I will be saving rich text. This may be anything from a couple words to several pages length essay. I’m sure I could get away with using VARCHAR, TEXT or ...
4
votes
1answer
60 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 ...
0
votes
0answers
35 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 ...
1
vote
1answer
489 views

Multiple product attribute inventory database design

I have a database to build based on inventory for my shop. This is the current data that I have put into tables. This is the package: This is the product attribute: This is the table ...
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, ...
1
vote
3answers
54 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 ...
15
votes
2answers
26k views

Database model with users, roles and rights

I have a database model with a user table and role table. I want to control the access (rights) to up to 10 different elements. The access can be granted to either a role or a single user. Below is ...
2
votes
1answer
364 views

Database design for a table with both bulk insert and single row insert

I have to design a table where records will be inserted in two ways. Bulk insert from a batch process from a delimited text file between 2 - 3 million rows in a short burst. Later the same records ...
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 ...
7
votes
2answers
78 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 ...
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 ...
9
votes
5answers
49k views

Matching single column against multiple values without self-joining table in MySQL

We have a table that we use to store answers to questions. We need to be able to find users that have certain answers to particular questions. So, if our table consists of the following data: user_id ...
0
votes
1answer
105 views

Decompose table into third normal form

Tables X and Y are given as below : X (A, B, D, E, F, G, H, J) with A and B as primary key Y (K, L, M, N, O, P, Q, R) with K and L as primary key Now we need to decompose these tables into tables ...
3
votes
1answer
66 views

Can jsonb do fast search by *value* or even a partial value? Other types?

I have a person table where arbitrary data must be inserted. Since I'm using Postgres 9.4, jsonb appears to be the right choice. Example data: id: 1, name: "Joe Doe", preferences: { color: "red" , ...
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
51 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 ...
8
votes
3answers
134 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 | ...
28
votes
6answers
24k views

In what data type should I store an email address in database?

I understand that an 254 character email address is valid, but implementations I have researched tend to use a varchar(60) to varchar(80) or equivalent. For example: this SQL Server recommendation ...
-3
votes
0answers
20 views

duplicates of part.num to be summed and add another column called user [closed]

There are 3 columns part num, Qty and MO. Each MO has part numbers.So there might be same part numbers in MO's. Each part num has qty. So, if I group by part num, I get Qty. 1.There are duplicates of ...
1
vote
1answer
19 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. ...
3
votes
1answer
147 views

How do completely empty columns in a large table affect performance?

I have 400 million rows in a Postgres db, and the table has 18 columns: id serial NOT NULL, a integer, b integer, c integer, d smallint, e timestamp without time zone, f smallint, g timestamp without ...
4
votes
1answer
57 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
21 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 ...
1
vote
1answer
99 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 ...
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 ...