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)

0
votes
1answer
23 views

Create primary keys based upon higher-level entity in access?

Is it possible to have access create primary keys for items by appending a string to the primary key one level above it? I am trying to create an inventory management database for my company's server ...
2
votes
3answers
59 views

Database design for conditional detail table

I have an expense management system for monthly expenses. Expenses are of two types: one-time monthly expenses, and daily expenses for each day of month. I have created the following tables: ...
2
votes
0answers
52 views

Which design to choose in this case?

I am designing a database for a video game. I have some data structures like {x, y, z, dimension} used across multiple tables. For instance : Table player_death id: int player_id: int death_x: int ...
1
vote
1answer
25 views

Column of generic/variable type?

In SQL, I would like to create a table which can contain generic data types. This types can change from every row. The solution I could come up to is: CREATE TABLE TagValue ( tag VARCHAR(64), ...
0
votes
1answer
30 views

how I can create check sum to validate no changes at int string pairs on table

Business case is. 1)Users print document on paper 2)users carry printed paper to Boss, Boss sing on paper 3)after that users going to administrator to digitally sign that paper. My task is to help ...
0
votes
1answer
45 views

Contact system database design

I'm designing a database for contacts and I'm looking for some feedback on the current design. What i want: A contact can be a person or an organization. A contact can have many groups. A contact ...
2
votes
2answers
46 views

Auto-increment key and Foreign Key as composite for relational database

I do not have any experience in databases other than what I have from just playing with workbench and trying to understand how I need to setup this database for a project. I have been searching the ...
1
vote
1answer
42 views

Best practice for storing record metadata

What is the best practice for storing metadata of individual records in a database? I need to store common meta data such as creation time and time of last update for many tables in my database. I ...
0
votes
1answer
36 views

Which is the redundant relationship in this ER Diagram and why?

Which is the redundant relationship in this ER Diagram and why? A few of my friends and I have been trying to figure it out but keep going in circles. where the attributes of each entity are as ...
0
votes
2answers
30 views

This certain MySQL database organisation

Hypothetically, let's say that I have three tables: - Products (id, product_name, added_timestamp) - Individuals (id, name, last_name) - Companies (id, company_name, company_number, company_address) ...
0
votes
2answers
29 views

Mirrored tables on PostgreSQL

I have some values under "account" and I need to have the same values under "invoice", so, I'm trying to find a way to symlink my tables, so every time one gets updated, the another have the new value ...
-1
votes
0answers
19 views

Database design for different kinds of user profiles in SQL Server [closed]

I have a web application where I have 2 kinds of users: teachers and others. I have created a user table where the account info resides. By account info, I mean email address, username, password, last ...
0
votes
0answers
24 views

Which database and which database model for commenting system?

I am working on some commenting system and I have some doubts. Firstly, my question is which model would perform faster for "find conversation and show it and its comments with specific attributes"? ...
0
votes
0answers
50 views

Help with Multi-Restaurant Menu database design

I'm building an Online Food Ordering System with PHP and MYSQL, I need some help on the database design of the Menu. Please look at the design here Is the design good enough? To hold the menu's for ...
-3
votes
0answers
15 views

I cannot create a Navigation form in my already made database [closed]

I want one created already with tabs, it doesn't allow me to if i make a blank one. I cannot access the navigation drop down menu.
0
votes
0answers
33 views

How can I model this problem in a graph database?

I have a project that I'm working on where I extract data from PDFs and map/visualize the relationships between the extracted pieces. Here's an example of my problem: file: 11425646.pdf author: ...
0
votes
1answer
27 views

What's the practice to generate long user id like those on Facebook?

Now I am about to launch a site and I have trouble coming up with a way to create long user id(e.g. 4000002). Do I set id to auto-increment(Starts at 0) and then add something(e.g. 4000000) to this ...
0
votes
1answer
33 views

User roles and permissions

Look at the attached graphic. I'm trying to keep this as simple as possible. Basically I want to have multiple admins(or superusers) who own regular users who own sites. Admins can give regular ...
0
votes
1answer
59 views

Relational database primary key requirements

I am trying to put together an ER Diagram to design a fairly simple asset tag tracking/inventory management system for our servers/switches/UPS/etc. The top-level entity corresponds to the business ...
0
votes
3answers
61 views

Is it worth to separate columns into multiple tables for one-to-one relational table

I need to make a decision for database structure on whether to separate one-to-one relational columns into multiple tables and link with one relationship id or just add all columns into one table. ...
1
vote
4answers
92 views

Can I add a unique constraint that ignores existing violations?

I have a table which currently has duplicate values in a column. I cannot remove these erroneous duplicates but I would like to prevent additional non-unique values from being added. Can I create a ...
2
votes
2answers
47 views

Design consideration regarding state handling: how to store multiple, variable states for one entity

First I have to admit that I'm not a database professional neither are my colleagues. For a new project my colleagues and me came to a design question we couldn't really solve easily. And all the ...
0
votes
2answers
40 views

Storing dynamic data in NoSQL

I have scenario where I need to store unstructured data but the rest of my data is structured and relational. An example of the type of unstructured data is as explained below: User Type 1: How do ...
2
votes
1answer
51 views

How to optimize multiple self-JOINs?

I'm looking for advice on either optimizing multiple self-joins, or a better table/DB design. One of the tables looks as follows (relevant cols only): CREATE TABLE IF NOT EXISTS CountryData ( ...
0
votes
1answer
65 views

Am I wrong in table design or wrong in selected index when made the table?

I've build web application as a tool to eliminate unnecessary data in peoples table, this application mainly to filter all data of peoples who valid to get an election rights. At first, it wasn't a ...
0
votes
0answers
47 views

How do I model the database for an application containing canvases which are divided into building blocks?

