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)

4
votes
2answers
1k views

Ready-to-Use Database models example

Where can I find ready-to-use database models ? I don't need a database with data in it, but only schemas (UML diagrams). Perhaps something like the data models at this link, but much more complex ...
15
votes
5answers
249 views

Enforcing database integrity

Would this ever make sense to have application enforce the database integrity instead of having foreign keys, check constraints, etc? How much of a performance improvement one can expect for not ...
1
vote
1answer
159 views

Tick boxes and Dropdown

Have a look at the image below: This is "Plain Buger" item - customer can select sauces and extras with it. There are different sizes for Plain Burger. I need to translate this UI into database ...
3
votes
2answers
1k views

Having a unique ID for 2 different tables

We would like to use two different tables, one will hold an object when it is 'Active', and the other will hold the object once it becomes'Non-Active'. The ID is therefore unique per both tables ...
0
votes
1answer
424 views

Some Ideas In Database Design

I am creating a site where users can sell their products(let say a little version of eBay, just assumption). Concerning the database design am a little bit stuck and looking for some ideas how it is ...
1
vote
1answer
203 views

Do you feel like DBA/DBD Is a “secure Field” still? [closed]

I noticed recently alot of Database jobs/Development have kind been pushed onto general developers, not to mention with NoSQL Solutions (Which IMO are probably a little easier for Non-DBA's to throw ...
-1
votes
2answers
685 views

Multiple child tables

I would like to know what is the best solution for making a parent table with multiple children? I have to make multiple children table. One for each profile. Is there a better idea than having 3 ...
4
votes
1answer
57 views

Want to add a “variable” to a table

I'm using PostgreSQL 8.4 and I have a table that is cleared out and refilled with new data every so often. I want to be able to store the date that the table was last filled, but I'm not sure where to ...
15
votes
2answers
365 views

Is it more secure to go through a 3rd database to connect two databases using the same login?

We have the following setup: Multiple production database containing private data which is used by desktop software A web database for a public website which needs some data from the private ...
2
votes
3answers
372 views

Express union which is dependent on other results

I would like to make a union of two tables that are actually in a hierarchical constellation. How would I write that in relational algebra? Say table A is the parent of B in a 1:n relationship. ...
2
votes
1answer
439 views

Design problem with auto-increment fields

I've made this design similar to my problem, it's not exact but it close enough to understand my problem: http://i42.tinypic.com/bhbp5.jpg Some cellular client frequently send their GPS position and ...
9
votes
2answers
1k views

What are the penalties of using many (thousands) of column families or keyspaces in Cassandra?

I am in the process of evaluating the best design for our Cassandra installation. There is not so much information out there on the Internet about using the first two levels of access that Cassandra ...
4
votes
1answer
2k views

What is a basic model for making a database with users and groups?

I'm trying to find the best way for a basic security system for a website. I know I want users and groups. I thought I'd have: user_table user_id user_name ... group_type group_id group_name ...
1
vote
1answer
503 views

SSAS Modelling - many to many with one dimension

I'm having bit of a hard time modelling an OLAP cube. My analogy is this: I have a list of students. Each one has one Major subject of study, and zero or more minors, up to five in total. The raw ...
9
votes
6answers
5k views

Splitting Tables in MySQL. Good practice?

I have started working on an existing project and the previous developer had split up a table into 10 separate tables with identical schemas but different data. The tables look like this: ...
1
vote
1answer
64 views

Reading and writing the common data

I have a couple tables and application service that intensively inserts, updates its. From the other hand some client application have to read data using those tables. Sometimes client application ...
9
votes
2answers
404 views

How many Sproc Parameters is too many?

I've just started writing a Stored Procedure in SQL Server 2008 and have 30+ parameters. I've never written one with more than ~10 parameters, and that got me thinking... At what point are there too ...
2
votes
2answers
5k views

Questionnaire database design - which way is better?

I have ONE long html page, several sets of questions divided into small sections (approx. 15 sub-sections in one page), the total of questions are about 100 questions: varies from input, multiple ...
0
votes
1answer
134 views

Help me to better design my query so I can gain more performance

I need to find so called first entry in database for items regarding their partners. I wrote query and it is giving me correct results but it sucks with performances. I suspect that I have missed ...
1
vote
1answer
306 views

ERDs: How do you indicate mutually-exclusive encounters?

If you have a character_instance and character entity in an ERD for a video game, and you want to indicate that something happens when a character entity encounters a character_instance entity, how do ...
3
votes
2answers
518 views

Database Modelling of Type, Subtype Relation

I'm trying to model the type and subtype relationship described here. The best approach I could come up with would look like this: CREATE TABLE Card_Types ( card_type varchar(12) PRIMARY KEY ...
6
votes
2answers
233 views

Design: How do you decide when items are related vs when they are attributes?

I've been trying to figure this out for a while. Let's say you have a person, for example. An attribute of a person is his or her social security number, right? But a person also has a social ...
2
votes
2answers
733 views

Database normalization: Describing trait - foreign key to table, or varchar field with value?

My colleagues and I are having a discussion about the normalization of descriptive traits in the database, such as "status" or "type". Let's call the central table of the discussion "Order". In my ...
7
votes
1answer
318 views

Could Stack Overflow run on SQL Server Web Edition?

I am starting a new web venture that may need to scale to a high number of users. I am confident with the SPLA licencing for SQL Server Web edition, but want to know if I will need to factor in ...
2
votes
2answers
169 views

design of maintenance database

Lets say i am designing a database that tracks maintenance of equipment. Each piece of equipment has various fields that usually don't change eg. ID, model, serial number etc. Some fields change ...
0
votes
1answer
308 views

Implementing Pub/Sub initiated from the database

I have a number of state-full Windows Services that currently poll the database looking for new or changed records in specific Tables and/or Views. For obvious reasons this limits scalability and is ...
3
votes
1answer
1k views

ERD via Chen's notation: How do I organize multiple 'last done' entries?

I'm having an issue creating a little practice ERD. I'm trying to do some more difficult stuff, and I'm not sure what the standard way to organize it is. Basically, I don't know which of these is ...
3
votes
1answer
2k views

Storing XML in varchar(MAX) or use SQL-XML

I am defining a schema for a new set of resources using SQL Server 2008... In this case, each record (e.g. row) will need to store XML fragments. From time-to-time; although not frequently; I'll need ...
10
votes
2answers
395 views

Decision criteria on when to use a non-dbo schema vs a new Database

I'm mostly an application developer but find myself having to do all the up-front database work for my current project (btw... its MS SQL Server 2008). As a first decision, I'm trying to figure out ...
0
votes
2answers
79 views

Advice on choosing a primary key

I will have to do this process in EXCEL first before it is made into a database. I will have many files, but there is about 7 - 9 files that work all together as one e.g. X192AD1-test.docx ...
2
votes
2answers
88 views

Is it safe to use “Safety” as a schema name?

I was considering using "Safety" as a new schema name in SQL Server. In SSMS, the term Safety is colored as a keyword, but this term is not listed as a reserved keyword in the BOL. The database does ...
3
votes
2answers
2k views

MySQL: Storing unique URLs

I am creating a table wich will contain user-provided URLs. I want those to be unique, so when the user gives me a URL I will first check if the URL exists and if so return the ID for the entry. If ...
2
votes
1answer
138 views

How to make a table with fields that are other tables in MySQL?

I am making a music library system with php in MySQL. In this system there would be a table named Songs. Since many songs can be by the same Artist (Person), I wanted to store a table of Person that ...
2
votes
1answer
125 views

Combined or seperated 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? Should I seperate Message table and File table or combined them together? Combined ...
7
votes
5answers
1k views

Best way to document database mappings for migrations

I'm working on a project that includes mapping database elements for a migration and I wanted to know what tools others were using to do this? Excel is a very flexible way to document simple ...
3
votes
2answers
1k views

Separate tables or partition one huge table?

I'm building a rather large table that includes a particular column, my_column. There are a small-ish number of possible values for my_column, and each unique value of my_column should have the same ...
2
votes
1answer
186 views

Is dimensional modelling useful for modelling tables of calculations?

I have a set of tables that look a bit like this: Key 1 | Key 2 | Key 3 | Var 1 | Var 2 | Var 3 | ... | Var 200 ------------------------------------------------------------- X | Y | Z | ...
4
votes
1answer
389 views

Would appreciate some suggestions on how I should model this data

I am setting up a website that will have users. Users can search for songs and (if signed in) save them to a playlist or their library of songs. I want it to be like iTunes in that all the songs on ...
3
votes
2answers
1k views

What is the right time to use an ENUM versus a normalized types table in MySQL? [duplicate]

Possible Duplicate: Advantages and Disadvantages to using ENUM vs Integer types? Considering MySQL only... I'm curious to know what the community thinks the proper use-case for an ENUM ...
2
votes
3answers
733 views

View Design Best Practices

When designing a view, would it be best to retrieve the ID fields where FK relationships exist between the joined tables the desired description field obtained through the FK id relationship both? ...
2
votes
1answer
280 views

determining user types upon authentication

I've got 3 different types of users (entities) that will log into a website in developing for a client. "FITTER", "CLIENT", "ADMIN" the first method I came up with was this. CLIENT TABLE | ...
4
votes
4answers
310 views

DB Optimization with 2 to the power of N - Approach clarification

This is a request for analysis and better performance approaches, one of my colleague has come up with an approach in optimizing the DB and it looks very impressive too. Can someone please let us know ...
1
vote
3answers
124 views

If A is next to B, how to automatically assert that B is next to A

I am working in Access 2010. Let's say I have a database that tracks where packages sit in a warehouse. Table: Packages PackageID (PK) PackageHeight PackageWidth PackageWeight PackageOwner (etc) ...
1
vote
1answer
263 views

Conditional one to many queries in mysql

I have a simple patients table and lots of Lab tests table. Every patient can have many Lab tests. What i want to do is to only query the tests which are already entered for that specific patient and ...
0
votes
3answers
454 views

SQL Server : primary keys advice to my whitepaper needed

I've tired to explain to every new junior developer in our r&d team why he should use Primary Keys and how to do that. So I decided to write small whitepaper, which every new developer should ...
1
vote
2answers
525 views

database normalization 2nf, 3nf

I am doing homework about database normalization. I have to decompose the table into 3nf form showing the steps here is the initial table: ...
2
votes
1answer
571 views

Separate Schemas by Industry or by Application functionality?

I currently have a small retail/Point of Sale and an Education application running as on-premise custom solutions for different customers. I am planning to rewrite the app and host as a SaaS/web ...
3
votes
1answer
3k views

Rows with a variable number of columns?

I'm trying to design a database for a program that is storing and manipulating tweets off of Twitter. I'm using code to fragment a tweet into words, usernames, and hashtags, so I'm meeting ...
10
votes
2answers
964 views

Schema-less/flexible + ACID Database?

I am looking at rewriting a VB based on-premise (locally installed) application (invoicing+inventory) as a web based Clojure application for small enterprise customers. I am intending this to be ...
1
vote
1answer
95 views

keeping database columns consistent with documentation

For a project, the client wanted to be able to add fields to any item and have them be searchable. To make them searchable, that would require the fields to take a column, but that would make the ...