Questions tagged [database-design]

The development of the conceptual schema and/or the logical model and/or the physical settings of a database.

934 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
720 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) ...
2
votes
0answers
235 views

Database sharding, denormalization and synchronization

In sharding, it is advisable to follow a share nothing, shard everything approach. Essentially, this translates to: data that are to be used together are to be stored together (i.e. in a single shard)....
2
votes
0answers
51 views

How To Manage Random Data Without Repitition?

We have a database design problem of a Learning System. Please can somebody help us ? These are the requirements : A person can register for a module which has "n" number of questions. The person ...
2
votes
0answers
810 views

How to store data where various subcategories have specific columns?

I'm new to database designing. I'll use MySQL and PHP. I'm designing a database in which I have a lot of categories and subcategories like given below: Product Table p_id p_title category_id ...
2
votes
0answers
249 views

Automatically set table name prefix according to other field in PowerDesigner

I'm working with PowerDesigner 16.5 and I have a PDM generated out of its corresponding LDM. The table names are inherited from the LDM and I'm fine with them, but I would like to generate the DDL ...
2
votes
1answer
516 views

Reorganizing a subject area in ERwin

I have a data model in ERwin (r7) that has about 1000 tables in it. I'm right now in the process of splitting it up into various different subject areas to make it a bit more manageable. Here's the ...
2
votes
0answers
703 views

Database Design: Include Question Answer and Comment tables into Post table

I'm designing a database. This system has question, answer and comment. Question has some type of questions. In each type, there some differences so they're have some difference fields. Answer and ...
2
votes
0answers
290 views

Improving performance of a weighted search query in SQLite3

