Questions tagged [database-design]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
122 views

Storing dates and their history of changes and emailing - Does my database design pose any problems?

Background I'm designing some tables to allow dates to be assigned to an object so progress can be tracked on that object, along with functionality to store emails sent pertaining to these contracts ...
1
vote
0answers
12 views

How is this E-R diagram of an identifying relationship's mapping cardinality correct?

According to textbook Database System Concepts,"The identifying relationship is many-to-one from the weak entity set to the identifying entity set, and the participation of the weak entity set in ...
0
votes
0answers
30 views

Look Up Table for View, or Relation

Setup I designed a database scheme which purpose it is to act as a foundation for testing a System under Test (SUT) which weren't testable by automated test on default (have no Oracle and are ...
0
votes
1answer
12 views

Scaling out MySQL & Redundancy-Speed tradeoff?

I'm building an e-commerce service for a group of sellers. They have a common HQ who manufactures their product. Tables: order (id, seller_id, timestamp) order_products (order_id, product_id, ...
0
votes
0answers
28 views

Best way to “superset” combine many disparate schemas for database table creation?

I have a bunch of data that consists of public records from the state government dating back to the early 90s. Along the way, the data organization and attributes have changed significantly. I put ...
0
votes
0answers
14 views

Schema Design for a food delivery database SKU variants

I'm using MySQL. The idea is similar to Ubereats so vendors can add their food SKUs with multiple types of variants and attributes. (e.g. bolognese pasta has regular and large regular drink (only ...
1
vote
1answer
81 views

How can I better model the relationships in this project?

I'm developing an internal tool (as an intern). We deal with a lot of hardware, which is all custom and managers have a hard time knowing who is developing on what machine. The three main things to ...
0
votes
1answer
425 views

Database schema for timesheet app?

I am very new to database managements as I am enrolled in my first class involving databases at university. For my project, I have to create an app that clocks employees in an out and keeps track of ...
1
vote
0answers
14 views

Resolving a double many-to-many relationship

I have the following database design between entities. A Student can belong to many Departments and a Department has many Students. A specific Department has many Courses and one Course can be at ...
2
votes
0answers
29 views

Database Design for Pharmacy store with wholesale and retial

I have designed a DB ( Inventory Management ) for Pharmacy Store which will sell medicine both wholesale and retail. I store each units with its conversion for medicine in a separate fields for ...
1
vote
1answer
81 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 ...
23
votes
12answers
7k views

Why are constraints applied in the database rather than the code?

Why are constraint applied in Database? Will it not be more flexible to put it in the code? I'm reading a beginners book on implementing databases, so I'm asking this as a beginner. Let's say I have ...
41
votes
5answers
45k views

Can I add a unique constraint that ignores existing violations?

I have a table which currently has duplicate values in a column. I cannot remove these erroneous duplicates but I would like to prevent additional non-unique values from being added. Can I create a ...
0
votes
0answers
7 views

Is it better to omit associative tables in displaying many to many relationship

Let's say I have 2 entities Student and Class with many to many relationships. Usually, in the textbook, it is recommended that we create another associative table (maybe called Enrollment) to convert ...
1
vote
2answers
120 views

Mandatory and non mandatory attributes for products

I am trying to come up with a simple way of implementing the following design, but I always end up with something overly complicated. I am trying to design a database where companies can store ...
0
votes
1answer
24 views

Unable to create view with temp table

Hi I am working on one project and want to create a view. I am using temp table in my query. can any one let me know how we can create such view ? Following is my query, I tried using WITH..AS , but ...
2
votes
1answer
87 views

How should I select a primary key in my use case

I have an app wherein I want to give offers to certain devices which fall in range of IMEI numbers (I have a separate algo to calculate this range). So I want to create a structure in which I have a ...
0
votes
1answer
104 views

database design - psychometric testing layout

Good Afternoon, I'm working on the table layout for a SQL database that will store individual and test information. This includes individual identifying information like Name, medical id, date of ...
0
votes
0answers
26 views

Where to store cash book debit in double entry bookkeeping relational database?

I'm designing a very basic banking system, where Users can Deposit to Bank / Withdraw from Bank / Transfer to other user accounts. I've been studying double entry bookkeeping and so far my database ...
0
votes
1answer
20 views

Need advice on combining tables or leaving as separate tables

I tried to find a related question similar to mine, but couldn't. I apologize if this is a repeat. I have an odd situation and just need advice. I have a company calendar that shows events as well as ...
-2
votes
0answers
13 views

Oracle Database Dev. asked me for huge RAM [duplicate]

I have no idea what is oracle database and how its work but I am system admin and the Development department asked me to create 2 Linux server with 32 CPU and 100 GB RAM for each server and make it ...
0
votes
0answers
11 views

Schema for Game Transcript Translations

I am working on site to allow users to view video game dialogue from Japanese games. The idea is to have a way to display the original Japanese text with an English translation. Pretty much in the ...
-4
votes
1answer
35 views

What are the best practice to design social network with a lot of reports and data mining [closed]

Lets assume that I'm creating a social network like instagram or facebook with petabytes of data and my needs are: 1: High availability 2: Data mining and NLP (basically anything related with AI) 3: ...
4
votes
1answer
146 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, with a total of 16 slots, and every time I query the tables, I ...
0
votes
0answers
18 views

What is the best way to make a one to many relationship between tables without redundancy?

I can purchase a monitor, a bookstand, and a table lamp for a single shipping fee of $20. But the problem arises when I want to specifically breakdown the shipping fees that each item incurred. ...
0
votes
0answers
9 views

