database-design

PHP, MySQL, spatial data and design

Im building an application where vehicles coordinates are being logged by GPS. I want to implement a couple of features to start with, such as: realtime tracking of vehicles history tracking of vehicles keeping locations and area's for customer records I need some guidelines as where to start on database and application design. Anyth...

Light-weight Database for storing user preferences of widgets

Hey all, I'm looking for a database that I can distribute with a web application, that will store user preferences for various widgets. A good example is the kind of database design that apple uses to store information about its widgets. So the weather widget stores location, while the notes widget stores notes. I think I'm looking f...

Database design - Clarification

I have designed a table called USER_REQUESTS. It has a field called STATUS ,the purpose of which is to capture the current status of the request. It can be something like submitted,in progress,completed etc... Now my questions is,do I have to create a master table to hold the possible request status? If so,what would be the benefits? ...

Drowning in a Sea of Nulls

An application I inherited tracks lab test results performed on material samples. Data is stored in a single table (tblSampleData) with a primary key of SampleID and 235 columns representing potential test results. The problem is that only a few tests are performed per sample, so each row contains over 200 nulls. Actually, there is a sec...

Oracle schema table name restrictions

Hi I am looking into using JBoss 5.1.0GA on Oracle, and have seen this, warning that I should explicitly state the name of the schema into which the TIMERS table should be created, as Oracle doesn't permit the same table name to be used twice, even across schemas. After reading this, I saw this question on StackOverflow, and would like...

Data Base Design for Images

Hi, I would like your advice regarding Data Base design, I am new to it :-). I have 4 different data elements (tables A,B,C,D) example: A - Contents B - Categories C - Authors and D - Images Every record in tables A,B,C could have associated 1 or more different Images in Table D, BUT for every image in D must be uniquely associated only...

Move table datas to another table field

Have a task to make votes for photo. Because users can vote only one time for photo, I should save them. I plan do not to make separate table for saving user ids, but save them in photo table in blob field separating by any delimiter. What do you think about such practice? Are there any hidden troubles? I see with such structure, I will ...

Mysql table architecture suggestion needed

Existing system - I have existing Users and Tutor_Details tables in my system. - There are two types of users - tutors and students. Users and Tutor_Details tables are linked by id_user foreign key. New requirement - Every tutor can have some of the following credentials:- Certified Experienced Other A tutor can have a maximum of 3 a...

Recommendations for online articles / books about database architecture?

Hi, I was wondering if anybody had any recommendations for some good free resources where I could learn about complex database architecture? All suggestions appreciated. ...

Does having large number of properties in an Entity effect datastore read/write performance?

I have couple of entities with properties numbering in the range of 40 - 50. All these properties are unindexed. These entities are a part of a larger entitygroup tree structure, and are always retrieved by using their key. None of the properties (except the key property) are indexed. I am using Objectify to work with entities on BigTabl...

Defining table structure for a database?

Up until now, my experience with databases has always been working with an intermediate definition layer that we have where I work. i.e. SQL wasn't directly written for the table definitions, but generated from an intermediate file which wrote out SQL scripts for creating the appropriate tables, upgrade scripts between schema changes, a...

one field with diferent datatypes [SQLAlchemy]

i have a value that can be integer, float or string, and i create diferent columns: #declarative class MyClass(Base): #id and other Columns _value_str = Column(String(100)) _value_int = Column(Integer) _value_float = Column(Float) def __init__(self,...,value): self._value_str = value if isinstance(value,(...

Is it better to model databases after their applications, or after their components?

I'm structuring a database, and found that I have two different objects I'm trying to model. Each one consists of the same things (a varchar and a couple of foreign keys), and will do so for the forseeable future. I'm (as of now) going to put them in the same table, with an extra 'type' field, but I was wondering if there's standard pr...

Can you bypass the size limit of SQL Server Express by stacking databases?

My company is working on a development project using SQL Server 2008 Express. The amount of data we plan to store in our main table will quickly exceed the 4GB size limit of Express. We can buy ourselves some time with SQL Server 2008 R2, but eventually we will surpass the 10GB limitation as well. The team lead wants to hear all availab...

Char vs Varchar when not always populated

I have a database with a field that holds permit numbers associated with requests. The permit numbers are 13 digits, but a permit may not be issued. With that said, I currently have the field defined as a char(13) that allows NULLs. I have been asked to change it to varchar(13) because char's, if NULL, still use the full length. ...

MySQL Categories and Subcategories Table Structure

Hi everyone, I am having a little bit of a problem with setting up a mysql table that will hold a list of categories and subcategories. I am not to sure how to setup the table. Does it need to be 2 separate tables? 1 for the main categories and 1 for the subcategories or can it be all in 1 table? Would something like this work? Create T...

Database design: Is there a way to improve on this design?

Simple question- Below is the database design to hold the following records account TransactionType TransactionName Amount FeeTransactionId TransactionId RefTransactionId Alex [Deposit from] [Credit Card x-1234] [-100.00] b a Alex [Deposit from] ...

Is it possible to maintain the DB cache multiple locations with single DB?

I have DB with table in INDIA, for that table I am maintains the table cache here..but i am interested to maintain the cache in UK with the same table (I am not interested to create the same table in the UK).. it is possible? what requirements to be required for this one/ Thanks, Murali ...

Adding new fields vs creating separate table

I am working on a project where there are several types of users (students and teachers). Currently to store the user's information, two tables are used. The users table stores the information that all users have in common. The teachers table stores information that only teachers have with a foreign key relating it to the users table. u...

Creating a simple Non repudiation/fraud proof system

What are the key features should I consider if I want to create a simple fraud proof and non repudiation system? For this question, I am mainly concentrating on the integrity of the database rows. This is not a security permission question. Using a soccer database as an example, some of the key features that I would implement are: P...