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

0
votes
0answers
5 views

MySQL created_by or updated_last-by

I've been giving the task of taking SQL DDL from data modeler and to transcribe it into mySQL for an internship. The only thing I cannot figure out is how to take Created_By VARCHAR2(30) DEFAULT ...
1
vote
1answer
91 views

use of crows foot or chens notation to draw an extended ER diagram

I am trying to understand if we can use crows foot or chens notation to get an extended ER diagram. or does extended ER diagram has its own notations that should be used ? From what i understand, ...
0
votes
1answer
14 views

creating cache tables in database

I have a big database with sort of complicated relations between tables I have some common queries for retrieving data by joining several tables and I'm using view and stored procedure now . Would it ...
0
votes
0answers
6 views

What pivot tables to use for User Event Registration with Events and Sub Events

I need to design a database for an application to register and review attendees for events. But There is a complication I don't know how to deal with The event they can register for is for a month, ...
1
vote
1answer
25 views

Should I put common fields in each specific tables or one common table then join when data selecting?

Assuming there are a few categories: blog, video, gallery. Each of them contains post data like id, title, content, author, create_at, but different category have few more specific field: video will ...
1
vote
1answer
122 views

Calculating a running balance to store with transactions

I need to put a read-only copy of balance and transaction data from a legacy system, which will only be used to view/print statements. Balance | id | member_id | product_id | balance | | 1 | ...
1
vote
1answer
276 views

Should I save “document ID” as a String or Number in MongoDB

So I'm importing about a 100,000 documents into mondoDB. MongoDB already generates an Object hash but the data has a documentID that was used to identify records in the previous database. The IDs ...
0
votes
0answers
19 views

Can Graph Databases be used for an Availability and Scheduled Calendar based application?

Let's say you run a Barber Shop. You have 1 chair available and you want a Calendar to show up on your website that shows all the available time slots, so people can self book a hair cut. In my mind, ...
-4
votes
0answers
17 views

How do I convert the quantities exported into millions Single Strength Equivalent gallons (millions SSE Gallons) [on hold]

I am new here and I need expert help :-) I have a college assignment and I can't figure it out. I will copy and paste the problem along with 2 images. Thank you for your assistance: I am not sure if ...
-2
votes
0answers
27 views

Stock table Database Design [on hold]

I have to design a stock database of various products for different entities i.e. Distributor, Manager, Field Force. The Distributor allocates some products from his stock to manager and manager ...
2
votes
2answers
54 views

Is it ok to have 40+ columns in a table

I am currently re-designing some of DB's for a project. There is one DB in particular that is giving me a little of a headache. The idea is that for every client_id and date (client_id + date would be ...
1
vote
1answer
28 views

one table for all blob with a one to one table for metadata which link to one or many tables?

I'm going to start by saying that I'm not a DBA but i got that role in my current project so I'm doing my best. The application must be able to store files(attachments, official documents, etc) The ...
-1
votes
1answer
18 views

Advice books/courses about Architecture and constructing of a Database System [on hold]

Please, suggest any books/papers/courses about database systems architecture and development. How they work inside. Something like this Architecture of a Database System. Any works like famous ...
0
votes
0answers
14 views

How to design a demographics database?

