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)

3
votes
1answer
930 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 ...
-2
votes
2answers
46 views

UPDATE() Function (Insert and Update Triggers)

Is there a way to have the column name dynamic in this function? For example, passing a parameter to a variable named @FldName = 'Name'. e.g. UPDATE(@FldName). Basically, what I want to do is to have ...
0
votes
1answer
41 views

Ternary Relationship in ERD , What would the cardinalities look like in this situation?

I have 4 entities USER , COURSE , MODULE , TOPIC The Constraints go something like this. A Course contains one or more Modules and each Module contains one or more Topics Now, a User can study ...
1
vote
1answer
33 views

Alternative approaches to “primary” record in child table

I have a database with a Customers table, and two child tables Addresses and Contacts, as customers often have multiple locations and contacts. However we also need a "primary address" and a "primary ...
-1
votes
2answers
18 views

How can I create Data Base on phpMyAdmin?

I have a serious problem here. I am not able to create data bases as the option is not to be found on my phpMyAdmin, but it only shows 'No Privilege' in red font. I even tried to create data base ...
0
votes
0answers
3 views

SSMA not moving partition info from MySQL to MSSQL

I am trying to convert my existing database from MySQL5.x to MSSQL 2014. While all the table schemas gets ported from MySQL into MSSQL, table partition info are not being carried over. ...
8
votes
3answers
36k views

How to Handle TimeZone Properly in SQL SERVER?

My local development server is in the Middle East, but my production server is in the UK. I need to show the date to the user in their time zone. For example, if a user is in Saudi Arabia then I ...
0
votes
1answer
32 views

Big lists in a relational DB

I need to store a list of items and that list belongs to a single user. The lists are going to be huge, so this has to be done as efficiently as possible. The lists also have to be modifiable to a ...
0
votes
0answers
11 views

Dummy Objects vs. NULLs: optionality for three-way relationship

In a nutshell, I'm trying to model a relationship and can't decide whether to allow NULLs or to require values and use dummy objects (in place of NULL). Here are the details. I have three classes: ...
2
votes
0answers
14 views

Filegroup design for Document Table for BLOB Storage

I have a table for storing documents as VARBINARY types in my database (I'm not using filestream). My database is setup with only one data file, but I am wondering if there is a benefit to creating a ...
1
vote
1answer
70 views

How to manage many-to-many relationships when there is also a hierarchy among the many?

I have these entities – employee, task, phase, project – and these relationships: project 1:m phase phase 1:m task employee m:m task, phase, project The first two relationships form a ...
2
votes
1answer
53 views

Scalable Relational Database Design

I'm designing a web application (using Django) for a client that will need a fairly large database behind it. I've never worked with databases that handle large amounts of data before so I'm hoping to ...
1
vote
1answer
653 views

Time series and gap filling [closed]

I have to choose a database server for storing big time series data. Currently I use PostgreSQL, but I've found that Vertica supports automatic gap filling for missing data and that's really nice. ...
0
votes
1answer
40 views

Need help on a database model design

I am creating a small booking application with Laravel. It lists some centers. Each center has its own unique rooms. Each room may be booked several times (with dates). From my application, I post the ...
2
votes
1answer
20 views

Attribute-Attribute Dependency

So as part of our college project, I'm working on CENSUS Database. I stumbled upon a problem wherein if an individual is below the age of 18, his/her marital status should only allow 'NA' and anyone ...
0
votes
1answer
27 views

Usage of non standardized queries

So this is more of a theory question than practical but I'd appreciate any help. My friend and I are doing a project to learn new stuff and have fun. He's a coder and I like to think that I'm good ...
0
votes
1answer
37 views

How should I store changes to items in the database?

I have items (tracked with itemid) that have attributes assigned to them (field1,field1 for example). At any given time, field1=val1, field2=val1, ..., fieldn=valn where val1,val1,...,valn = 1..100. ...
2
votes
2answers
936 views

How to insert values in junction table for many to many relationships?

I have three tables in database: trips(trip_id(pk), trip_name(unique), user_id(fk)) places(place_id(pk), place_name(unique)) trips_places_asc(trip_id(fk), place_id(fk)) Since many trips can ...
0
votes
0answers
27 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) ...
1
vote
1answer
94 views

representation in ms-access

I have a database in microsoft access. I want to know how to look up a singular datum from a reference table giving a dynamic set of values. Here is a representation of what I mean: I have the ...
-1
votes
2answers
89 views

How to run multiple select statements in Data flow task in SSIS [closed]

I am migrating data from one database to another database using SSIS package and i need to write multiple select statements for same table depending on conditions as mentioned below. Actual Queries i ...
1
vote
2answers
48 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 ...
-2
votes
1answer
50 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 ...
2
votes
1answer
47 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 ...
0
votes
1answer
22 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
0answers
35 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
23 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 ...
-2
votes
1answer
69 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
0answers
23 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, ...
0
votes
1answer
36 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
17 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
22 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
24 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
102 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
1answer
173 views

Fetch data from database from multiple tables matching condition

I want to fetch data from the database. I have three tables in my database like listing_master_residential and listing_master_condo and listing_master_commercial. There are three tables and there is ...
0
votes
0answers
16 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
90 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 ...
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 ...
0
votes
1answer
55 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
1k 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 ...
4
votes
2answers
2k views

Ready-to-Use Database models example

Where can I find ready-to-use database models ? I don't need a database with data in it, but only schemas (UML diagrams). Perhaps something like the data models at this link, but much more complex ...
1
vote
1answer
1k views

postgresql bigserial or sequence using jpa

I'm a java developer working with jpa, before to define the indexes in my entities i would like to known which one is faster o better to use?.
0
votes
1answer
49 views

How to save the design of an Access database — not the content — as text?

How can I save the entire design or specifications of an Access 2007 database -- not the data content -- as text? I have fallen foul of the "Enter Parameter Value" bug whereby a query pop-up shows an ...
0
votes
1answer
15 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: ...
4
votes
2answers
1k views

Will table inheritance in PostgreSql suit this situation?

Let's start off by saying, I'm new to PSQL and coming from a MSSQL background. I'm starting to design a DB in PSQL. So my main aim is to have a Main schema in this DB, which I am going to use to ...
0
votes
0answers
9 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
52 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?
1
vote
0answers
26 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
32 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
77 views

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

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 ...