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

0
votes
0answers
2 views

Fill the 5th table with 3 other tables data in LibreOffice

So i have 5 tables primary key foreign key So: felh(felh_id, felh_nev) gepek(gepid, felh_id, gep_nev) lic(lic_id, lic_k, lic_l, lic_db, gep_id) pr(pr_id, pr_n, pr_vr, lic_id) haszn(haszn_id, ...
0
votes
0answers
8 views

Managing tables in database

I am new to web development field and particularly very poor at database management. I am developing a web application which resembles Project Management System where new companies can add their ...
0
votes
0answers
5 views

Datetime to string in pentaho DI

I have a date value in the text file and Pentaho identify it as a date format like this, '2015-06-30 00:00:02'. I want to get string output to new field like this , '20150630'. Ho can I do this in ...
2
votes
1answer
18 views

Have several rows, or one single row with a huge comma separated data?

I have many workers processes working at the same time. They grab an ID from a list called available_ids, work on that ID, and put that ID on a list, called used_ids. The list available_ids can have ...
1
vote
1answer
20 views

How to structure different types of a model in MySQL?

I am building an application where users can apply for small business loans. There are 4 types of loans (A,B,C,D). There are 10 commons questions no matter which type they choose, but then based on ...
3
votes
0answers
41 views

Efficiently storing sets of key-value pairs with wildly different keys

I inherited an application that associates many different types of activities with a site. There are roughly 100 different activity types, and each one has differing set of 3-10 fields. However, all ...
0
votes
0answers
11 views

Data Warehouse for reporting - 6 Dimension tables,or 1 table and 6 views?

Problem: I have been asked to add a Dimension table to our data warehouse and create the ETL tasks to populate it. Lets call the table "DimInternalFault". The source table for DimInternalFault is ...
0
votes
2answers
32 views

Where to place a foreign key column?

This isn't exactly related to modeling the database but rather about "standardizing" column placement. Where should I generally put my FK column? As the last column of the table? At the start just ...
1
vote
1answer
37 views

What is the best SQL Server field type to cast to when storing a UNC path stored in a sql_variant field?

What is the best choice of field type to cast to when storing a UNC path in a sql_variant in Microsoft SQL Server 2008? It appears that I could store up to 4000 characters according to Microsoft ...
2
votes
4answers
89 views

Are junction tables a good practice?

Say I have a large table that holds the user's info and another table that holds several locations. Then I use another table that holds the user_id and the location_id. In order to retrieve the data ...
4
votes
0answers
40 views

Is this a sane model for a network provisioning system?

I'm sketching out a model for a network setup, where I have the following conditions: 1. There are multiple nodes which contains a number of switches each. 2. Each switch has multiple services, which ...
4
votes
2answers
29 views

Snooping-safe Vote tables

I have a table with both user_id and vote. They are stored together so each user can only give one vote. However it's also problematic because admins can simply read who voted what. Is there a way to ...
3
votes
1answer
22 views

Single table or multiple table design when records have a clear distinction but are queried together?

Let's say I have the following types of recurring data (all types periodically come in). Post (Title, Summary, Text, Timestamp) Image (URL, Caption, Timestamp) Event (StartDate, EndDate, Title, ...
2
votes
2answers
45 views

Modeling invoices and orders

I have a problem in modeling a database that contains orders and invoices. Actually it's more of a problem from a business point of view, but it's related to modeling the database nonetheless. Model ...
3
votes
1answer
32 views

Modeling discounts - Product specific and Customer specific discounts

I have a reasonably simple database but have the following problem: I'm modeling a store + a lot of non-relevant stuff database. I have the following problem. I want to allow for specific products to ...
2
votes
0answers
15 views

Party Data Model / Universal Data Model Example

I am trying to implement Party Data Model / Universal Data Model in our application which needs to store different relationships between entities (People, Companies). Example of relationships: ...
2
votes
1answer
40 views

Database Table Design

I would like to ask couple of questions regarding my schema table design. I have the following data coming from an external database where I do not have any control over it. PROD_NO PROD_NAME ...
2
votes
1answer
20 views

Database design, many rows or many columns?

I am aware that this has been discussed before, but I've read conflicting information about this particular topic, so I'm hoping for a bit more decisive opinions from you. I have multiple tables, ...
-1
votes
0answers
19 views

A good DB Design

I want to design database where possible types of questions are Primary Question Set --> Secondary Question --> Question Primary Question Set --> Question Question. I short some question have ...
1
vote
0answers
36 views

Basic database relations [migrated]

I recently opened a travel agency and I need a database but don't have the money yet to have it done by a professional... A very basic thing will do until I can have it done better. We do ...
1
vote
0answers
19 views

Uninitialized values: ignore or set?

From the implementation point of view for a database, is it preferable to handle optional form fields by setting to some default value (e.g. false, 0, "", etc.) or just ignore such fields (do nothing ...
0
votes
2answers
19 views

How to decide when is use ERD or UML for data modeling?

A UML diagram can be used both to model database designs and class designs, but an ER diagram should be used exclusively in database problems. How do you pick one graphical representation over the ...
2
votes
0answers
42 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 ...
2
votes
1answer
33 views

table structure for events

Got a bit stuck, need a hand. I need to store events at the database, and events may happen at different location multiple locations at the same time so these are my tables CREATE TABLE ...
1
vote
3answers
76 views

Multi-table optimal database design

I'm a bit new to the database design. Thus this question to people who may have more experience. I need to design a database that needs to store statistical data for many systems. The data is ...
8
votes
2answers
200 views

Migrating from text and image to varchar(max) and varbinary(max)

I have a SQL Server database which contains a number of image and text columns, and I'm studying potential problems that might arise from migrating them to their non-deprecated counterparts ...
0
votes
2answers
33 views

Performance impact of adding a foreign key to a 1M rows table

I have an ecommerce database running MariaDB + InnoDB, which has a table to store the transactions (T) and another which stores quotes (Q). I'd like to make a connection between T and Q by adding a ...
0
votes
0answers
19 views

How to recover corrupted dbf file? [closed]

I have a VFP form that has the sct file corrupt. how can i solve this problem? I used foxpro in built software
0
votes
1answer
49 views

Can I somehow Improve the relationships between tables in the following sample?

I am currently developing a database for a school management system... There are tables for GRADE, SECTION and SHIFT... GRADE ==== id PRIMARY KEY SECTION ==== id PRIMARY KEY SHIFT ==== id PRIMARY ...
1
vote
1answer
41 views

SQL Server: Time Series Table Design

I am creating a time series database that follows the table structure here: Storing intervals of time with no overlaps. The difference with my design is that the FinishedAt column changes every time ...
0
votes
3answers
91 views

Is it better to use an ID (int) or a Name (varchar) as PK for a table? [closed]

Let's suppose I have an ORDERS_LINE table and a PRODUCT table and the ORDERS_LINE table must have the information of which product was ordered. I prefer to use a Primary Key based on the Name since it ...
4
votes
2answers
147 views

Conceptual ERD Multi-table many to many, or possibly recursive?

I'm creating a conceptual diagram [yes, I know I've included attributes and keys - but this is just for me to consolidate what I'm doing whilst learning] -- so please treat it as Conceptual with the ...
1
vote
1answer
16 views

should I change mysql platform for higher innodb_buffer_pool_size?

Currently Im running a 160G MySQL database on Xampp (Windows). But Xampp has upper limit for innodb buffer pool size of 4G. My computer has 16G RAM. So if I want to make full use of resources, should ...
-3
votes
1answer
53 views

How to organise huge mysql database for emails and search through it

I wanted to ask you for your opinion, what would be the ultimate and the best way to store million of emails and search on them, using MySQL. So first the product: You have tons of emails, which ...
2
votes
2answers
83 views

How to review Database schema?

I am green been software engineer, my team lead give me a task in PostgreSQL database, I need to determine the relationship of the all 405 tables, but the problem is the database doesn't have any ...
5
votes
1answer
128 views

Is it ever ok to not test a feature? [closed]

Is there any point at which you become so familiar with your language/database/system that there is no need to test a new feature/configuration/query/etc. by contained/simulated testing before ...
2
votes
1answer
49 views

DB Schema design : single table with more columns vs multiple tables with fewer colomns

What would be better DB design for a social network website. A single table with more columns and less rows or multiple table with fewer columns but more rows. For example: User can post an update on ...
0
votes
2answers
46 views

Multiple rows v/s multiple columns

My requirement is as follows: An app with internationalization support and starting with EN and FR versions of text. So, I have 2 approaches for data in the table: 1. One column for each language: ...
0
votes
2answers
53 views

Many tables v/s one table with different entities types

My requirement is as follows: App with internationalization and mobile v/s desktop app text support. So, I have came up with below columns in the table which I will certainly need: "CODE" ...
0
votes
1answer
16 views

Optional Relational Filters

Let's say I have the following design: Tables: video_games A list of all known video games video_game_modes A list of game modes for each video game. For example: Game = League of Legends Game ...
3
votes
2answers
77 views

Best design for a tree-like structure database

I'm designing a database in MS Access which is used for tracking the locations of a variety of chemical solutions, made in batches. Each batch can be split (aliquoted) practically indefinitely. That ...
0
votes
0answers
7 views

Setting up a many (messages) to one (user/group) polymorphic relationship in SQLAlchemy [migrated]

So far I have set up the following: class User(Base): __tablename__ = 'users' id = Column(Integer, primary_key=True) sent_messages = relationship("Message", backref="sender") ...
0
votes
0answers
17 views

Database structure for sport venue booking

I'm building a system that allows booking of slots to play games at any sport venue. Now, different sporting venues have different schedules. So I've thought of a plan that allows multiple venues to ...
1
vote
0answers
56 views

What is the best design for dynamic assignment of locations for variable sized grid boxes to occupy?

I want to build a database that will have limited single locations to put boxes. It's divided by lanes and bays. Imagine a 4x4 grid, totally 16 slots, every time I query the table, I want to return ...
3
votes
1answer
59 views

Design for scientific data. Data table with hundreds of columns or data table with a generic value column and hundreds of rows (EAV)?

I am trying to improve the data storage in biomedical science lab where I recently started working. The existing workflow is atrocious, involving many differently formatted Excel sheets that all get ...
0
votes
0answers
39 views

Design database schema for membership application with fees and purchases

My membership application needs to record payment of membership fee, card fee and misc. fee for each member. I also need to record purchases of each members and payments for the purchases.
-1
votes
0answers
11 views

How to hide DIV in paging [migrated]

I have an onclick button that removes all DIV a result. But it only removes the DIV's that are in the paging 1. The other results are in paging 2.3 ... etc are not removed. How to solve it? function ...
2
votes
0answers
42 views

Storing phone number in E.164

TLDR; If I store a phone number in MySQL(or any DB with equivalent constraints), would the correct format be E.164 values into a VARCHAR(32) field? Have been reading up on format/storage of ...
2
votes
1answer
156 views

Is this acceptable practice for a many to many?

As a newbie in database design i have a question about many-to-many relationship practice. This question is actually a follow up question of this question, but i found it to big to explain in a ...
1
vote
2answers
26 views

Trying to design database for eSports Teams - Issue with dependencies

I am trying to design a database in Access for an eSport league (specifically League of Legends North America). I will post what I have and then explain my issue. My issue comes when I try to ...