The logical model and/or physical design of a database.

learn more… | top users | synonyms (4)

0
votes
1answer
30 views

What is the most efficient way to merge topics of a forum or blog?

Lets say we have a topic table, and we want the ability to merge topics, such that all posts from x topics about the same thing will appear in one single topic( the oldest one). So, when someone ...
3
votes
2answers
55 views

What's the best way to diagram this “relation” looking for performance and|or disk space savings

I am working in a DB diagram and I have a table called cm_identifier_type. Each record of this table can have or not a downloadable file (saved a file path). I have identified two possibles ways to ...
-1
votes
1answer
48 views

Database design for timetable in mysql

I have to make a web application in java. The web application is like a online appointment book. Everyday of the week has 1 collum with times from 9.00am to 10.00pm (only full hours). So, i already ...
4
votes
1answer
53 views

Exchange rate table and conversion on the fly in query

I'm working on a small project and I'm have arrived to the point where I let a user chose in which currency to display items. I'm working with Java and my first thought was that I would use some kind ...
1
vote
2answers
53 views

Table design: how to store denormalized Excel data

I have following data stored in Excel which I would like to transfer to SQL DB. There will be a new value every year for every indicator. Indicator | 2001 | 2002 | 2003 ...
0
votes
1answer
36 views

Natural join question, I have the answer, but I don't know why it's correct. Help?

So I have a relatively simple database schema. I'm not sure why the where clause in the answer magically makes the dept_name duplication problem go away. I'm new to all this and I'm sure the ...
3
votes
1answer
52 views

Split Mysql Table internally

How to split the huge mysql table (size around 200GB) internally? Is there any mechanism other than partition? The table size is daily growing. Table created using innodb with indices. Thanks in ...
0
votes
1answer
23 views

Google datastore modeling help

