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)

1
vote
1answer
24 views

Relying on expected data

I'm relatively new to Database Design and I wanted to know the disadvantages to a particular decision I have made in the design of a database for a project. I don't think it will have an effect on the ...
1
vote
1answer
36 views

pass data from deleted table to another

This is the situation: I have a table, with name TABLE_1 I would like delete TABLE_1 and then create another table with the same name and some of its columns. TABLE_1 has records, but I need to pass ...
1
vote
1answer
88 views

Update new column with value from old columns for all the rows

I've got an odd db design in place that was here when I got on my new work space. We have a column named params which contains some string data which appears that it belongs in more than one column, ...
1
vote
1answer
29 views

Understanding how relationship sides works

So, I have this relations on my tables (see image) and I need to understand some things. I'll enumerate what I understand and what I need from yours is to say if I'm right or not and in case I'm not ...
1
vote
1answer
127 views

What is a good/healthy mysql query execution time?

What is a good/healthy mysql query execution time? To my calculations: The site gets 1000 unique visitors per hr 10 page view for each unique visitor 5 minutes for each unique visitor ...
1
vote
1answer
58 views

Documenting a collection of databases and their relationships with each other

As part of a project I'm currently involved with we need to identify where various data points are held within existing systems, with a view to integrating them into our central integration engine. ...
1
vote
1answer
166 views

Horizontal schema vs Vertical schema

I am but a modest SQL DBA. I would like to request your advice on the design of the central part of our new proposed database. Brent Ozar had something to say about this: Building A SQL table ...
1
vote
2answers
51 views

Is there a reason to store currency amounts as fractions instead of decimals?

I've been reviewing GnuCash's DB design and I found that they are storing amounts as two 64-bit integers, the numerator and denominator of a fraction. Is there some advantage from a DB perspective to ...
1
vote
2answers
47 views

Keywords - column or separate table

I am building a website on MySQL with php, and I have 400+ products in a table. I have three columns with comma separated values, each has 1-3 values separated by commas in each row. I was wondering ...
1
vote
1answer
56 views

How to represent a many to many relationship with Crow Feet diagram

I'm designing a database and I want to represent the relationship between users and groups: A user can be on zero or more groups. A group can have one or more users. Using Microsoft Visio 2013 I've ...
1
vote
1answer
73 views

What is the advantages of using auto_increment in database as primary key over set of attributes?

I have table as CREATE TABLE circle ( circle_id int(11) auto_increment primary key not null, user_id int (11) not null, title varchar(255) collate utf8_general_ci not null ); CREATE ...
1
vote
1answer
104 views

database design for dynamic menu bar [closed]

I am trying to create a menu bar which will load dynamically on user log in, based on the user roles. Say if the user is an admin he can see all the items listed under the header and if a user is a ...
1
vote
1answer
87 views

Is this design in 3NF? Why to choose another design not in 3NF

Having the following entities: Objects, Parts, Subparts and Items, and given the following design restrictions: A Part belongs to one and only one Object. A Subpart belongs to one and only one Part. ...
1
vote
1answer
118 views

data warehouse design help

I'm struggling with the design phase for a data warehouse. It's not the traditional sales example you find on MSDN or all books etc. I've been tasked with creating an education data warehouse, that ...
1
vote
1answer
65 views

Modeling a db that has products: What are the good practices/solutions? How to treat grammar variations in the words?

The problem is: A Company belongs to a sector. A Company produces products. A Sector contains products. A Product belongs to sectors. Three entities: Company, Sector and Product. And it's a ...
1
vote
2answers
169 views

Implementing voting system like reddit/StackExchange?

In creating an application that would require a voting system similar to that of StackExchange or reddit, I want to know how the database tables should optimally be structured. So far, I have ...
1
vote
1answer
66 views

Database Over Normalized [closed]

How can you tell when a database is over normalized? Example: I have a database for employee. These are the following tables involved: User - contains email, password, companyId Profile - ...
1
vote
1answer
76 views

3 way junction table and redundant value

I was constructing a conceptual design for database in relational model until I stumbled upon some issue. My progress so far is: Asset Type Table +---------------+-----------------+ | asset_type_id ...
1
vote
6answers
753 views

Efficiently storing irregular/repeating intervals (think calendar/events)

I am developing a service that relies on users being able to recieve messages that they themselves choose. These messages need to be stored somewhere before they are send for processing. Right now ...
1
vote
1answer
67 views

Will a specific denormalization increase performance in a specific scenario?

Suppose I have a table with fields | a | b | c | d | ... | z | which contains millions of records and which will serve millions of queries a day. And the field z holds the id of some parameter which ...
1
vote
2answers
109 views

Does this medical database look correct?

I'm pretty new to databases and I'm trying to create some schemas. I've been working away at this one for a while, but I can't help feeling that it doesn't look right. Essentially I have the ...
1
vote
2answers
148 views

Can somebody help me normalise this database/check my workings

I am new to database design/normalisation and functional dependencies. I have started a new database class in school this week and we have been given a worksheet that requires the following: This is ...
1
vote
4answers
267 views

How to handle table design with variable columns

I have a table design scenario and as a non-DBA type, would like opinions on which is more scaleable. Say you are asked to record information on houses for a metro area, starting with a small ...
1
vote
1answer
205 views

Can Anyone please review my database after I did the Normalization ?.Any suggestion is appreciated

User: User_ID,user_name,E-mail Staff: User_ID,Fname,Lname,DOB Student: User_ID fname Lname DOB Lecture: User_ID Admin: User_ID Position ID : P_ID,ROLE_NAME, Staff_position ...
1
vote
1answer
102 views

design database for electrical meter data?