I have a bunch of stores. Each store has the same properties (ethnicity, marital status, income, and so on). Each of those properties has subproperties like (white, black, asian for ethnicity and ...
7
votes
3answers
722 views

Should I separate frequently updated columns?

I have a users table that contains users' information and a column named credits that is frequently updated. On index page I'm showing list of users with basic user information but I don't need ...
1
vote
2answers
207 views

avoiding unique key collisions across tables

This might be related to the idea of data warehousing, but i'm not sure, though it is extreme theory. We have a table where records get written to first, let's call it tbl_recording which looks like: ...
3
votes
1answer
134 views

Combined or separated tables: File and Message?

Is this the best approach to design this table in the purpose of sharing the file online between my customer and I, or should I separate Message table and File table or combined them together? ...
1
vote
2answers
60 views

Managing constants changes to database

Here's the deal, I'm in charge of creating a website that will host small web apps. This apps will be photo contests, creatives sentences and other similar gibberish. The deal is, since apps we'll be ...
0
votes
1answer
17 views

Additional info on some rows in the table

I am trying to design an MS Access 2013 database to keep track of an inventory of items. All items have certain common properties, like name, date they were stored, location of the physical item, ...
2
votes
1answer
133 views

Peer Review of Database Design

I'm working on a movie inventory database. This is a personal side project for me. I can use what I have, but I would like to make it the best design that I can while learning more about databases and ...
12
votes
8answers
4k views

Professor told us to store serialized Java objects as blobs instead of defining relational tables

Instead of actually defining a tables with the correct attributes, my professor told us we could map objects to ids like this: id (int) | Serialized Object (blob) 1 10010110110 ...
-1
votes
0answers
9 views

Merge two databases, postgres [on hold]

I have two postgres databases, Consider the following situation: Database A: Table 1 Table 2 Table 3 Table 4 Table 5 Database B: Table 1 Table 2 I want to insert the same Table3, Table4, Table5 ...
1
vote
0answers
24 views

Trying to normalize a legacy database and get away from unusual XML validation

I have inherited a legacy database from around 2000 which uses XML in an unusual way to perform data validation. This database is intended to hold product data for an intricate product line when a ...
1
vote
1answer
55 views

Is it always bad to have an own table for value objects?

I know that value objects should be embedded in the table of the object they belong to but what if the value object is more than a simple object and contains many fields/columns or even sub-objects? ...
1
vote
0answers
15 views

reports on history table

Assume Trucks which travel between Cityies. I store the Cityies that a Truck has traveled to in TruckLocationHistory table, if the Truck is passing the City, State = Passed and if it gonna stays for ...
0
votes
1answer
38 views

Database Normal Form (financial statement)

I would like some advice on how to design the database for financial statement data which objectively addresses the tradeoffs between usability, performance, maintenance and adherence to normal form. ...
1
vote
1answer
173 views

Time series and gap filling

I have to choose a database server for storing big time series data. Currently I use PostgreSQL, but I've found that Vertica supports automatic gap filling for missing data and that's really nice. ...
8
votes
3answers
716 views

Why shouldn't I have one table for multiple relationships?

Assuming I have multiple relations in my database, for example Store, Employee and Sale, and I want to connect pairs with a simple binary relationship. Personally I would create tables named ...
1
vote
1answer
110 views

Proper implementation of child (derived) table PK/FK during single and multiple inheritance hard coded generalization physical data model

Below is an image of hard coded generalization UML logical model of entities. I'd like to implement these classes as tables in a physical data model. Two derived classes/entities (Class2 and ...
1
vote
1answer
82 views

representation in ms-access

I have a database in microsoft access. I want to know how to look up a singular datum from a reference table giving a dynamic set of values. Here is a representation of what I mean: I have the ...
2
votes
2answers
67 views

Associating on the ID of an association table

Sorry about the title, I couldn't find anything better. Suggestions are welcome. Say we have two tables, Suppliers and Products. The same product can come from many different suppliers, so we create ...
1
vote
2answers
27 views

Schema/Structure to handle secondary computed data

I'm trying to design a LAMP-based website for my pinball league, which plays competitive pinball every week in match play. One of the features of our league is that we convert raw scores to ...
1
vote
1answer
23 views

How to design tables for airbnb style booking system

all. My English is not very good, but I will try to describe my question as clear as possible. I want to design a airbnb(https://www.airbnb.com) style booking system, this kind of booking system ...
1
vote
1answer
30 views

Dependency preserving and lossless join decompositions

I have a relation: R = {A, B, C, D, E, F, G, H, I, J} And a set of functional dependencies: G = {AB -> C, A -> DE, B -> F, F -> GH, and D -> IJ} I ended up decomposing into two ...
0
votes
2answers
979 views

How to represent foreign key in an ER diagram?

Suppose I have a 'Transactions' table which has a column 'Customer ID' (Foreign Key) and a Customer Table having 'ID' (Primary key). How do I show the relation between the two tables and showing that ...
0
votes
1answer
32 views

schema for mysql database with 30million rows

We am building a SaaS backend for restaurants. We integrate directly with POS, so each POS keeps sending customer orders that we store in a following table in mysql. CREATE TABLE name ( `id` ...
-2
votes
0answers
21 views

Setting up a centrally based server repository (database) [closed]

I need to set up a centrally located database (server). I need to host it somewhere central so that it is accessible from all other locations of our organization. So that the data can be viewed and ...
0
votes
1answer
663 views

Storing multidimensional array in MongoDB

I am attempting to convert a large MySQL database of product information (dimensions, specifications, etc) to MongoDB for flexibility and to move away from the restriction of a column based table. I ...
3
votes
1answer
69 views

Normalized Data Store - Confused with prefixes to use

I'm designing a Staging+NDS+DDS Data Warehouse system, where an ETL is going to normalize data from [Staging] and load it into [NDS], which will hold all history. I've pretty much finished the T-SQL ...
2
votes
1answer
24 views

Database table to keep track of objects

I have a table called FoodMaker and another table called Settings. Every FoodMaker has multiple Settings. I also need a 3rd table to record what has been made, when and with what Settings. It might ...
0
votes
0answers
24 views

identifying the functional dependencies

I have been reading up on database design and I am having some difficulty constructing functional dependency diagrams from tables. I have the following table. Each salesperson is identified by a ...
2
votes
1answer
405 views

How to normalize my db schema for a quiz application?

I am putting together a quiz application. (I'm calling each quiz a "challenge") I have a "challenge" table and a "challenge_question" table which is pretty straightforward. challenge table: id ...
0
votes
1answer
125 views

Duplicate Relationships in Rails/MySQL Healthcare Application

Overview of the Application I am building a Ruby on Rails application to organize medications, using MySQL. The goal of this application is to provide dosage specific treatment recommendations, and ...
3
votes
3answers
204 views

Can't convert this type of ER diagram into SQL or relational tables

I have stumbled upon a problem during database design. Let me explain what it is all about: Contract has some simple attributes that describe him, and may have annexes and dynamics of payment. ...
0
votes
0answers
19 views

why this FD make 3NF?

Question like this: Consider the relation scheme ABCDEF satisfying the following functional dependencies: BC --> ADEF CD --> B E --> D BC is a key and designated as primary. Explain why the ...
0
votes
0answers
45 views

Table design for optimum performance

For example let's say I have to create a table called Employee with columns EmployeeID, Name, DOB, Address, DepartmentID[FK]. So I create the table as follows with a primary key and a nonclustered ...
1
vote
2answers
134 views

How to make a better Data model

I am creating a database system using MySQL for a group in my school (a University). I am new to MySQL and its usage.I have started with the data modelling process, since this process will be the main ...
0
votes
3answers
68 views

Autoincrement Primary Key For Constants

We are having an issue that is probably due to some poor design choice or lack of understanding of how to use primary keys. We have a simple constants table CREATE TABLE IF NOT EXISTS `constants` ( ...
0
votes
3answers
419 views

Rent weekly cost database design

I have a database which contains a table BUILDING with in each row details about some building, another table BUILDING_UNIT contains rows with details about a single building unit which refers with a ...
2
votes
0answers
31 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 ...