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
10 views

create table from another table

I have master categories table like this category_id category_name parent_name parent_id 1 animals & pet supplies null 0 2 ...
0
votes
1answer
7 views

best way to store tags

I'm a university student building a web application for a project with three collegues , I took the database portion. Our site is basically a link sharing site and supports tags, what is an efficient ...
0
votes
0answers
26 views

Decompose table into third normal form

Tables X and Y are given as below : X (A, B, D, E, F, G, H, J) with A and B as primary key Y (K, L, M, N, O, P, Q, R) with K and L as primary key Now we need to decompose these tables into tables ...
1
vote
0answers
18 views

Best practices to segment people and attributes for advertising database

we have a database where we store people some attributes per person in the following tables: people (id, name, email, phone) people_attributes (id, person_id, attribute_name, attribute_value) ...
1
vote
1answer
13 views

Running Total: To store or compute

Say I have a product table with the following columns: product -------- product_id name And I have another table to record the transaction (IN/OUT) for each product product_transaction ...
0
votes
3answers
30 views

Unknown database file format .DAT

I am trying to find out the database name of this file. I opened it via hex editor: http://gyazo.com/5b579bd2ef9620aa833bf0743a480230 Any help is appreciated. Client sent me this file. It is very ...
0
votes
0answers
15 views

Nicely managed lookup tables [migrated]

We have a people table, each person has a gender defined by a gender_id to a genders table, | people | |-----------| | id | | name | | gender_id | | genders | |---------| | id | ...
1
vote
1answer
35 views

Which terms are used to refer a row in database?

I am creating a Java application, in which I want to create a class that will relate to a row in database. I decided to use Entity while naming the class with a prefix/suffix. But, This page says: ...
0
votes
1answer
38 views

Enhanced ER Model Supertype / Subtype modeling issue with inheritance and recursion

Before posting, I have looked for a good solution on internet and I have coined this post for 3 days in row and trying to think through it prior this post. So if I have missed something or got it ...
-2
votes
2answers
45 views

Databases Fundamentals [on hold]

I have tried to learn about SQl Server databases but most tutorials are general or SQL-focused. I'd like to have a solid understanding of the fundamentals of databases so I can build successful web ...
0
votes
2answers
23 views

How to build a table for a private messaging system that supports replies?

I'm writing a private messaging web application in PHP, the application allows replies such that when you view a message, you also get to see to what was that a reply to, and to what was that a reply ...
0
votes
0answers
16 views

How to segment account info and profile info?

I am putting a rough SQL database design together and have gotten stuck on how to segment information about the users. (Note before I get into anything, stored passwords are salted and hashed, I just ...
1
vote
0answers
14 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 ...
0
votes
0answers
11 views

Multilingual Article/ Category database design

I wasn't getting any answers over at Programmers and was advised to go over here instead... I wanted to make a design for a multilingual database and after having drawn it up have arrived at 5 ...
0
votes
1answer
20 views

Which table(s) design option is better for users and clients? [on hold]

Is it better to have CLIENT (an individual who purchased something) and USER (an individual with a login account) as: 1. single CLIENT table; 2. separate CLIENT and USER tables. Thank you for your ...
1
vote
0answers
23 views

design database with 2 simillar tables

I have a database which has product_sell and product_buy tables, these two tables are different in a few fields and each one has own comment table product_sell >---< product_sell_cmt ...
0
votes
0answers
22 views

Data-Duplication Vs Data Normalization. Better DB model?

I've 2 tables as follow:- Table UserProfile:- id name age gender phone city state country fb email and UserPoints Table having the following fields user_id activity_date app_point redeem_point ...
1
vote
1answer
44 views

Name for intermediate aggregated data [on hold]

We have raw data and aggregated data as well as sometimes multiple levels of aggregation between. Is there a name for the data in that intermediate "state" of aggregation? Just like how we have Real ...
1
vote
1answer
39 views

Elegant Database Design

I'm trying to make "online Judge Environment"(like SPOJ). In which users have facility to see their past submissions for each question, their best code performance(like running time, if they succeed ...
0
votes
0answers
33 views

Forcing FK constraint to validated in system catalog

I have a big table (~60gigs, 35mill+ rows) that I need to add a FK to. Adding a FK directly to the table causes a validation which runs for about 30secs that I want avoid as it's a 30sec access ...
-2
votes
2answers
35 views

UPDATE() Function (Insert and Update Triggers)

Is there a way to have the column name dynamic in this function? For example, passing a parameter to a variable named @FldName = 'Name'. e.g. UPDATE(@FldName). Basically, what I want to do is to have ...
1
vote
1answer
24 views

Alternative approaches to “primary” record in child table

I have a database with a Customers table, and two child tables Addresses and Contacts, as customers often have multiple locations and contacts. However we also need a "primary address" and a "primary ...
2
votes
2answers
53 views

unusual relation, binary aspect

I have question very unusual for databases. I’m not a good English speaker, but good English reader :) so for explanation I’ll give you examples. Part1 In MySQL, I have two tables with relations ...
-1
votes
2answers
18 views

How can I create Data Base on phpMyAdmin?

I have a serious problem here. I am not able to create data bases as the option is not to be found on my phpMyAdmin, but it only shows 'No Privilege' in red font. I even tried to create data base ...
0
votes
0answers
3 views

SSMA not moving partition info from MySQL to MSSQL

I am trying to convert my existing database from MySQL5.x to MSSQL 2014. While all the table schemas gets ported from MySQL into MSSQL, table partition info are not being carried over. ...
0
votes
1answer
30 views