Hi just wondering how to I have .csv "Time 'datetime' Voltage 'double'"file that record Voltage usage from electrical meter each every minutes and database to record the data just want to normalize ...
1
vote
1answer
107 views

How does this database design look?

This is my first official design after having read a coursebook in preparation for the upcoming semester. The goal is to have a user-based form creation/publication and submission web application. ...
1
vote
1answer
60 views

Accessing MySQL Database

I am designing a database for an application, which will be accessed by different front end programming languages, such as php, asp.net, android applications and iphone applications. I am confused, ...
1
vote
2answers
376 views

Foreign key constraint based on conditional column

I'm trying to figure out the best way to handle this situation: I have a table set up as follows: LEARNING CONTEXT ================ LearningContextID - INT - Surrogate Primary Key EntityID ...
1
vote
1answer
330 views

Add a column contains a photo

I installed PostgreSQL 9.1 under Ubuntu 12.10 And now I have a table called property I want to add a field that can be used to store photo(link to the photo or import a photo into a column?) But I ...
1
vote
2answers
193 views

Database scheme for product tracking

I'm in the progress of creating a separate login for users who want to track specific product shippings. So I got the tables: Products (Id, Name, Color, Description, ...) Used for storing the ...
1
vote
1answer
196 views

User Table Design

I am designing for an ecommerce application, I need to know how to implement the following task. There are 2 options, Unregistered Users (Free Listing). Registered Users. In this the unregistered ...
1
vote
1answer
442 views

How do I resolve issue with deleted table in SQL Server Database Diagrams?

I am working on a database design using the SQL Server Database Diagram tool. I created a table with the name dbo.Example and before defining any columns, attempted to save. Got an error that SQL ...
1
vote
1answer
149 views

Model Likes / Dislikes in SQL

I'm trying to implement a behaviour similar to Facebook (okay, most similar to YouTube). In my table I got various Products, each Product can be liked or disliked by a Customer. I don't want to let ...
1
vote
2answers
117 views

Two possibilities of primary key

I have a table: all_info, where it holds the users identification. This id can be of two types (just one or another, never both), suppose: int and varchar, but one table can't have two primary keys, ...
1
vote
2answers
142 views

Splitting up tables with similar structures since they contain unrelated data? (huge numbers)

Is my reasoning correct in splitting up tables with similar structures since they contain unrelated data? I'll explain the situation with an example : Suppose there is a server which hosts an online ...
1
vote
2answers
110 views

Relations, dependencies and normal form

I have some issues in understanding about relations and dependencies. I will show two examples and what I want to know: Assume the relation GTX {G,T,X} with the following dependencies: G,X -> T ...
1
vote
1answer
67 views

Query for View with unique entries from Database with repeated entries

I have a table with columns of Hotel names, city name and country name (of the respective hotels). I need to create a view of unique entries which will contain city name and country name columns. Any ...
1
vote
1answer
161 views

Storing different countries' administrative divisions

I'm designing a data base which should relate users to their administrative division for statistical purposes, considering that every country has its own type of divisions. Chile, for example, is ...
1
vote
1answer
91 views

How to “swap” out production tables

I have a MySQL table that holds a few thousand records which go out of date very quickly. A few times a day we run a slow process which needs to pull data from multiple sources and re-populate the ...
1
vote
3answers
147 views

Help with modeling this table

Thanks for reading my post...I'm new at setting up databases and am working on a simple practice app. I have a table called PhoneNumbers, which hold a list of phone numbers (duh). I have two other ...
1
vote
2answers
106 views

database design- diagrams

I'm trying to derive an Entity Relation diagram from a class diagram. In the class diagram, I have a class Player with one to many relationship to another class Payment. In Payment there is no ...
1
vote
1answer
204 views

Database Relational Design for Multiple Categories

I am building a database for participants who are grouped into studies. There's a total of 5 different studies - A, B, C, D, and E. The participants may be in more than one studies, and participants ...
1
vote
1answer
112 views

Public Database for Mobile Application

What are the proper steps to hosting a public database. Currently I a building a mobile application with Adobe Flash Builder. I have used Microsoft SQL Server, My SQL as well as WAMP Server. All of ...
1
vote
2answers
247 views

Use single table with foreign key or two twin tables for text entries?

I have a table answers that has several columns including the content iself such as ID | q_id | list_id | user_module_id | content | updated_timestamp The content column is a varchar since we want ...
1
vote
2answers
209 views

Extensible Asset Database Schema

Background I work for a decent sized company in the hardware sector. Currently, we have a number of varying assets that need to be tracked. Until recently, this was done by hand as was an ...
1
vote
1answer
166 views

table design to track significant events associated with an item

An Orders table I'm dealing with at present in design phase has about 10 or more columns. Each OrderID in the Orders table will have certain significant events or milestones. The number of Orders ...
1
vote
3answers
2k views

Best practices for history/temporal tables?

Suppose I have an object, with certain fields which I want to track history, and certain fields which I do not want to track history. From a normalization perspective, is the following schema alright: ...
1
vote
1answer
56 views

Correct data model for users with clients

I have an application where users are granted access. Part of the system allows users to have their own 'clients'. I have a users table ******************************** users ...
1
vote
5answers
5k views

Coding an accounting database from scratch?

My new medical practice is picking up fast and my homemade Libreoffice Calc spreadsheet is quickly becoming cumbersome to track patient visits, accounts receivable, overhead reconciliation, etc. Most ...
1
vote
1answer
101 views

Topics and posts represented by one table or two?

I'm currently building a forum component for a larger application and I'm considering different approaches to certain parts of the database schema. In particular, I am considering representing topics ...