How should I model my database if I wanted to have this functionality: I want to be able to create a canvas which has many building blocks (they are something like it's sections). There are many ...
0
votes
2answers
26 views

Should numeric identifiers like serial numbers be stored as integers?

Many of our databases store numeric tracking codes (like serial numbers) as integers. There is little chance of these codes every getting alphabetic characters, but it still seems like an incorrect ...
3
votes
1answer
63 views

financial transactions with and without commissions

I'm building a gambling website. All financial transactions from and to external sources (credit cards, money transfer systems) are subject to commission. Amount of the commission depends on the ...
0
votes
1answer
49 views

How to add custom sequence number in table which is going to be populated automatically

I have table something like this CREATE TABLE [dbo].[ado_test_table]( [id] [int] IDENTITY(1,1) NOT NULL, [tip] [varchar](10) NOT NULL, [datum] [datetime] NOT NULL, [doc_number] [int] ...
0
votes
1answer
49 views

Database with insert data every 2 minutes

I have a site to develop into PHP and mysql where I take, with a cron, every two minutes 10 xml from a server parse each and insert data into my database. Well this data are simple string (maximum 10) ...
0
votes
2answers
32 views

Use timestamp(or datetime) as part of primary key (or part of clustered index)

I use following query frequently: SELECT * FROM table WHERE Timestamp > [SomeTime] AND Timestamp < [SomeOtherTime] and publish = 1 and type = 2 order by Timestamp I would like to optimize ...
4
votes
4answers
107 views

PK as ROWGUIDCOL or use a separate rowguid column?

There's a long-winded debate going on here so I'd like to hear other opinions. I have many tables with uniqueidentifier clustered PK. Whether this is a good idea is out of scope here (and it's not ...
-3
votes
0answers
29 views

Database design for railway reservation management [closed]

Dear Ladies/Gentleman, I want to create database for railway reservation management as a part of project of final year. can anyone help me? thanks
2
votes
0answers
42 views

What is Transaction Path Analysis?

I came across the term Transaction Path Analysis which I am not familiar with. A Google search resulted in only a few results, most of which seem to assume everyone knows what it means. From these my ...
0
votes
1answer
32 views

Software for generating SQL from UML? [closed]

Can you name any software which allow you to generate SQL from a UML model? I have tried Enterprise Architect but its association class has no functionality.
0
votes
0answers
15 views

How implement MySQL unique index with two foreign key that one can be null?

I would know if can be declared in MySQl to create an index constraints in a table with two foreign key that one can be null. For example cannot be repeated a null foreign key with the other foreign ...
0
votes
1answer
12 views

What is proper database design for a drupal table with an order field?

I am adding a custom widget to an instance of Drupal 6.x & MySQL 5.5 and came across a problem with updating rows. I have a table of recipe ingredients where multiple ingredients are tied to a ...
0
votes
1answer
15 views

what is the best way to update 2 tables via data entry form in access 2007 database?

I have a database with more than 500.000 records, I use Table_a to Accession the files by the ID number,and Name, Date, Address, Tel, ..... And then i use Table_b to archive files and get the position ...
0
votes
2answers
43 views

Two nullable columns one required to have value

No-Explanation Question: Is there anyway to have a constrain of 2 null values that always requires 1 to have value ? For example two date columns both null but having at least 1 that requires to have ...
0
votes
1answer
40 views

Changing primary key from varchar to int

I am having user table where i am using varchar as primary key. Now from different place I got the performance of int is better over varchar for priary key. So i would like to change my primary key ...
0
votes
2answers
69 views

How do you store tabular data in an RDBMS?

First: I really haven't got any idea how to google for this. If you got one, leave a comment. If I want to store arbitrarily large tables in a database, how should I set up my database tables? ...
3
votes
3answers
245 views

Relation to original tables or to existing linking table

In my database I have a table with different settings for my app. Each setting is in relation to a guest (table guests) and an event (table events). So basically each guest has specific settings for ...
1
vote
2answers
28 views

Database model: doubly linked list

I am not sure if I get this right. I'm designing a database model for use in an application, and I'm stuck at a doubly linked list (model first; there is no code yet). There's an order. An order has ...
1
vote
1answer
53 views

Record versioning and promotion

Let's say we have this hierarchy: -World --USA ---WA ----Seattle -----Downtown ------1st Ave -------945 1st ave ------3rd Ave ...
-1
votes
0answers
68 views

Effects of good and bad database designs [closed]

I want to know what effects good and bad database designs have. Any ideas which can be added to the list below will be very helpful: Effects of a good database design: Little or no data redundancy ...
-1
votes
1answer
43 views

The network path was not found error after deploy application [closed]

i have been deploying and publishing my application for quite a bit now and everytime it worked fine. Now i published it again (no error, warnings,..) and updated my sql database tables like i do ...
6
votes
4answers
358 views

How can a database be normalized when an optional field causes denormalization?

Suppose you have a warehouse full of widgets. Each widget in the warehouse is stored in a specific identifiable location within the warehouse. You might have a schema which looks like this: A ...
0
votes
1answer
26 views

dimension table with “like” condition

In an effort to scale some existing code, we are removing logic from CASE statements and putting it in dimension/lookup tables. Thus instead of CASE WHEN 'F' THEN 'Female' WHEN 'M' THEN 'Male' is now ...
0
votes
2answers
38 views

Usage of foreign key when the referenced table data will not change

I have to design a table where user has 10 fields and 6 are dropdown. Some are single selections and some multiple. Dropdown data is supposed to change very rarely. For e.g., the user is presented ...
0
votes
2answers
54 views

Is there a good reason to store big text data outside database?

I was analyzing my MySQL database performance and found that tables containing text fields are just huge, larger than 1Gb. This data is only used when loading single record (like article or blog ...

1 2 3 4 5 22