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
2answers
17 views

Schema to make a Payment History/Viewing History

On some websites I have seen two history of events: Payment History and View/Watched History. I want to have both payment and viewing histories in my app, but I got stuck when I started thinking ...
0
votes
0answers
16 views

Unique indexes on table with multiple columns

I have a table called organogram: SHOW CREATE TABLE organogram: CREATE TABLE `organogram` ( `organogram_id` int(11) NOT NULL AUTO_INCREMENT, `locatie_id` int(11) NOT NULL, `afdeling_id` int(11) ...
-2
votes
2answers
25 views

How to write multiple select statements in Data flow task in SSIS [on hold]

I am migrating data from one database to another database using select statements in data flow tasks with conditions as shown below in the above case only first query is executing. Is there any ...
-1
votes
0answers
14 views

bi-temporal retroactive or proactive update

Show how the following updates, if applied in sequence, would change the contents of the bi- temporal EMP_BT relation in figure below. Also, for each update, state whether it is a retroactive or ...
2
votes
1answer
41 views

In SQL Server would misc pages be pushed out when an object grows within a mixed extent?

In SQL Server 2008-2012, objects (including tables) are first put in a mixed extent. An extent can accommodate up to 8 pages and accommodates more than one type of page (meaning: pages from more than ...
-2
votes
1answer
35 views

Design database for tournaments

I'm looking around since few days on how should I build my database to support full flexible tournaments. Let me explain my specs. As a user I want to : Create a tournament Let other users register ...
0
votes
1answer
13 views

sub and sub-sub item organization system [duplicate]

So I am looking to find the best database design for the following situation. I will refer to my entities as 'articles' as that would best/most-easily describe them. So the articles have already ...
0
votes
1answer
24 views

Make 3 separate tables, or 1 combined table for similar data?

When designing a database's structure, if we have multiple tables with similar data, should these tables be combined, with an added ENUM field to denote the table type; or should 3 separate tables be ...
0
votes
0answers
22 views

Database design trouble for survey application

I'm having trouble figuring out how to design database tables. I'm going to have a table employees which has the employees' information such as names, age, email, etc. It is going to be an ...
1
vote
1answer
15 views

Drill Down Functionality for Data Entry in Database

I am building a database that houses financial statement data. Within the database and to maintain the relational model and data integrity the fields are standardized. However, I do not want to lose ...
0
votes
0answers
13 views

Two id columns in one detail table

Let's I have two tables(I have removed some columns for brevity): ADULTS -> ID CHILDS -> ID And I have one table which includes detials about these persons like that: USERS-> ADULT_ID, ...
-2
votes
1answer
44 views

how many database tables is too much?

I'm working on a project for a school and so far I have 91 tables! Everything is linked to the student table, is it normal to have this many tables in one database? or do i need to make multiple ...
0
votes
1answer
33 views

Finding the same value in a column and only returning rows without the same value

I have a query that i have to find the DiscountPercent that are the same and not show the rows with the same DiscountPercent. I have tryd this and it brings back the values that are the same SELECT ...
0
votes
0answers
9 views

Multiple M-M relationships between tables

I am working on the design of a new database. In this database, we track equipment corrective actions (repair). We have three personnel fields in each Equipment Corrective Action record: initiated ...
0
votes
0answers
19 views

Need a table schema for general store app [closed]

I am Developing one application for online general store and stuck some where near making a schema for the products. Here, Every Product has brands and Product can come in multiple varieties like for ...
0
votes
0answers
18 views

master-slave vs masterless architecture [closed]

As per Riak's doc "Most relational databases leverage a master/slave architecture to replicate data. ... Conversely, Riak uses a masterless system with no single point of failure, meaning any node ...
0
votes
0answers
20 views

How do I define a 'flexible' relationship in my table?

I'm working on a large application, with tons of tables and a huge codebase. It's a system in which people have rights to use functionality X and/or functionality Y and/or functionality Z. ...
0
votes
0answers
15 views

Use ID from another mysql database?

I have a mysql database for form submission (written in PHP) data and a mysql database for CRM (using X2CRM) on the same server. When a form is submitted on my website the POSTed data of the form ...
0
votes
1answer
32 views

Guidance in creating a database for parks division attendance data [closed]

We(group project) are trying to design a mysql database for our client which is a division of Off-Highway motor vehicle parks. Our client keeps tack of attendance data by month of many different ...
0
votes
0answers
11 views

Help in Designing a CBT database

Please i need help in modifying or remaking the database so that i can mark answers to questions immediately. The problem is some courses have 50 questions, while others have 100. How can i design ...
0
votes
1answer
40 views

What will be the Better database design for following table? [on hold]

I am designing database schema for bulk mail system. campaign table is used to store the campaign details. Table Campaign ...
0
votes
1answer
51 views

Normalization for three somehow identical tables

These three tables are nearly identical. But, there are some exceptions. But, I can't find best normalized structure. Could you please help me? Here is the informations must be hold in database: ...
0
votes
1answer
27 views

document and edges in orientdb

I was playing around with OrientDB lately and was create some classes and edges. I was able to create edges between documents, is this something that is expected from OrientDB when edges are ...
0
votes
1answer
13 views

GROUP BY parentId and MAX childId

My tables are below: crm_conversions crm_messages_of_conversions crm_receivers_of_messages I want to get all of conversions of an user with only last message. I'm trying to get with the query: ...
0
votes
1answer
34 views

Trigger function check if all NEW.* fields exist in another table

In PostgreSQL I need to code a trigger function that checks if all the fields in NEW.* exist in another table that has the exact same name as the table that fired the trigger but appended with "_hv". ...
0
votes
0answers
6 views

Access 2010 Forms not seeing imported data

I created a form that has several sub-forms. During testing with sample data everything works great. I can switch between sub-forms and all the data is correct. I deleted the sample data and imported ...
0
votes
0answers
10 views

how to enable powerdesigner 16.5 auto increment primary key for MySQL database

I am using powerdesigner 16.5 to model my MySQL database. Anybody knows how to enable its auto-increment primary key feature?
0
votes
0answers
22 views

how to resolve this insurance company database

Company offers 3 types of personal motor insurance to vehicle owners. It includes the third party insurance, fire and theft, and comprehensive cover. All vehicle owners need to purchase a motor ...
0
votes
1answer
12 views

Store data of feedback form

I am a novice at database management and doing a small project on Feedback System. My question is that I want to know that how i should store the data of feedback form. Suppose i have different ...
0
votes
1answer
70 views

Most efficient way to set up a database handling millions of links? [on hold]

I'm looking at making a site that will potentially have up to a million users, and each user will have hundreds/thousands of links connected to a set of sites, as well as other info. I'm using mysql ...
0
votes
1answer
41 views

Maximum Partitioning PostgreSQL

I have 400,000 records I need to partition. The records will increase 100,000 per year and those new records might need to have 1000 new partitions added. Here are some of my concerns: How many ...
1
vote
2answers
70 views

How to enforce data consistency across one-to-one relationship in an inheritance hierarchy

Consider this design for a typical school database: Person: ----------------- FirstName LastName SocialSecurityNumber Phone Email Student: ----------------- Grade Teacher: ----------------- ...
1
vote
0answers
20 views

Finding missing_index_details in MySQL

MS SQL Server apparently can tell you what indexes would be useful for your query. Is there anything similar in MySQL? This article (scroll to "Find missing indexes") says that in Microsoft SQL ...
1
vote
1answer
29 views

Automatic deduplication (normalization) of strings in MySQL

The question is whether MySQL can use separate physical storage for strings transparently, but with the same operations that are applicable to varchar, including %. I have a large number of ...
4
votes
1answer
51 views

Does MySQL exectution plan depend on available indexes?

Does MySQL choose an execution plan for a given query taking into account what indexes are available, or does it first choose an execution plan and then uses indexes if they are available? ...
2
votes
2answers
44 views

Unique across tables

I have a table containing users. Each user has a primary email and a flag indicating if the user is deleted or not (we never hard-delete users). However, each user can also have additional emails. ...
0
votes
0answers
23 views

Relationships for database tables in HR/Compliance Database using MS Access

I am designing a dual HR and Compliance Database and am stuck on how to relate 3 specific tables. I have an Incidents table that tracks incidents, a Review table that shows data collected from reviews ...
2
votes
0answers
12 views

Counting daily distinct records [duplicate]

I have a table that looks like this in Google Big Query: custID InteractionDate Purchased? Sales 1 20150312 F 0 1 20150312 T 200 1 ...
1
vote
1answer
24 views

Should my application utilize database credentials for user login?

I'm working on an application that has an ASP front end and a SQL Server database. The way credential management is currently performed is there is a custom built User Table in the database that ...
2
votes
1answer
38 views

Why wouldn't I put the single preferred option into its own table, instead of having a 'Preferred' column?

In similar spirit to How to implement a 'default' flag that can only be set on a single row I would like to specify that, for any given list of possible names for a business, only one of the ...
0
votes
1answer
26 views

EAV table question

What's the best design for taxonomies in EAV tables? taxonomy id autoincrement name unique terms id autoincrement tax_id references taxonomy(id) name text unique value text ...
0
votes
2answers
19 views

ERD Design for Campground and Campsite

I am designing erd for campground and campsite. In general, a campground has many campsites in it. that lead to one to many relationships. but sometimes campsite has no campground, it appears as the ...
1
vote
1answer
39 views

Database design - Projects with multiple Clients but only specific client contacts

I am in the process of setting up a database that among other things will track projects, clients, contacts. I am however stuck on how to design one piece of relationship. The part of the database ...
0
votes
1answer
34 views

Should I have a parent table with only one field?

My database has multiple tables that all rely on dates. I was wondering if it would be smarter for me to take the date attribute and throw it in a parent table, rather than give each table a date ...
1
vote
1answer
48 views

Consolidating 2,000+ databases into a single database with up to 20,000 concurrent users [closed]

About us I'm just putting it out there as we're currently in the process of developing a new version of our software where all customer data is held in 1 database as we've previously held all ...
0
votes
1answer
32 views

database design question - How to make the table 3NF and have no orphans

I trying to find out what is the best way to build schema for port-nic associations: I am storing all information about ports (e.g eth0, eth1, lo0, lo2 of a Linux pc) in a table called ports and NIC ...
1
vote
1answer
38 views

Best away to keep monthly records of loans

I'm trying to make a database to keep records of the amounts payed on a loan on a monthly basis. I already have tables for the clients, accounts, products and loans: create table product( id ...
0
votes
0answers
23 views

Are these One-to-Zero-or-One relationship correct?

I'm working with SQL Server 2012 and I have these three tables: CREATE TABLE [dbo].[CODES] ( [CODE] [nvarchar](20) NOT NULL, [ ... ] , CONSTRAINT [PK_CODES] PRIMARY KEY CLUSTERED ( ...
0
votes
1answer
68 views

Is an ER diagram an example of a conceptual, logical or physical schema?

I have been reading databases, and I clearly understand the difference between a conceptual, logical and physical schema. An ER diagram is an example of which of these schema's?
1
vote
1answer
33 views

Warehouse Database Design Question

Apologies if this has been answered previously but I have been unable to get a specific model to work. I have a database table that needs to store some very basic info for a reporting system. The ...