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
47 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
70 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
97 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
85 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
112 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
149 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
64 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
73 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
668 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
66 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
143 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
235 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
191 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
98 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
106 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
329 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
313 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
180 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
195 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
405 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
137 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
115 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
137 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
153 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
90 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
146 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
105 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
197 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
205 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
163 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
55 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
100 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 ...
1
vote
1answer
275 views

mysql session logging tables

I've been building a session logging system for our sites. We get around ~15m hits a year and at the moment we're really only interested in stats about people who logon to our sites. Our table ...
1
vote
2answers
113 views

How to store massive quantities of machine generated data?

I am tasked with developing a system that stores massive quantities of machine generated data (syslogs) from a number of server farms and I am wondering what tools you fine folks use such instances. ...
1
vote
1answer
500 views

ORDER BY on aggregate field on a closure table giving unexpected results

I am updating my companies product database and I'm looking into different ways to do design our faceted navigation "selector" tables. The idea of faceted navigation might look like this: It's ...
1
vote
1answer
94 views

What is the best relationship model for high performance?

I want to model a relationship between Customer and Transaction. However, because Customer is only described by a unique string and no extra info, I have two possibilities to implement it in the ...
1
vote
2answers
174 views

For a boolean settings table, should I toggle a flag, or insert/delete?

I have a settings table. SETTINGS -------- settingId int settingName varchar(20) Each user can choose to apply the settings, or not. The interface allows them to quickly toggle the settings on ...
1
vote
1answer
1k views

Planning simple CMS: How much relation?

I'm currently in the process of designing the database for a rather minimalistic Content Management System I'm working on alone. It should allow scalability while remaining speed, especially on boxes ...
1
vote
1answer
1k views

MYSQL Social Networking website - Database Design, Data Growth and Hardware

Introduction I have a system around one million users (community based). It has around 6000 groups (fixed , no change). But there is no discussion board for these groups yet. Building discussion ...
1
vote
2answers
200 views

Can graph databases be easily distributed?

I have never worked with graph databases such as neo4j, I would like to know if they support easily replication and clustered distribution as well as key-values databases, or if there inherent ...
1
vote
1answer
1k views

How to design a table for storing news items?

I have a script that can get result from news websites and it will run every hour. The php script will get the title and content. The things I want to store in MySQL are: title content ...