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
0answers
12 views

Working with a quiz - percentages per item

I am creating a database for a fairly large quiz. It has a few questions that ask you to sort the items by percentages which must equal to 100%. So for example Household Income: $20,000+ 40% ...
2
votes
1answer
98 views

To normalize or not to normalizde? (10 fields)

I'm helping someone to design a database and for a specific case I'm not sure. I have 10 fields - this will never change - that will always be filled and used in every query that could be coming up. ...
3
votes
1answer
66 views

On which filegroup will constraints be created by default when adding them to a table on a filegroup and how should they be separeated?

We have multiple filegroups, that look something like this: PRIMARY (default) app_data app_index When I create a table on filegroup app_data CREATE TABLE Person ( [PersonID] INT NOT NULL ...
2
votes
2answers
341 views

Unable to access sql database with login and password [closed]

I'm writing Windows Service in C# and inside of it I'm unable to connect to the database. This is the question I've asked recently: SqlException: Cannot open database "path\db.mdf" requested by the ...
0
votes
0answers
30 views

Have a lot of customers -> which design in SQL Server 2008R2 should be chosen [closed]

I have a task and I don't know how solve it :) So, we have a lot of customers who should use SQL Server for their applications. Design is standard and simply: Customer -> Remote Desktop -> ...
0
votes
0answers
23 views

How to find a projection on the functional dependency?

I have below dependencies on attribute PUT: P -> QR T -> WV R -> UV V -> P Now how to find a projection on the above functional dependencies? I am trying to find a article which can ...
0
votes
0answers
58 views

Improving User Registration Design

I have two sources of data. One is an internal list of serial numbers shipped from the warehouse. This data is clean and valid. The second is a customer supplied registration data of serial number ...
1
vote
1answer
229 views

SQL Server performance for tables having large number of columns [closed]

I have a requirement where I need to create a table with about 600 columns. Out of 600 columns about 200 columns will be XML columns. Other column will be of other datatypes such as int, varchar, ...
1
vote
1answer
103 views

Precautions when designing database schema if tables are going to have billons of rows

I am about to start work on telephone dictionary kind of project. Its confirm that there are going to be billions of records in dictionary table, and each entry from this dictionary table may have ...
2
votes
1answer
102 views

Need for indexes on foreign keys

I'm struggling with indexes, primary keys and foreign keys... And the need of having them all. If I have two tables, both of them have an integer as a primary key. The first table references ...
0
votes
0answers
40 views

how to design my database for faster reads for my situation

I have a situation where i have two categories. Lets say type A and type B. In my database I have some 50,000 type A entries and 100,000 type B entries as of now. For each entry mentioned above(type ...
0
votes
0answers
50 views

Datamodel design for multiple roles, country access

I am in the process of creating a data model for the below scenario there will be two hierarchies a) dept hierarchy (emp -> team -> dept -> branch) b) sales hierarchy (emp -> marketing manager -> ...
0
votes
1answer
65 views

Implementing foreign keys on generalized data model

Suppose the ASCII tree below is a UML generalized concept model. To represent these entities/classes in UML, lets assume [mammal] a super class, and the level 1 classes, [wild] and [domestic] are sub ...
0
votes
2answers
80 views

Daily snapshot fact table

I have a list of products per costumer. Costumers can delete or add products to their list. I want to know in each day what is the list of products (and count) by costumer. My first approach is to ...
0
votes
2answers
90 views

SQL Server 2012. Update second table based on input from first table

I have two tables in two databases: Table01 in Database01 and Table02 in Database02. Both tables have a column called UserID. The UserID column is created when the user creates a new account on the ...
0
votes
1answer
53 views

What is the “proper” way to design a database architecture when entry counts belogning to different users may vary wildly?

To give a context; we are going rewrite our application in Django framework. The database that is being used by the old system at the moment designed very poorly, without any respect to methodology of ...
0
votes
0answers
497 views

Database design to track inventory?

Would this be a good starting point for tracking inventory with several warehouses? If yes what is the best approach to sum quantity when displaying stock by warehouse/type/general? mysql structure ...
0
votes
2answers
129 views

avoiding unique key collisions across tables

This might be related to the idea of data warehousing, but i'm not sure, though it is extreme theory. We have a table where records get written to first, let's call it tbl_recording which looks like: ...
0
votes
1answer
41 views

is-a relation(ERM) to tables

i try to design a database with an is-a relation: Vehicles have some general attributes and the SubVehiclesX have some specialized Attributes. SubvehicleX is a Vehicle And a Person has a Vehicle ...
0
votes
1answer
50 views

How to check how the table structure effects the performance of my query

I want to check how the table structure of a certain table effects the performance of a delete query. This is not a generalised question, I have a table, with currently 2.2 million records ...
2
votes
2answers
109 views

How to establish a Two-to-One table relationship (PK-FK-CK)?

My question is about DB design and its principles. I am working on a Python application where objects are mapped to database tables. I have Projects and People objects, mapped to their respective ...
0
votes
1answer
109 views

Does my ERD account for my business logic

As part of my new and upcoming project, part of the business logic involves sending each and every one of my customers (assume they number in their 1000s) multiple (possibly customized) emails. Each ...
0
votes
1answer
92 views

Database design [closed]

I have tables college and department. In college, I have serial-number and college-names, In department, i have nos, college-names and department-name. My challenge is that having a repeated ...
2
votes
1answer
81 views

Method to keep track of large number of sets with high cardinality

We're building an analytics service. One of our needs is to maintain ~100MM sets each with anywhere between one member to 1MM members, with each member represented as a long. We need to be able to ...
1
vote
1answer
53 views

Accessing MySQL Database

I am designing a database for an application, which will be accessed by different front end programming languages, such as php, asp.net, android applications and iphone applications. I am confused, ...
1
vote
3answers
182 views

GUID stored in a varchar field

I have inherited several databases that use GUIDs as PKs. Instead of all the datatypes being uniqueidentifier most are varchar(50) and some varchar(100). Fields are true GUID some where created by ...
-1
votes
1answer
28 views

Relation that combines entries with their subsequent entries, in order of date

I need to come up with a query that can do the following: I have a table with a bunch of transaction records, whose attributes are not important, other than the attribute Date. I need to come up ...
1
vote
1answer
63 views

Data modelling concepts

Let´s say I have 3 entities. Can I have them all linked to each other "forming a circle" where each one is linked to the other trough a many to many relationship. Cheers
3
votes
2answers
111 views

Can relationships have relationships?

I have the following requirements (as part of a larger system). In the database, I need to maintain a list of parts, suppliers who sell those parts. Many suppliers can sell the same part and each ...
0
votes
2answers
65 views

Table Design Cardinality

I am designing a database for an application, in that I need to consider both BUYER (BUYER_ID) and VENDOR (VENDOR_ID) as a USER (USER_ID). I have designed this logic in a following design. USER ...
1
vote
0answers
57 views

MySQL: What criteria should I base my table column order/arrangement/grouping on?

Does the order, arrangement or grouping of columns with large (such as long text descriptions) and small (such as bit and tinyint) field types have any noticeable impact on MySQL (InnoDB engine) ...
1
vote
1answer
52 views

Is this table designed properly

I am trying to model the process of where one co-worker enters a statement of their proposed work procedure and another co-worker commenting and approving the statement. Currently I have one table as ...
1
vote
2answers
81 views

Foreign key constraint based on conditional column

I'm trying to figure out the best way to handle this situation: I have a table set up as follows: LEARNING CONTEXT ================ LearningContextID - INT - Surrogate Primary Key EntityID ...
0
votes
3answers
77 views

Is it good practice to create new tables for new elements in a database?

I am trying to create a good model for a database that I need for an application. The way that I have tought about realizing it involves creating a new table for each new element that is added, but I ...
0
votes
3answers
45 views

Comparing 1 Database with Many Tables to Multiple Databases with Fewer Tables in Each

What are the pros and cons to creating one huge database with numerous tables or better separating the data into many databases that each have fewer, more relevant tables? Are there server ...
1
vote
1answer
52 views

Product quantity bound to colors and sizes table structures

I've been thinking about how I'll be able to create products with sizes and colors which will match the max quantity of a product (or their total will be the max.quantity ). Let's say I got a product ...
3
votes
1answer
130 views

If all variables are a subset of the candidate key, is the database design 5NF?

I have a table called LogMessages, which has the following columns: Level A numeric value which represents Trace, Debug, Info, Warning, Error or Fatal Time A UTC time Message Foreign key to a ...
0
votes
1answer
361 views

Table Design - User Management

I have designed a database design for a simple User Management System, this system consist of the following things, User - A user may be a Vendor / Employee / Buyer. User - A user may have more than ...
0
votes
2answers
80 views

Database design for holding read/unread content state

In forum application I have member table and post table. What I need is to keep track of what posts have been read by which members. What I thought about is to have a junction table with two columns: ...
1
vote
1answer
178 views

Add a column contains a photo

I installed PostgreSQL 9.1 under Ubuntu 12.10 And now I have a table called property I want to add a field that can be used to store photo(link to the photo or import a photo into a column?) But I ...
0
votes
1answer
54 views

How can I design a database that easily lets me recreate historical snapshots

I'm designing a database for an accounting system. In the system there are companies, and each company has many contracts. Each contract gives a company access to products, data types, or both. ...
2
votes
1answer
37 views

Table Relationship cardinality

I am designing a database for my application, I got issue in implementing the following logic. A user may be a Vendor and also a Buyer. I have created a table for USER and created an another table ...
0
votes
1answer
49 views

Nullable One To Many w/Join Table - Indexing

I have a question regarding database design, I am working with PostgreSQL using Hibernate for ORM, the design I inherited includes the following tables users user_id (pk) user_name user_dob ... ...
2
votes
4answers
181 views

SQL Server: Database integration and synchronization

I have n SQL Server databases with the same data schema. On the other hand i have a web application that needs to retrieve, for some entities, the union of the information stored into the n ...
1
vote
0answers
68 views

How to manage primary key while updating [closed]

In the following table primaryKeyColumn is primary key. To maintain the data history I always uses the values with WHERE condition(WHERE StatusColumn=1) And will set the StatusColumn to 0 if the data ...
2
votes
3answers
151 views

Are 2+ Foreign Keys a Bad Idea in any Association / Junction table?

(First time poster, very very long time lurker. I cannot find an answer to this question anywhere, so I now come out from the shadows to ask the experts). Is a junction table with say 4 foreign keys ...
9
votes
3answers
413 views

Fastest way to change a 600GB table indexed key datatype from INT to BIGINT

I need to change a datatype from INT to BIGINT in a 600GB MySQL table. The column has a unique index. I might be good with unsigned INT, but I assume changing to that or BIGINT will be pretty much ...
0
votes
3answers
707 views

Database design to track student attendance

I was having a doubt regarding the design of a database table to track students' attendance. Currently, my table students have atleast 4000 students. Creating a database for attendance to track their ...
2
votes
1answer
87 views

Improving concurrency in MongoDB via sharding

Our current setup: Cluster of ~500 ec2 c1.xLarge worker nodes with 8 threads on each running scientific simulations Results temporarily stored at runtime on each worker node's local MongoDB, using ...
1
vote
2answers
98 views

Database scheme for product tracking

I'm in the progress of creating a separate login for users who want to track specific product shippings. So I got the tables: Products (Id, Name, Color, Description, ...) Used for storing the ...