For an intra-site search I have this table in an SQLite3 database, that relates ids to search terms with a certain weight: CREATE TABLE search_index ( id INTEGER(7) REFERENCES other_table, ...
2
votes
0answers
2k views

Storing table history - is this a good use case for Postgres's table partitioning / inheritance?

I currently have a products table which stores product information (title, description, tags, manufacturer, etc.) for a website. I would like to store historical information of changes to this table -...
2
votes
2answers
56 views

Advantage of exposing data model to customers using our product

We have a product through which we provide a standard definition to customer's asset data. The problem currently lies in importing customer's data from different types of data sources to our data ...
2
votes
0answers
294 views

Is the table in 3NF?

I am creating a relational database - a library management system. I want to show an example where I normalize the data from 2NF to 3NF. My example of 2NF looks like The definition of third normal ...
2
votes
0answers
59 views

Filegroup design for Document Table for BLOB Storage

I have a table for storing documents as VARBINARY types in my database (I'm not using filestream). My database is setup with only one data file, but I am wondering if there is a benefit to creating a ...
2
votes
0answers
1k views

Finding missing_index_details in MySQL

MS SQL Server apparently can tell you what indexes would be useful for your query. Is there anything similar in MySQL? This article (scroll to "Find missing indexes") says that in Microsoft SQL ...
2
votes
0answers
118 views

How to query against legacy data that needs to be cleaned up?

I have an existing SQL Server DB with 3 tables (note: this is a made up example, but modelled after a real problem). Artists : contains music artists MusicRecords : contains information on music ...
2
votes
0answers
286 views

Covering Index - Insert Performance

We are running some performance tuning on our database in SQL Server. The database in itself is pretty small with around 13 tables. But there are multi-level relationships between tables. When I try ...
2
votes
0answers
102 views

With SSD's and in memory tables, does a snowflake schema become preferred over a star?

With SSD's being very fast (reducing the overhead of joins), while more expensive (increasing the cost of redundancy due to de-normalization), along-with a focus on in memory tables (again reducing ...
2
votes
0answers
1k views

Identifying functional dependencies

I'm having trouble understanding the logic in use for identifying functional dependancies. Looking at the sample relation below, I understand fd1 - fd3. But when I look at fd4 and fd5, its logic ...
2
votes
0answers
301 views

“Replicate” Table structures with sp_addscriptexec

In our customers environment is a massive central server (running SQL Server Enterprise 2008R2) and some distributed PCs (running SQL Server Standard 2008R2). The central server has a replication for ...
2
votes
0answers
70 views

Constrain referenced rows to two different tables to belong to the same row in another table

Apologies for the potentially confusing question title. I struggled to make it generic! I am designing a wildlife recording database. An observer goes to a site and records the occurences of species ...
2
votes
0answers
368 views

Proper design of routes in Database MySQL

I'am trying to find out the best database design and try to stick with data integrity by using Foreign Keys. But I'm stuck right at the beginning because of limit relations between tables with FK to 1....
2
votes
0answers
2k views

How to generate data for News Feed efficiently like facebook , googleplus , twitter e.t.c?

I have created table as post ( post_id int(15) auto_increment primary key , user_id int(11) , post_text varchar(2000) , post_type int(1), ...
2
votes
0answers
141 views

Should I use SQL Azure to store product descriptions and links to images in Azure Blob

For an html/Css/JQuery public Azure website to be coded using Zurb Foundation html5 responsive framework, I'd like to use SQL Azure (web edition) to store product descriptions and links to images that ...
2
votes
0answers
48 views

A better model for connecting users to different objects, even efter they cease to exist

I've got the privilege to create a small in-house application for managing TODO-lists, although I am not really a developer (I know some PHP and SQL, and got a chance to prove myself). As my ...
2
votes
1answer
75 views

Keys of a relation

I got relation: R = { (ABCDEF) , (A B F -> C, B C -> F, F -> A, F -> B, D E -> E, E -> D)} keys of this relation are: {BCE}, {EF} But I don't get it... why? Why not only {EF}.. it got less ...
2
votes
0answers
679 views

Problem with Database for survey Questionnaires

Bellow I am showing a sample survey question for woman. I need your help to creating a Database. Description: Top part of the survey Questions are Project Code, Name... etc which is understandable. ...
2
votes
0answers
2k views

which role-permission database design?

I want to manage roles and permissions. Most of designs on web look like this tables: Users Roles UserRoles Permissions RolePermissions Here, what is permissions? I am thinking for such a design ...
2
votes
0answers
410 views

Two different ON DELETE paths, how do I need to change the schema?

For a project in school I'm designing a website that sells items via auctions. Think eBay, but on the complexity scale of school project. We went through the process of making an ER Diagram and ...
2
votes
0answers
207 views

Digital asset management

I'm working in a company that currently develops Media Asset Management system and now we want to improve our system for document files. I have to search nearly thousand .doc and .pdf files and index ...
2
votes
0answers
5k views

Schema for an RBAC (Role-based Access Control System)

I want to implement an RBAC, Flat based. I've decided to base my system on the NIST standardization model. Although all fine and well, I have an inclusion to that design. Instead of a hierarchy ...
2
votes
0answers
808 views

How do I auto-fill data in Microsoft Access 2003?

I am creating a Purchase Order Form at work using Microsoft Access 2003 so that it can be saved and archived in a database and reduce paper costs. These are my current dilemmas: I am unable to ...
2
votes
2answers
71 views

How To Add Days And Time For Instructor Schedule

Problem I need to make a database design (ERD) to display a schedule for every instructor, including the following: day of course (e.g. Saturday or Monday) time it will give course (period from 12 ...
2
votes
1answer
2k views

Contact system database design

I'm designing a database for contacts and I'm looking for some feedback on the current design. What I want: A contact can be a person or an organization. A contact can have many groups. A contact ...
1
vote
1answer
18 views

Its necessary to relate the ComplaintMessages entity with the User and Admin entities or is enough to relate with the Complaint entity? (ER Model)

I'm in doubt in the ER model of a scenario where a user can make complaints. The user enters the title and the description of the complaint and submits the info. A site admin can see all user ...
1
vote
0answers
17 views

An efficient database design for recording complex contact/configurator form

I know it's a quite generic question and probably opinionated. I don't know where to ask. Maybe you could point me to the right direction. Currently I have a very big 'configurator', 10 steps long, ...
1
vote
1answer
20 views

DB Design - Assigning users to multiple sites with different roles

I am working on a DB design that lets me manage roles and permissions for each user per site. These are my business rules: A user can manage multiple sites A user can only have one role per site A ...
1
vote
1answer
28 views

Mongo Cluster sharded replica cluster design question

I have 5 old servers, each with single socket CPU, 4 physical cores(8 logical) and 128GB of RAM. I am getting started with mongoDB and plan to deploy MongoDB 4.2.2 on my 5 servers for a lab ...
1
vote
0answers
28 views

Schema design for an entity with 'heterogeneous' status types

Consider a notification system which gets some event data and list of business email addresses as input (the list is basically computed by looking at which users/addresses are subscribed to which type ...
1
vote
0answers
26 views

Vote based approval system in DBMS

I try to create a system to auto approve proposed posts by popular vote. I am currently evaluating what portions of this I can do within the DBMS and if it is sensible. I use PostgreSQL and I can go ...
1
vote
0answers
29 views

Parent child relation with One to One

We have a table called Contracts which has a lot of columns. Some columns are for employees, some columns are for managers, some columns are for locals and so on. Since the table is growing, that's ...
1
vote
0answers
17 views

Modeling a system with optional components

I am working on an MS Access database that is intended to help keep track of a large scale implementation of many component parts connected together. I have created a working implementation based on ...
1
vote
0answers
37 views

Database Design Strategy Help

Thanks for reading this. I’ve completely overthought this so I’m hoping to get some feedback. I have a customer table (custID, statusID), a notes table (custID, noteID), an action table (custID, ...
1
vote
1answer
31 views

Database Model for Various Type of Sensors

I am planning to build a database that will store sensor value for various type of sensors in a factory building. Is there any best practice on how to do this? - Option 1 : should I integrate all ...
1
vote
1answer
66 views

Finding all possible minimal covers

I have a relation schema R = {A, B, C} and the following functional dependencies: A → B A → C B → A B → C C → A C → B How many different minimal covers can I derive from this relation schema? I have ...
1
vote
0answers
76 views

Schema for social network using the supertype/subtype pattern

Scenario I'm trying to come up with a schema for a kind-of social network app, where users can publish Posts (and photos inside Posts), and also manage a private Diary that has also Posts (not sure ...
1
vote
0answers
49 views

Creating a time-series database for a power plant scenario

Considerations I need to create timeseries tables in a SQL database, which will hold data about power generated by a power plant. I need four columns there: ( power_plant_id int FK, ...
1
vote
1answer
35 views

UUID as primary key and download ID

I'm designing a Django Rest Framework API with PostgreSQL. In the database I'll be recording information about documents which can be requested for download. I want the request to include a unique id, ...
1
vote
0answers
52 views

Combine sales data without knowing the number of sold units per one sale

I’d like to consult for a strategy plan of a database structure for the following scenario: My app is for offices buildings sales reports where a building is the basic unit that I need to generate ...
1
vote
0answers
57 views

ER Relationship Total and Partial Participation Example

I am trying to understand partial and total participation. Given the statement: "Each restaurant must have one or more dishes and each dish must be provided by exact one restaurant." The below ...
1
vote
0answers
68 views

Is EAV a good choice for scenario when the number of fields may differ client to client?

Suppose that you are developing an application that could be used by multiple clients. You have to store "basic details" of an employee of a company (your client) into your database. The first 15 ...
1
vote
0answers
44 views

Linguistic corpus design: order elements of different types

I'm trying to design a database for a linguistic corpus search engine. Basically there is a manuscript which contains several songs, and every song in turn contains stanzas and proses. Since stanzas (...