Ternary Relationship in ERD , What would the cardinalities look like in this situation?

I have 4 entities USER , COURSE , MODULE , TOPIC The Constraints go something like this. A Course contains one or more Modules and each Module contains one or more Topics Now, a User can study ...
0
votes
0answers
14 views

Data model for Object Versioning with Life Cycle Stages

I am looking for probable logical data model which will have the Object versioning capability like Version 1, Version 2 etc. and as well as Life cycle stages of each and every object. Please note that ...
1
vote
1answer
40 views

Database design import massive csv files is there a more efficient way?

I need to let users import huge csv files varied between 200k - 1.5m lines. For this I use LOAD DATA INFILE which is the fastest way to import those files. Thing is however that I can't check the user ...
0
votes
1answer
29 views

Big lists in a relational DB

I need to store a list of items and that list belongs to a single user. The lists are going to be huge, so this has to be done as efficiently as possible. The lists also have to be modifiable to a ...
0
votes
0answers
8 views

Dummy Objects vs. NULLs: optionality for three-way relationship

In a nutshell, I'm trying to model a relationship and can't decide whether to allow NULLs or to require values and use dummy objects (in place of NULL). Here are the details. I have three classes: ...
2
votes
0answers
11 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 ...
0
votes
3answers
64 views

What is the term for a “wide”, non-normalized view/query?

A well-designed relational DB schema tends to have a relatively large count of relatively small, normalized tables — a cluster of snowflakes, I think, describes the situation. In order to ...
1
vote
1answer
64 views

How to manage many-to-many relationships when there is also a hierarchy among the many?

I have these entities – employee, task, phase, project – and these relationships: project 1:m phase phase 1:m task employee m:m task, phase, project The first two relationships form a ...
2
votes
1answer
47 views

Scalable Relational Database Design

I'm designing a web application (using Django) for a client that will need a fairly large database behind it. I've never worked with databases that handle large amounts of data before so I'm hoping to ...
2
votes
1answer
18 views

Attribute-Attribute Dependency

So as part of our college project, I'm working on CENSUS Database. I stumbled upon a problem wherein if an individual is below the age of 18, his/her marital status should only allow 'NA' and anyone ...
0
votes
1answer
37 views

Need help on a database model design

I am creating a small booking application with Laravel. It lists some centers. Each center has its own unique rooms. Each room may be booked several times (with dates). From my application, I post the ...
-1
votes
0answers
18 views

schema for review site's images

A restaurant has a list of reviews. Each review can have upto N images. User can upload images only without writing a review for a restaurant. You can think of yelp, zomato or any similar review ...
0
votes
1answer
32 views

How should I store changes to items in the database?

I have items (tracked with itemid) that have attributes assigned to them (field1,field1 for example). At any given time, field1=val1, field2=val1, ..., fieldn=valn where val1,val1,...,valn = 1..100. ...
0
votes
1answer
25 views

Usage of non standardized queries

So this is more of a theory question than practical but I'd appreciate any help. My friend and I are doing a project to learn new stuff and have fun. He's a coder and I like to think that I'm good ...
1
vote
2answers
29 views

Schema to make a Payment History/Viewing History

On some websites I have seen two history of events: Payment History and View/Watched History. I want to have both payment and viewing histories in my app, but I got stuck when I started thinking ...
0
votes
0answers
25 views

Unique indexes on table with multiple columns

I have a table called organogram: SHOW CREATE TABLE organogram: CREATE TABLE `organogram` ( `organogram_id` int(11) NOT NULL AUTO_INCREMENT, `locatie_id` int(11) NOT NULL, `afdeling_id` int(11) ...
-1
votes
2answers
41 views

How to run multiple select statements in Data flow task in SSIS [closed]

I am migrating data from one database to another database using SSIS package and i need to write multiple select statements for same table depending on conditions as mentioned below. Actual Queries i ...
2
votes
1answer
45 views

In SQL Server would misc pages be pushed out when an object grows within a mixed extent?

In SQL Server 2008-2012, objects (including tables) are first put in a mixed extent. An extent can accommodate up to 8 pages and accommodates more than one type of page (meaning: pages from more than ...
-2
votes
1answer
40 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 ...
0
votes
1answer
17 views

sub and sub-sub item organization system [duplicate]

So I am looking to find the best database design for the following situation. I will refer to my entities as 'articles' as that would best/most-easily describe them. So the articles have already ...
0
votes
1answer
33 views

Make 3 separate tables, or 1 combined table for similar data?

When designing a database's structure, if we have multiple tables with similar data, should these tables be combined, with an added ENUM field to denote the table type; or should 3 separate tables be ...
0
votes
0answers
26 views

Database design trouble for survey application

I'm having trouble figuring out how to design database tables. I'm going to have a table employees which has the employees' information such as names, age, email, etc. It is going to be an ...
1
vote
1answer
19 views

Drill Down Functionality for Data Entry in Database

I am building a database that houses financial statement data. Within the database and to maintain the relational model and data integrity the fields are standardized. However, I do not want to lose ...
0
votes
0answers
15 views

Two id columns in one detail table

Let's I have two tables(I have removed some columns for brevity): ADULTS -> ID CHILDS -> ID And I have one table which includes detials about these persons like that: USERS-> ADULT_ID, ...
-2
votes
1answer
52 views

how many database tables is too much?

I'm working on a project for a school and so far I have 91 tables! Everything is linked to the student table, is it normal to have this many tables in one database? or do i need to make multiple ...