Questions tagged [database-design]

The development of the conceptual schema and/or the logical model and/or the physical settings of a database.

Filter by
Sorted by
Tagged with
26 votes
7 answers
21k views

Storing IP address

I have to store the IP address of all registered users in the database. I am wondering, how many characters should I declare for such a column? Should I support IPv6 as well? If so, what is the ...
Cleankod's user avatar
  • 515
9 votes
4 answers
20k views

How to design a relationship database table to store friendship relationship?

I want to design a table to store friendship relationship in my web project It should satisfy at least the following 4 conditions: who send the add-friend request e.g.(if A TO B then this column ...
Hi福气鱼's user avatar
23 votes
6 answers
28k views

Is there any good tool for making Database Design and Prototypes? [closed]

I would like to have a good tool for designing the Database Schema with all the tables, columns, data types and relations. Today I mostly do this with pen and paper but I would like to do it in a good ...
Jonas's user avatar
  • 33k
19 votes
7 answers
7k views

Is polling the only way for updating app's data from a database?

An application needs to have data as more freshly updated from a database as possible. In such a case, is there any other way for getting the data, besides of a timer based requesting (polling) the ...
rem's user avatar
  • 1,555
1 vote
2 answers
873 views

How wrong is my web app modeling schema?

So, I'm about to write a quite simple web application, I am currently working actively on the database schema, and I need help to avoid major drawbacks. I've been programming (php) for a few years now,...
damusnet's user avatar
  • 113
11 votes
5 answers
8k views

Are there opensource hierarchical database management systems [closed]

I was looking for a hierarchical database management system and the only one i came across was IBM's ims.Are there opensource systems that one can use?.
Gandalf's user avatar
  • 295
23 votes
6 answers
10k views

Needing A Database Design Book [closed]

I am designing a database and it has so many relationships among my tables and i need a book that teaches database design very well.I am looking for a book where table relationships simple and complex ...
11 votes
2 answers
4k views

How do I implement a database/table as a stack

I have a state-machine which needs to push/pop some file-names for different users. I would traditionally use stacks as the choice of data structure, but this needs to be done using a database since I ...
brainydexter's user avatar
7 votes
2 answers
20k views

MySQL Database Schema for Train Timetables

I am interested in what a MySQL database schema would look like for a train timetable. Generally this is presented in table format as the final result. Train No. 11111 22222 11111 Train Day ...
Vicsig's user avatar
  • 99
1 vote
1 answer
238 views

How to design databases? [closed]

Describe the process in steps, please. What tools do you use for it?
NARKOZ's user avatar
  • 113
2 votes
1 answer
929 views

MySQL Database Schema for Volleyball

I am developing a database for the recording of Volleyball results. I have a fixture database that tells me who plays who in each round. Teams Table, say IDs 1,2,3,4 Fixtures Table, Round No.1, Team ...
Vicsig's user avatar
  • 99
12 votes
3 answers
539 views

How-to implement an entity with an unknown maximum number of attributes?

I am designing a baseball simulation program and I have run into a problem with designing the boxscore schema. The problem I have is that I want to track how many runs are scored in each inning. The ...
Philip Lombardi's user avatar
4 votes
1 answer
1k views

Question on Design for User + User Groups + User Types + Subscriptions Model

I am redeveloping an existing web application with both weak source code and a weak underlying database design. I'm trying to develop things in a way that future expansion will be much easier, namely:...
Calvin Froedge's user avatar
5 votes
4 answers
5k views

Examples of SQL transaction procedures for sales tracking or a financial database

I am making a database for an accounting/sales type system similar to a car sales database and would like to make some transactions for the following real world actions: salesman creates new product ...
fa1c0n3r's user avatar
  • 617
9 votes
2 answers
36k views

Is it OK to have an entity in an ER diagram without a relationship?

I'm creating an ER diagram for a class assignment and I was wondering if it would be possible to create an entity that had no direct relationship to any other entity, and simply use foreign keys to ...
user avatar
4 votes
3 answers
1k views

Embedding vs foreign table in one-to-one relations?

I'm currently taking a university course about databases. Consider the following modeling scenario where a car exists only in the context of its owning student: Student (0,1) <---> (1,1) Car ...
randomguy's user avatar
  • 2,151
59 votes
6 answers
43k views

What problems will I get creating a database per customer?

I remember from the stackoverflow podcasts that Fog Creek use a database per customer for Fogbugz. I assume that means the Fogbugz On Demand servers have 10s of thousands of databases. We are just ...
Rik Heywood's user avatar
19 votes
6 answers
17k views

Oracle Creating ER Diagrams and Data Dictionaries

I am new to Oracle Databases and would like to develop a data dictionary and ER Diagrams for our existing databases. Do you have any tips, scripts, tools for doing so?
Scott's user avatar
  • 657
26 votes
20 answers
4k views

How to dive into an ugly database?

I'm sure many of you are/were dealing with a ugly database. You know, that database that isn't normalized at all, that database where you have to do a large painfully query to get the most trivial ...
eiefai's user avatar
  • 1,874
3 votes
3 answers
2k views

Estimate large database size and speed

First I want to know how to estimate the database size regarding the biggest table it will contains. I've the following : +----------+------------------+------+-----+---------+-------+ | Field | ...
Kami's user avatar
  • 283
2 votes
2 answers
446 views

Will this Database design logic work and what should be used?

A few weeks ago I had a client of mine ask me about how complex it would be to develop a custom CRM application similar to the one being provided by highrisehq.com What he essentially wants to do is ...
NetConstructor.com's user avatar
18 votes
7 answers
4k views

What is a good way to store a large number of columns?

I have a problem deciding how to store this data in my database. Any suggestions on the best way to do it? I don't know a hell of a lot about databases, I might add. I have data coming in formatted ...
James's user avatar
  • 241
5 votes
1 answer
126 views

Data transformation implementation

My company's database, I am working with, makes available a data to a lot of external applications. So I need to transform the same data to a lot of dynamic views. I can see that a former database ...
garik's user avatar
  • 6,722
47 votes
5 answers
194k views

How do I list or search all the column names in my database?

I want to search for a string in the names of the columns present in a database. I’m working on a maintenance project and some of the databases I deal with have more than 150 tables, so I'm looking ...
Webber's user avatar
  • 685
10 votes
4 answers
2k views

Where should one put indexes in a time dimension table?

After reading the Questions and Answers from this website about indexes, a question came to my mind. What if, one is using a time dimension table with the lower level of granularity being the day. ...
Spredzy's user avatar
  • 2,248
37 votes
3 answers
10k views

Duplicate column for faster queries?

The title doesn't make too much sense, but I couldn't think a better title for this problem. I have the following tables Projects id name Customers id id_project name Payments id id_customer ...
Gabriel Solomon's user avatar
6 votes
1 answer
514 views

Can filtered indexes help improve queries that are based on a time entered or should this be avoided?

I'm just learning about the new filtered indexes in MS SQL 2008 and I'm trying to understand where they would hurt and where they would help. I can see that adding a filtered index to an employees ...
Beth Lang's user avatar
  • 952
22 votes
2 answers
40k views

What is the difference between MySQL VARCHAR and TEXT data types?

After version 5.0.3 (which allowed VARCHAR to be 65,535 bytes and stopped truncating trailing spaces), is there any major difference between these two data types? I was reading the list of ...
Derek Downey's user avatar
  • 23.5k
13 votes
2 answers
4k views

Security for Application Developers doing PL/SQL work in Oracle

How do you handle the lack of Schema level privileges in Oracle? Oracle’s security architecture works well for applications that only need object level privileges and it works well for DBAs that need ...
Leigh Riffel's user avatar
  • 23.9k
9 votes
2 answers
9k views

Is it better to store calculated values or recalculate them on request? [duplicate]

Possible Duplicate: Storing vs calculating aggregate values At an old job, we had this database, it wasn't normalized rigth, some tables wheren't used anymore, it was patch after patch. In ...
eiefai's user avatar
  • 1,874
111 votes
5 answers
33k views

Storing vs calculating aggregate values

Are there any guidelines or rules of thumb to determine when to store aggregate values and when to calculate them on the fly? For example, suppose I have widgets which users can rate (see schema ...
BenV's user avatar
  • 4,903
46 votes
9 answers
11k views

How should deletions be handled in the database?

I'd like to implement an "undelete" feature in a web application such that a user can change her mind and recover a deleted record. Thoughts on how to implement this? Some options I've considered are ...
Abie's user avatar
  • 885
28 votes
5 answers
20k views

What are some ways to implement a many-to-many relationship in a data warehouse?

The dominant topologies of Data Warehouse modelling (Star, Snowflake) are designed with one-to-many relationships in mind. Query readability, performance, and structure degrades severely when faced ...
Brian Ballsun-Stanton's user avatar
17 votes
2 answers
676 views

Get and Put performance testing on Google BigTables (and other integrated DBs)

What are some effective ways to perform programmatic performance testing on database operations, especially in environments where the databases themselves do not offer dedicated tools? For example, ...
Brian Ballsun-Stanton's user avatar
13 votes
2 answers
2k views

How to structure a model to properly and efficiently represent tree-like data on relational databases?

Based on Traversing tree-like data in a relational database using SQL question, I would like to know how the way regularly used to describe tree-like data on relational databases considering physical ...
Maniero's user avatar
  • 2,728
30 votes
10 answers
2k views

What is an effective way of labeling columns in a database?

I used to label columns in my databases like this: user_id user_name user_password_hash To avoid conflicts when joining two tables, but then I learnt some more on how to alias tables, and I stopped ...
Thomas O's user avatar
  • 501
2 votes
2 answers
366 views

What is wrong in debunking myths about clustered indexes?

What is wrong in code. or its results, illustrating that clustered index is evil [1]? and how to de-debunk, i.e. to return to customary myths and best practices? [1] Debunking myths about ...
Gennady Vanin Геннадий Ванин's user avatar
9 votes
2 answers
1k views

Clustered indexing is now must - why?

Earlier, there were non-conclusive to me debates / discussions on whether to (always) engage / avoid clustered indexes. Well, I understood that they are to be used sometimes with proper + specific ...
Gennady Vanin Геннадий Ванин's user avatar
20 votes
5 answers
13k views

SQL Server - separate database for reports?

On our SQL Server, we have a database for each of our web apps. For reports, we use Reporting Services and all report data (including report parameters) come from stored procedures. The stored ...
Craig's user avatar
  • 503

1
122 123 124 125
126