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

Database design problem: where to put UNIQUE constraint

I have the following three tables: Form ----------- formId INTEGER PK name NVARCHAR(50) NOT NULL Block ----------- blockId INTEGER PK name NVARCHAR(30) NOT NULL ...
1
vote
2answers
734 views

Which is better for long term database scalability: adding columns or having key/value store

For application, which has few (5-10) settings at the moment but will have a lot more (up to 100) in the future which would be better approach: to add new columns to settings table every time new ...
2
votes
1answer
602 views

How to design database for tree view with an infinite depth

I am trying to combine C# and SQL2005 for an application which need to have tree view control. One of user requests is to that tree view can user friendly grow into infinite dept of child nodes. That ...
2
votes
2answers
2k views

Looking for example design of using an SQL database as a queue for throttling web service requests of multiple users

I'm designing a system for multiple users to queue their requests to a web service which takes requests such as creating new entries, changing entries, requesting data. Many of the web service calls ...
0
votes
1answer
240 views

Write Access Client App for SQL Server 2005 Backend [closed]

I'm writing an inventory/payroll system, and I'm storing all the records on a remote server running SQL Server 2005 on Windows Server 2008 R2. I was wondering how I could start writing forms(very ...
0
votes
2answers
588 views

schema analyzer tool

I am currently using TOAD to connect to the database. I have around 20 tables that I have been asked to analyze ( I am new to project ). I think the first place to start is to understand the relation ...
3
votes
2answers
3k views

What are the limitations of Toad for SQL Server freeware? [closed]

I just downloaded the freeware version of Toad for SQL Server. Toad's download site says: "the Freeware edition has certain limitations, and is not intended to be used as a TRIAL for the Commercial ...
15
votes
4answers
983 views

Database design: how to handle the “archive” problem?

I'm pretty sure a lot of applications, critical applications, banks and so on do this on a daily basis. The idea behind all that is: all the rows must have a history all links must stay coherent it ...
0
votes
1answer
580 views

How do you query supertypes to get subtype data?

I'm a bit of a DBA newbie here (coming from a programming background having to fill the role of a DBA), so please excuse by blantant and somewhat basic ignorance. Using a simple relationship between ...
1
vote
1answer
905 views

Weak entity and one-one or many-many relationship

In Entity Relationship Model, can the supporting (or identifying) relationships of the weak entities be many-many or one-one rather than many-one? Suppose I have a customer entity (C), a video entity ...
4
votes
3answers
1k views

What is a common way to save 'debit' and 'credit' information?

I'm working on an accounting system, and for each transaction I need to save if this is either debit or credit. I can think of two ways (MySQL database): METHOD 1 Amount (decimal) Type (enum, ...
4
votes
1answer
593 views

barcode inventory design - transaction or master?

I am building a inventory software for mobile phone retailers. There are several things confuse me. Ok, we have: Product Product Attributes Barcode Stock In Batch (Purchases/Return, etc) Stock Out ...
0
votes
1answer
340 views

mysql picasa like photo tags store and query [closed]

I want to make a photo website, allow users to upload photos and write 1-10 customs photo tags, like picasa. I use mysql. Tags could be words or short sentence, but total length can not over 80 ...
5
votes
3answers
2k views

How costly is opening and closing of a DB connection?

How CPU intensive is opening and closing of a DB connection (for a web app) in MySQL ... when the DB software is on localhost? ... when the DB software is on another machine?
5
votes
1answer
86 views

Database Design: Linking 'vague' entries to associations?

Experienced developer, inexperienced DBA here. I'm currently working on a project that lets users input the names of freight vehicles for particular packages. Eg: Company: White Star Line Vehicle: ...
2
votes
1answer
142 views

Is a year-to-date dimension the same as a time dimension?

If I have a table such as...: YYMM | Sales ------------ 1201 | 10 1202 | 20 1203 | 30 1204 | 40 ... then I might describe this as having a time dimension. If I wanted to calculate a year-to-date ...
2
votes
2answers
4k views

How can you have two auto-incremental columns in one table?

I have a MySQL table that contains information on invoices of a company. However, this company has two branches, and each of them has a unique invoicing sequence; a "Serie A" and "Serie B", so to ...
3
votes
2answers
917 views

Data type for currency 'type' column, e.g. usd, cat, etc.

I am setting up a MySQL database for accounting software. One of the fields is to save the currency used for each transaction. What field type would you recommend? Details: No more than 10 different ...
5
votes
2answers
200 views

Is there a name for this “restricted one to many” relationship? Can it be enforced in the DB?

In an application I'm working on, we have a kind of "restricted one-to-many" relationship. I'm wondering if this has a name, and whether it's possible to enforce at the database level. A standard ...
1
vote
1answer
245 views

Design question about student assessment data

I am designing a relational database in Filemaker Pro that will be tracking assessment data for students in after school tutoring programs. Depending on the student's grade level and skill set, each ...
3
votes
3answers
127 views

Optimisation Newbie: How much of a 'sin' is redundancy?

I've been developing for a while, but never really had to deal with DB/scaling issues before. That's suddenly changed and I've found myself in the deep end. I have 2 SQL tables, as such: VOTES ...
2
votes
1answer
115 views

ERwin Data Modeler Support

For the sake of not asking 5,000 questions here; are there any reliable sources of information about ERwin? I have to use it for a course and I have been unable to find any website or documentation ...
1
vote
1answer
360 views

Normalization: Should common columns of two tables be pulled out into a third table?

Should I further normalize my current design to eliminate redundancies? I have the following tables: empl: standard user table empl_cat: employee "category" empl_admin_cat: administrative ...
15
votes
2answers
3k views

Handling growing number of Tenants in Multi-tenant Database Architecture

Handling a modest number of customers (tenants) in a common server with separate databases for each tenant's instance of the application is relatively straightforward and is normally the correct way ...
2
votes
4answers
202 views

MySql Database solution for specific web app problem

Well, I need to create a comment system for posts that people add to my web app. This web app is just like facebook or myspace posts. Users add posts and people can comment on them. But the problem is ...
3
votes
1answer
124 views

Human relations between users

I'm involve in a development of a tiny Social Network where users must be able to establish relations between them and also have permissions over contents. For a example: I add one user as my friend ...
1
vote
2answers
342 views

Managing features for a real estate agency [duplicate]

I have a database table real_estate where the basic information is held (id, status, sku, address, building_type, sales_status) and now I want to attach features to that real_estate table. The data ...
2
votes
1answer
131 views

One table or several tables?

I have several types of writings: articles, projects, reviews, etc. I have a table containing paragraphs (fields id (INT) and partext (TEXT)). Each writing consists of several (ordered) paragraphs. ...
3
votes
2answers
336 views

City Distance Map Database Design

Well I am just a db beginner, I want to design something like this I want to keep simple as possible, well I will enter all values[Cities, Distance etc.,] manually, because my cities are limited. ...
3
votes
4answers
4k views

Supertype/Subtype deciding between category: complete disjoint or incomplete overlapping

I'm building an inventory database that stores IT hardware, such as desktop computers, laptops, switches, routers, mobile phones, etc. I'm using supertype/subtype pattern, where all devices are stored ...
6
votes
2answers
346 views

What is the name of this schema pattern

Its been a few years... but I've run into a problem-set that reminds me of a schema design pattern and I'm trying to recall the details. Essentially, the pattern consists of one database which is 3 ...
2
votes
0answers
242 views

How to seperate sensitive data in database(MySql) [closed]

I need to design a database that will contains information about personal disease of users. What can be the approach in order to implement the columns of the DB's tables: encrypt the information, ...
2
votes
2answers
835 views

Model a family tree database in Access 2007

I designed my database with the intention of implementing it with MySQL, but have now decided to implement it in Access 2007 using form and subforms. While creating my UML diagram, I realised I have ...
2
votes
2answers
485 views

mysql products db design

I am building a products site with php and mysql(no shopping cart). I have 400k products, the main site with 2 methods for query. query for products types, all the query by menu, cloud tags (no ...
3
votes
3answers
672 views

How do I design a database for continents, countries, regions, cities and POIs?

I am not a database designer so I'm having trouble designing database with GIS information. The goal is to create a system with continents, countries, regions (including states, sub-regions, ...
2
votes
1answer
138 views

New table or new column

Apologies in advance if this is a dumb question. Background: I am a student intern, I've been given the task of adding a new feature the companies client administration system. Basically it involves ...
6
votes
1answer
2k views

2NF decomposition + database normalization

If anyone knows about 2NF I'd greatly appreciate if you could tell me if my understanding of it correct my book does not even mention it (except to say is of "historical significance") and I haven't ...
2
votes
1answer
3k views

Concept to keep track of changes in all tables

In my current project I use about 10 MySQL tables (Doctrine as DBAL). I'd like to keep track of all changes in the databases (insertions, updates and deletions). At the moment there are two ...
2
votes
1answer
879 views

How to create a train schedule in SQLite3?

I am interested in what a SQLite3 database schema would look like for a train timetable. Generally this is presented in table format as the final result. Sample Schedule for M to F STATION A ...
4
votes
1answer
146 views

Beginner design of biological sampling database

As a complete newcomer, I would like to practise designing a database based on the biological data my lab has been accumulating over the years. Here is an explanation (I am simplifying/abstracting ...
5
votes
1answer
843 views

Survey database design: first version. Are there errors?

I have to represent surveys with questions like these ones: Studying those groups of questions I found these rules: A survey has questions' groups. A questions' group has a name and questions ...
1
vote
1answer
189 views

Choosing the right field data type in SQL Server 2008

I got a request to create a new table that will store certain information for customers. The definition of the table is somewhat irrelevant except for one field. This field will store ANSI characters ...
4
votes
2answers
1k views

What is the best identifier for a UserID? 64 bit integers, UUID V5, or 64 character SHA256 UID?

I wish to future-proof my application. What is the best type of identifier to use? I am considering: 64 bit Integer UUID 64 character SHA256 I am not developing a distributed system, so is ...
7
votes
5answers
3k views

Survey database design: associate an answer to a user

I'm doing the conceptual model for a survey database. The goal is store the answers given by users (it going to be an Android app). I have three entities: user, question and option. A question will ...
3
votes
3answers
287 views

How to prevent redundant relationships in data?

If I want to link users with other users. Would this be a good way to do it: I'm asking because I probably get double data like this if i don't do specific checks: +------+-------------+ ...
4
votes
1answer
764 views

Designing a database for a site that stores content from multiple services?

I'm building a site that implements David Allen's Getting Things Done that pulls in your email, Facebook newsfeed, tweets from those you follow on Twitter, and more services are planned. The problem ...
2
votes
2answers
1k views

Do I need a separate Id column for this “mapping” table?

I have a table of Producers and a table of Products, both of which are of the form: Id - int, Primary key Name - nvarchar A Producer can carry multiple Products, so I was going to create a table ...
5
votes
1answer
324 views

Dimension Help - Deciding Fact or Dimension

We have the following Dim and Facts: Customer Dim: SCD Type 2, Info about the customer ie first purchase date, name, address, etc Product Dim: SCD Type 2, about our products Customer Snapshot ...
1
vote
0answers
87 views

User defined content specific permissions with varying conditions. How to design tables? [closed]

I'm working on a privacy settings problem, which is proving to be cumbersome to design. Essentially I have: User created content User can define access groups for content. Access groups vary ...
3
votes
1answer
1k views

Bit vs. Boolean columns

Given that bit fields are just binary representations of data and need to be queried in slightly "strange" way. Does it actually provide any benefit using a bit field for a boolean value? From what I ...