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

Best way to set up database tables

I have 1 user table and want to associate it with multiple other tables depends on if user have added such information (modules) and want to know what is the best way to do it. main table ...
1
vote
2answers
128 views

Foreign Key constraint on fixed value field - Ever appropriate?

I have a short (15 rows) look-up table that lists the valid values for several columns in the database. I don't think it can be considered a One-True-Lookup-Table, it is about a single definite ...
1
vote
1answer
399 views

Modeling a ticket system based on a set of disparate kinds of tickets?

I'm working on a project that allows for the creation of "support tickets." These are not confined to something that needs fixing, however, so in a way they could more accurately be called "jobs." ...
1
vote
2answers
123 views

Database design that handles data growth with time

I have a big table that stores video rental data with the following columns: id, title, language, duration, owner, remarks, closing_date_for_loan Assuming every day there are thousands of data ...
1
vote
1answer
147 views

Approach to Analyzing Database Requirements

When presented with requirements for a database driven system, I always find it useful to imagine a world with no computers, where data records were kept in filing cabinets and data was collected by ...
1
vote
1answer
317 views

Possible reasons for slow BLOB updates in Oracle?

We have an application that transfers .bmp images as BLOBs to an Oracle table. One of the users of the app has complained that it is taking 2-3 seconds to transfer each image. Each image is ~1.2Mb. ...
1
vote
1answer
536 views

ER Diagram translation to tables

I am trying to translate the ISA relationship in this ER diagram to database tables, and I am not sure how to enforce the total and disjoint participation constraint of Laptop and Desktop in Computer. ...
1
vote
4answers
3k 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
136 views

Storing Different Products and Joining on table Names

I am setting up a database using mysql to store different products with different product types. For example I could have Books, Software and clothes etc. What I am think of is creating a parent ...
1
vote
1answer
138 views

Setting up simple relational database structure

I'd like to set up simple MySQL database but I'm a bit confused about everything, so let me try to explain... I have 4 relevant tables, let's call them POS, POS_STRUCT, POS_STRUCT_DIV and MEMBERS. ...
1
vote
2answers
407 views

Separate or Combine 2 Tables with Similar Attributes?

I have two kind of users in my business system: Customer and Employee. Both user have Username, Password, Fullname, Phone Number, Email, and other similar attributes. I have a difficulty to ...
1
vote
1answer
97 views

Can I place the attribute in the Entity, when the foreign key is also already present?

I am using DBdesigner Fork for generating ER diagram. I have the 'Company' as an entity for which can I place the attribute of 'idShares', despite of having the foreign key of Shares Entity in the ...
1
vote
1answer
214 views

Does my design adhere to 3NF?