Design review for movie recommendation app [closed]

I'm a front-end engineer moving to full-stack and learning about databases! Starting a movie-recommendation side project, would like to get your review on the following design if there are better ways ...
1
vote
1answer
21 views

How to structure a listings table [duplicate]

Say I have a table called listing and it has the following columns: id | name | description | price | created_date| 0 | iPhone | A phone | 1000 | 7/4/2020 | Since I want to track when a ...
1
vote
2answers
320 views

How to represent the relationship between artists and albums in an entity-relationship diagram

I'm learning and practicing with the E-R model trying to design a music industry database. With this section of the diagram I have a doubt: I suppose an album can be had by an artist and a band, not ...
0
votes
0answers
34 views

Good DB design for my system?

I'm creating a system as college's mini project, in which I've two levels of admins. The level-0 admin is a single user which will add/manages both users and level-1 admins. Can you suggest me good ...
7
votes
4answers
9k views

Are there any free online collaboration database schema tools? [closed]

I am interested in a free and simple MySQL tool which can offer online collaboration functionality in creating database general schema. Do you know any?
2
votes
1answer
161 views

Database design - Members & companies represented by members

I'm struggling in database design problem and it seems I can't get it out properly. I need some help on this. Maybe it's a dumb case but I'd like to validate or correct my scheme and then go ahead. ...
0
votes
1answer
16 views

Database Design For reporting comparison results

I'm going to design an table architecture. Here I wanted to compare same data coming from different sources say Source_A and Source_B. I have to compare few attributes and identify Mismatches Data ...
0
votes
1answer
27 views

Is “many database writes” an anti-pattern?

I am designing a database api. I have two options: Have a complex aggregation that queries the data as desired or, Create a materialized view that logs all data changes in an easy to query manner and ...
38
votes
3answers
23k views

What is the optimal data type for an MD5 field?

We are designing a system that is known to be read-heavy (on the order of tens of thousands of reads per minute). There is a table names that serves as a sort of central registry. Each row has a ...
1
vote
1answer
84 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 ...
0
votes
1answer
117 views

Table Relationships for Property Bags Configuration

I am creating a database table setup for user preferences in my application based partially on this design and while I created the tables and foreign keys, I can't seem to figure out the relationships ...
0
votes
1answer
85 views

Warehouse storage system (FIFO by BBD and date)

I have inventory table. CREATE TABLE inventory ( InventoryID int(11) unsigned PRIMARY KEY AUTO_INCREMENT, InventoryDate datetime, Quantity decimal(15,4), BBD date NULL, ItemID int(11) unsigned ...
0
votes
1answer
27 views

How to design a table structure for customer and providers? [closed]

The schema is showing a product distribution model from provider to customer. The circles are small providers. Rectangles are main store providers. Small providers ships proudcts to main providers. ...
-4
votes
0answers
9 views

Datatable Which is Already Fill from Database add new Record from textbox value on click [closed]

@model Desai.Model.Bill_Master @{ ViewBag.Title = "Bill Details"; if (Session["Date"].ToString() != DateTime.Now.Date.ToString()) { Response.Redirect("~/Login/Index"); } }...
1
vote
1answer
84 views

Database structure for a large amount of data with different types

Can I ask you for give me tips how to design efficient database to store large amounts of data with different types. I would like to use SQL Server 2016 as the database management system. I have to ...
0
votes
0answers
33 views

Adding a new table to a database - are my dependencies off?

So I'm adding some functionality to an existing table for a system I'm working on. It has a few foreign key relationships and it follows the snowflake design, please see below. I've censored out the ...
1
vote
1answer
28 views

Optimal mySQL design for 500k+ products with up to 50 specs

I facing a problem where I have to design a MySQL database capable of containing +500k products in approx. 1.500 categories, that can hold up to 50 specs. (like size, weight, speed, color, etc). My ...
0
votes
0answers
21 views

DB design for single Dependent table column to multiple Primary table

I have a scenario where records in the dependant table(say History) are created by two entities, one User and other Application. For which my purposed design is User ----------------- UserId (PK) ...
0
votes
2answers
83 views

Mysql replication with c

I have huge database on MySql and It's become more and more huge. So, Now I am facing performance issues with my database. Some of tables has millions of records in it. like my login detail table ...
4
votes
2answers
90 views

Best db setup to accomplish yes/no list of clients for daily calls

I will preface this by saying I am a relative novice to Access but I have managed to develop some basic databases. I have some working knowledge of expressions and macros but VBA is still a bit of a ...
0
votes
1answer
87 views

MySQL database design for Twitter-like timeline

I am working on an application which requires to show different posts on user's timeline(something like Twitter). A User's timeline consists of following: Reports which user created Reports which ...
2
votes
3answers
5k views

Database design for attendance feature

My app has a requirement wherin we need to capture attendance details of a class. A class typically has 50-60 students and there will be records with attendance/absense status of each student for a ...
0
votes
1answer
20 views

Home sensors database - optimising model

I am trying to develop a home automation/monitoring system. This involves a bunch of sensors distributed around the house/garden/garage. I'd like to store the values for the sensor readings. I am ...
0
votes
2answers
83 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. ...
0
votes
1answer
34 views

Most efficient table structure for multi-tenant database

I have a conventional relational database (mySQL) with several entities stored in their own table. Three examples are images, events and organisations. We are making a change to the way our site works ...

1
2 3 4 5
106