Questions tagged [database-design]

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

918 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
-1
votes
1answer
586 views

document and edges in orientdb

I was playing around with OrientDB lately and was create some classes and edges. I was able to create edges between documents, is this something that is expected from OrientDB when edges are ...
-1
votes
1answer
94 views

GROUP BY parentId and MAX childId

My tables are below: crm_conversions crm_messages_of_conversions crm_receivers_of_messages I want to get all of conversions of an user with only last message. I'm trying to get with the query: ...
-1
votes
1answer
304 views

Lookup tables and performance

I am using 6 lookup tables in my mysql database. There will be frequent insert,update and delete queries in the db. Will that badly affect the performance. Do I need to save the data as it is without ...
-1
votes
1answer
2k views

Calculating employee's work time

I need to store and analyze employee's work time. Currently, I've developed this table structure CREATE TABLE `hirefire` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `employeeid` int(10) ...
-1
votes
2answers
1k views

How to snapshot or version a relational database when data changes?

My system receives data feeds. Each data feed will end up creating inserts and/or updates to most tables in the (relational) database. I need to capture the snapshot of what the entire database ...
-1
votes
1answer
86 views

When, if ever, is it justified to break normalization rules and replicate a field for efficiency?

Suppose I have two simple models, Sentences and Mentionss, where each Mention is a reference to a mention of a in a Sentence. Let's say they have the following normalized schema: CREATE TABLE ...
-1
votes
3answers
3k views

How to delete millions of records from table

I am using postgree 9.4 database and I have a table snapshots with 700+ million rows and I want to delete about 9 million rows. I have tried different queries to delete records, but no success. Query ...
-2
votes
0answers
35 views

e-Cinema Ticket Reservation ERD

Here is my entity-relationship diagram for an online ticket reservation system. Can someone give a review that improves this diagram?
-2
votes
1answer
73 views

About Foreign Keys that is not a primary to other tables

I'm clearly new into database implementation and I'm having doubts about my keys. I have about 5 tables namely: User, Profile, Client, Stylist and also Posts sirs. I have a certain foreign key named ...
-2
votes
1answer
240 views

Database design for a timesheet app?

I'm designing the database schema for a time tracking application and I need a little piece of advice. The application must permit the user: To enter for each day of the week the amount of time he ...
-2
votes
1answer
36 views

Designing a table with multiple null FKs

Let’s suppose that I have a table Student and a table Professor. I would like to add a 3rd table Evaluation that holds evaluations both for Students and Professors. Would it be considered a bad ...
-2
votes
1answer
141 views

Which scenario fits for multiple payment method/gateway?

I have a web app that will support multiple payment method/gateway such as pay via PayPal, Credit Card, Debit Card, and more. Which scenario that probably fit for this case ? 1 Scenario I only ...
-2
votes
1answer
95 views

How can I design a database for different products(with different attribute) as well as we should keep in mind future new products requirement?

my question is very similar to question ,But i don't want to use EAV design Rigth now ,we have these products in our store Harddisk ->size(GB) ,speed ,price Shirt -> size(M-L-S) ,color ,price Book ...
-2
votes
2answers
42 views

Schema - Track statuses in database

I am a bit struggling with this one: Table name = "Issue" with Columns Id Name OpenedBy OpenedAt ClosedBy ClosedAt PaidBy PaidAt RefundedBy RefundedAt AssignedTo AssignedAt UnassignedBy UnassignedAt ...
-2
votes
1answer
1k views

Design database for tournaments

I'm looking around since few days on how should I build my database to support full flexible tournaments. Let me explain my specs. As a user I want to : Create a tournament Let other users register ...
-3
votes
2answers
93 views

Make a relation of these four tables

Can anyone help me out making a relation of these four tables? It's easy to see but it's hard to make a relation table. Here's the layout of my SQL structure: It's my task to guess the relation of ...
-3
votes
1answer
100 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 ...
-4
votes
1answer
3k views

How to Create a Trigger in SQL Server to Update Cascade When @@RowCount > 1?

I Have 2 Table Table1 | column name | type | |-------------+-------------| | ID1 | Int | | Name | NVARCHAR(50)| Table2 | column name | type | |-------------...