I created this schema with OpenOffice. Does this design adhere to 3NF ? (A relationship link between Equipment and Supplier_Equipment , Customer and Membership should be created but OpenOffice ...
1
vote
1answer
262 views

Are these database tables normalized?

I am developing a webapp for an institute and I designed these tables: Are these tables normalized?
1
vote
1answer
262 views

Database design with different user roles connected by different relationships to one organizaiton table

An user is connected to an organization by some role. Lets say there are 2 roles freelancer and employee. One employee can only be a part of one organization and if he is an employee then he can't be ...
1
vote
1answer
160 views

Issues on defining a PK on a nvarchar column and indexing the FK referring this PK

Someone from the team, has defined two reference tables with a few records in each, and has defined the PK of these tables on a column of type nvarchar(255). The value exists in this columns are ...
1
vote
1answer
126 views

Database Design - When to use “attributes” rather than additional columns

I'm wrestling with a schema design issue. I'm attempting to determine when I should add another column instead of making it an "attribute". Rather than adding a numerous columns to a table, I ...
1
vote
1answer
858 views

How to design tables for dynamic payroll items

I have to design a database for the payroll system. The requirements are as follows: Admin can create payment items, such as Basic Salary, Overtime, Housing, Allowances at run time. Each payment ...
1
vote
1answer
111 views

Is MySQL replication suitable for a Write Mostly application?

I'm considering adding another server to my one-server setup application with 600GB MySQL DB. The db and the apache are both running from the same server. In order to avoid backup downtime and improve ...
1
vote
1answer
259 views

MySQL table locks solution -> InnoDb / Partitions

I'm experiencing many table locks in a MyISAM MySQL table that is pretty big (Constx10xGB and 15M rows). It's mainly caused due many heavy inserts. My current thoughts to optimize: Changing to ...
1
vote
2answers
454 views

Database design experienced view

I want to make a database that stores countries, their respective states, and cities. I am confused how to normalize these. Can anyone help? My ideas: Table 1 Countries (id pk, name , code) ...
1
vote
1answer
618 views

Implementing a family database using Access 2010

A while ago I asked this question about using Access 2007 to implement a family tree model. I had all the tables and relationships mapped out in a UML diagram but realised it was getting out of hand ...
1
vote
1answer
73 views

Configuration Persistance Design

We have a well designed and normalized DB, but, there is a requisit that could cloud this design. This image shows the design of part of the DB. The main functionality of our application is to create ...
1
vote
2answers
273 views

How do I design a database to store quotes online?

I have a form to generate quotes online. The form has many products with their respective prices and options. The users will generate the quote online and I need to store the quotes of the users ...
1
vote
1answer
103 views

Same field but different contents

I'm building a database for a divination system. Just to make it easy, I'll explain it in terms of the i ching. Every element of a hexagram is a different table. There's one for yin and yang, one for ...
1
vote
1answer
749 views

how to set/change the font style in database?

This question may be duplicate with another but my question is this. I want to set or change the font style in header of table (like hindi font or any other) of database. I am using sql server 2008 ...
1
vote
1answer
68 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
1answer
312 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 ...
1
vote
1answer
692 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 ...
1
vote
1answer
54 views

Handling newsletter mail subscribers data

A simple data structure for subscribers is email, name, phone, building. Currently, Building is a VARCHAR field, however data contained in the field is actually mostly numeric. How can I change the ...
1
vote
2answers
1k views

Adding Row Version to SQL Server table

I have a table in a database with three columns: ID, Key and Value. Everytime I update the record, I have a trigger that sends these updates to another table and creates a new record in it, who's ...
1
vote
1answer
1k views

What is different bettween Cassandra NoSQL data model and SQL data model

can any one tell. cassandra data model and sql data model how we can define row and column with cassandra data model?
1
vote
2answers
285 views

How to model double relationships?

Background: I have designed a solution for Filemaker to input data into a Question Database. After we are done with inputting data into Filemaker, we will be exporting the data as excel and ...
1
vote
1answer
97 views

Impact of changing schema name

I have a server with two databases. Each database has a different schema name despite the fact that DB2 is a subset of DB1 (DB2 has a subset of the tables in DB1). Not withstanding any code changes ...
1
vote
1answer
215 views

Referring to super parent or as a separate entity?

I have this person table as super parent, id firstname lastname email telephone ... ... and user table as a child id person_id (FK) password username screenname ... ... They must be 1:1 ...
1
vote
1answer
261 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 ...
1
vote
1answer
246 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 ...
1
vote
1answer
89 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 ...
1
vote
1answer
862 views

User system database design

I'm designing a database for a new project and I'm looking for some feedback on the design before I start to implement/test. It basically consists of users, events, user profiles and a messaging ...
1
vote
1answer
207 views

Design Tagging module in the database

I've a database system which we want to define tags for many tables into it. For example I've videos, photos, ... different entities that we wish to make them taggable. The tags could be anything. By ...
1
vote
1answer
74 views

Design for a Testing system

I want to redesign a part of my system. I got the following objects: Site: id Name Site Version: id idSite Name Task: id idSite Name Test: id idTask Name TestResult: idTest idSiteVersion ...
1
vote
1answer
1k views

Automated UML2 Class Diagram generation from SQL?

How can I generate a class diagram from an SQL database or script? I'll add the functions and set whether the attributes are public, private or virtual once the initial diagram is generated. I've ...
1
vote
1answer
127 views

Document Design and Document IDs

I was wondering about specifying id's in CouchDB. For example: House - Rooms -- Kitchen -- Living room -- ... - Windows - Doors There are some documents, like "House", where there is and will only ...
1
vote
1answer
110 views

Are there situations where queries are formed geometrically?

The topic came up in this other question. We were discussing sign value on a primary key having any significance. If there are good times to use geometry in building queries the sign value could be ...
1
vote
1answer
257 views

Versioning a dataset in an RDBMS using initials and deltas (xpost from SO)

I'm working on a system that mirrors remote datasets using initials and deltas. When an initial comes in, it mass deletes anything preexisting and mass inserts the fresh data. When a delta comes in, ...
1
vote
0answers
27 views

How to design a database structure for different groups of contacts?

I've been looking around for a while how systems manage their contacts. Most I encounter is creating a people or party table including a type to define the type of people/party. These types are either ...
1
vote
0answers
17 views

Basic Design Question about one to many in a table

Sorry for the basic question but I am new to all of this! Say I have a table named Runs, and each table has Run: id (primary_key) data (String - path to a data file) status timestamp ... ...
1
vote
1answer
56 views

Database Normalization: A Case Of The NULLs [duplicate]

I'm trying to learn about proper database management and am having a hard time with designing a database that doesn't rely on NULLs. If you think I'm crazy for embarking on this, it is because of SQL ...
1
vote
0answers
26 views

Second opinion about elimination of possible redundant database column

We currently have a Widgets database table were we track the widgets the company produces. When a widget is produced the widget information is added to this table. This Widgets table contains a Status ...
1
vote
1answer
41 views

Is there any way MySQL can list relationship cardinality between two entities?

I am working on the project where I have to analyse the MySQL schema. As a part of schema information, I want to list down relationship cardinality between different relations. Does MySQL stores ...