I have a very simple requirement. I have an application where users log in, add/remove/view friends, and can send/receive (also view the message you sent and received) a message (message is more like ...
3
votes
2answers
72 views

Database normalization: Which is the best fit?

I have 3 different types of data set: Notification: start_date end_date notification_type country_id state_id Campaign: start_date end_date user_notification Transaction email ...
1
vote
0answers
14 views

Handling Login of SAAS application end users

I am designing a SAAS application with multi-tenant database per-user-per-database with unique sub-domain of subscribed users. The question arises when subscribed user of saas application add more ...
0
votes
0answers
15 views

Dealing with multiple user types, modules and requirements

I have the following database schema. Basically, it all comes down to this: - users can have multiple user types - some user types come with specific requirements for a complete profile - there are ...
0
votes
1answer
32 views

Database Design - I have a question regarding joining tables

Forgive me for my dumb question but I am new to Ruby on Rails and data design. We all have to start somewhere right? Well my question is that I want to build a database for a Truck driving company. It ...
4
votes
2answers
77 views

Represent time interval in mysql Database

How can represent a time in interval in mysql database in a way that I can index them later . For example: -------------------------------------------------------- id | name | ...
-1
votes
2answers
89 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 ...
3
votes
1answer
58 views

Entity Relationship Design; The best scenario

TLDR; What would be the best design choice for the scenario below and how would each design react at extremely large data volume? I have experience working with large government database systems ...
0
votes
0answers
36 views

Is this pattern named and how to normalize it?

I am given a data table : State ( StateId, StateNme, StateCounty1, Statecounty1Seat, StateCounty1Rep, StateCounty2, StateCounty2Seat, StateCounty2Rep, StateCounty3,...... ) ...
1
vote
0answers
35 views

database design for a filing system in educational website

i'm designing a database for a filing system in educational website. user can upload files ( files_table) user has a library (library_table) user can add a file to his/her library each library ...
0
votes
1answer
11 views

library data modeling

I'm going to implement a library system as a web application. And I decided to use this library schema. But there are some problems which I don't understand. The Books entity, is it possible to ...
3
votes
0answers
34 views

why some one will use approximate data types for sales

I was messing around with Kartris online shop and I was reading this definition for a product version(you have basic information of a product in one table and many versions of products wich can have ...
8
votes
3answers
136 views

How to avoid a cyclic dependency (circular reference) between 3 tables?

I have 3 tables: People Post Likes When I design the ER model it has a cyclic dependency: 1:N People --------< Post 1:N Post ----------< Likes 1:N People ...
0
votes
0answers
22 views

Help creating database schema to build database off

not sure if this is the right area for a question such as this but I am looking to create a database for an IS warehouse who deliver laptops, desktops, monitors and other peripherals to different ...
0
votes
0answers
22 views

When is it suitable to turn a table around [duplicate]

When I create tables to store data in, I have columns for each property of the model to store. IMHO this type of table design is easy to read and logical. Example below: uid | firstname | lastname | ...
4
votes
2answers
77 views

Where/how do I save extra data per column?

Next to the actual data I have in a table, I need to save some data about those fields. I'm hesitant to call it metadata, because while it is exactly that, metadata has a specific meaning within ...
1
vote
0answers
20 views

How to bucketize using Query optimal bucketization algorithm

I am trying to implement query optimal bucketization algorithm (QOB). The input of the algorithm is D=(V,F) where V is the value of the attribute and F is the frequency of occurrence. For EXAMPLE D ...
0
votes
1answer
36 views

Generate incrementing IDs without sequences

Suppose there's a multi-tenant application where users can create some kind of documents with basic structure like CREATE TABLE users (id SERIAL PRIMARY KEY, email TEXT); CREATE TABLE documents ( ...
3
votes
1answer
40 views

Seeking feedback on table relationships, general schema design

I'm designing a database for a business that sells tickets to a variety of events worldwide. The app will be built with Rails using PostgreSQL. Here's what I have so far, link to full size image ...
5
votes
2answers
460 views

Relation between first name and last name

I have some troubles understanding the relation between the a person's First name and Last name in a table. (In a Relational Model) I've read that the relation is of type: 1-1: They are linked ...
0
votes
1answer
23 views

Hibernate modelling a N:N Relationship

Lets say that we have two entities Entities: Bus (idBus*) Stop (idStop*,stopDescription) Where a Bus passes from many Stops and vice versa, therefore the cardinality is N:N. My ...
1
vote
0answers
39 views

Database for buses timetables

I have to design a database for buses timetables. Entities: Bus (idBus*) Stop (idStop*,stopDescription) Line (idLine*,lineDescription) Position (lat,lon) Some constraints are ...
1
vote
1answer
22 views

Google Datastore model User and Messages efficently

I have two kinds: USER and MESSAGES. A user can send/receive many messages to/from another user. Thinking in a relational way the relationship would suggest a user can have many messages, and a ...
1
vote
1answer
37 views

Apply Definition of MVD (multivalued dependency) to Example?

Supposedly this multivalued dependency (MVD) and this functional dependency (FD): {W} ↠ {N,D} and {W} → {N} hold in this table: V W N D ================= | v | w | n | 1 | ...
3
votes
1answer
36 views

Normalised database with one-to-one relationship

Is it bad practice to use a 1-1 relationship between two logically distinct tables: the user details and the user configuration settings? Each configuration record would have a single unique user ID, ...
0
votes
1answer
53 views

Schema design for products with multiple variants/attributes?

I'm using MySQL. The idea is similar to shopify with a different concept, so users are going to add their own products with multiple types of variants and attributes. From all the research I've done ...
2
votes
1answer
25 views

Turn off auto qualification of table names when creating a view

Problem Definition I am trying to modified a shared development database, for a dev team to use for application development/testing. Most of the collective work (table names, views, etc) are stored ...
1
vote
0answers
18 views

Is there a design model for tracking processes done to an item?

I am working on designing a database model that involves tracking processes almost like an assembly line. There is only one type of item (lets call it 'unit') that has about 10 different tasks done to ...
2
votes
1answer
47 views

Adding foreign key that references a column which is not Primary or Unique key

I got into trouble when I want to limit values of Table A's column to be taken only from a set of optional values in Table B's relevant column. Problem is table B's relevant column isn't a foreign ...
0
votes
0answers
50 views

Database schema for storing edits in the content [duplicate]

I want to store all the edits of a specific table. Multiple fields can be modified and for different users. I want to store all changes, taking in count that the number of fields that can be edited ...
1
vote
2answers
54 views

need better db design for project

I have two tables: notes users Notes Table: id || description ||CreatedBy(which is userid)||......other columns --------------------------------------- Users table: id || name || ......other ...
0
votes
1answer
63 views

MySQLSyntaxErrorException: You have an error in your SQL syntax;

This is the issue I am trying to fix since hours, almost a day. I am unable to get an understanding of what might be wrong. I have a SQL table notification I am trying to persist a java object ...
1
vote
2answers
45 views

Sql tables design

I have a table with two columns: Brand(varchar) | optional_os_type(varchar) for example: +--------------+ | Lenovo | 1 | | Dell | 2 | +--------------+ Whereas 1 = win8.1 2 = win10 Currently ...
0
votes
2answers
38 views

Optimal database structure for fast inserts

I am using MySQL Percona server. This table needs to do fast bulk inserts using 'INSERT INTO ... VALUES' for smaller requests (about 100k records) and using 'LOAD DATA INFILE' for larger (up to 10kk ...
3
votes
1answer
133 views

IS-A relationship with only single sub entity

Hi I'm trying to design a database for a dictionary. The words has several fields like meaning, an example, and maybe a picture. but the words that are 'verbs' has three more special fields that the ...
0
votes
0answers
23 views

ER and Precedence Diagrams

I've been having some difficulties creating a "Cruise Ship" database. Basically, what is known to me: Office has information about: Route (final destination/target) Ships Room Room's class (rank) ...
0
votes
2answers
52 views

standard solution for storing units of measure

Let us say I have a table that stores height of a person, something like this : PersonTable <ID, Name, Height> Height is measured in centimeters. My question is about storing unit of ...
1
vote
1answer
25 views

Collection of different types of data in a relational database

Let's say I have a table Cars (with columns such as model, make, year, etc.), a table Books (with columns such as name, author, ISBN, etc.) and a table Wines (with columns such as name, appellation, ...
0
votes
0answers
23 views

Data Model for a popular/basic type of social app

I am trying to learn about Google Datastore and creating a basic application to have some practical experience with it opposed to just reading the docs. I would like to create a basic social ...
5
votes
2answers
155 views

Dog Adoption Database Design

Apologies if this isn't the norm, but I am seeking advice for the database design for 'dog rescue/adoption'. I've done my normalization research and this is my first attempt at database design. Any ...
0
votes
0answers
60 views

“mysqld got signal 11” error

I have a MySQL 5.6.22 InnoDB database and just now, suddenly out of nowhere, when I try to start it up using /etc/init.d/mysqld start, I see this error in the error log and the server won't start up : ...
-2
votes
2answers
75 views

Random numeric string as a primary key - security, performance, efficiency?

I'm building an app aimed to store lots of records (millions) and trying to find a best way to store records identifiers that is publicly accessible from the web (record URL). I'd like to get: ...
1
vote
1answer
38 views

ERD modeling organization and roles

I am trying to model the following scenario: -I have multiple company bureaus. -Each Bureau has multiple offices -Each office has multiple divisions -Each Bureau has employees that only ...