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

Database design : hotel room and its detail

Right now i'm creating DB schema for a hotel. I stumbled upon on my hotel rooms table design. The requirement of hotel rooms would have data like : columns like room_type, room_size, room_number. ...
0
votes
2answers
66 views

Database design: same products in inventory but with different cost

I am trying to design a database for a Stock and Sale System and I have the following issue. Suppose there is an item in stock that costs $ 100 (product cost, not the selling price), but there are ...
0
votes
0answers
8 views

CROSS JOIN and updatable model design for Ruby on Rails [duplicate]

I am trying to build the multi-level model in rub on rails to allow the following to happen: When a user creates a campaign they will select some categories and some metros from tables Category and ...
0
votes
0answers
34 views

Multi-Tiered Database Design Issue

I am trying to build the multi-level model as demonstrated. When a user creates a campaign they will select some categories and some metros from tables Category and Metro. Those selections will then ...
0
votes
0answers
27 views

Shared measures in fact tables

I'm working on a star-schema and trying to find a best practise for the database design. I have three (at this moment) dimension tables for several facts. Most of the facts look-a-like (meaning ...
1
vote
1answer
23 views

different log file for master and beta mysql

Hi i am facing a problem while shipping my database log I have three database server dev, beta and master and i maintain log files for dev on github and every log file has a version given to it like ...
0
votes
1answer
15 views

updatable entities in the design of databases

I have a question on Entity Relationship design. It is a shop where products are kept in stock first and then go to the store. When the store has less than a certain amount of product, products that ...
0
votes
1answer
22 views

Schema for a reservation system

I'm working on a reservation system schema and have some problems defining availability of resources. I searched for similar question here and on Google but still don't have clear understanding My ...
0
votes
2answers
54 views

Best Way to Migrate 100 tables To New Database

I need to migrate 100 out of 150 tables (data and structure) and everything else (sprocs, views etc.) to a new empty SQL Server database. I have been using the Import/Export wizard and it has been ...
2
votes
1answer
72 views

Optimized table design

I am building an advertisements system for websites ( a plugin for a framework ). I am not quite sure how I should set up the table in terms of indexes. Basically there are two options for billing - ...
1
vote
2answers
30 views

Architecting table with multiple paths to common parent tables

I'm wondering how to architect a database when there are multiple paths (via foreign keys) to a common parent table. For example I have the following tables: Table: Students PK StudentId Table: ...
0
votes
1answer
25 views

Cyclic relationships in ER Diagrams

I am trying to draw an generic entity-relationship diagram to model a software object (Let's say a xml file). This xml file has references to other xml files. Also if a xml file (say "file-A") is ...
-2
votes
1answer
53 views

Enterprise database design [closed]

we have customer who want to make some product like this or more specifically she needs replica of this product which is a generic inventory,product,customer etc management system. And the reqirement ...
6
votes
2answers
191 views

Is my understanding of Fact table granularity correct?

Myself and another DBA at our company are tasked with reviewing a database design that a vendor has developed for us. The vendor has said they use Kimball as the basis for their design. (NOTE: I am ...
0
votes
4answers
82 views

SqlServer: can one table's PK be the FK of other two table's? [duplicate]

I have three tables project, users and proj_user. The PK of proj_user table is the FK of project and users table's pk e.g.(project_id,user_id) My question is, is it possible for the project_id and ...
1
vote
1answer
64 views

Friendship and Messages in a MySQL table relational schema problem (concerning big data manipulation)

Before you start suggesting this question for duplicate read it, I have searched and i haven't found any proper solution. So, i'm building a social networking site (I know that you are laughing ...
0
votes
3answers
42 views

Column A or Column B required MS Access DB

I'm in the situation where I would like to enforce the requirement where a record must contain either one column or another at a data level, I'm not sure whether it's achievable. I've got an Enquiry ...
3
votes
2answers
44 views

Fetch all words from column with like

I have a column with description and inside it can contain # value . what I want is all the words searched from that column with #tag This is my query SELECT description FROM photo where ...
1
vote
0answers
56 views

DB Design: Looking for Performance improvement with a Column used in all SQL Queries

I recently got added to a new ASP .NET Project(A web application) .There were recent performance issues with the application, and I am in a team with their current task to Optimize some slow running ...
0
votes
0answers
28 views

SQL query to fetch results for multiple many to many relationship tables

We are developing a database for storing licensedetails of source code, archives, shareobjects, binary. We parse a detailed build and extract list of source files that make objects, list of objects ...
0
votes
1answer
30 views

Design for an Asset Management System

I'm attempting to design a database to track IT Fixed Assets and Consumable Parts; what is the best practice for this? Should I design separate tables for Fixed Assets and Consumables, or should I ...
1
vote
2answers
178 views

Relational Model vs. Database Products [closed]

The formal Relational Model (logical level) for databases is not exactly the same thing as you get with MySQL, Oracle or other major products / implementations of ‘relational’ database management ...
0
votes
3answers
29 views

What's the proper design for the table that will hold the processor load stats?

Let's say that I need to implement a widget on the site that allows the user to view the processor load stats via a chart. The user will be allowed to choose how detailed the statistics are: with ...
2
votes
2answers
238 views

Separate table for 'scheduled payments' and 'completed payments'?

In a previous financial payments related database I'd worked on, it just had one large transactions table. We would insert scheduled transactions for the future, and when that time came, we'd execute ...
1
vote
1answer
68 views

use of crows foot or chens notation to draw an extended ER diagram

I am trying to understand if we can use crows foot or chens notation to get an extended ER diagram. or does extended ER diagram has its own notations that should be used ? From what i understand, ...
0
votes
0answers
13 views

Design and queries for analysis of event-sequences

I will have to store sequences of events with certain properties in a database (MariaDB preferably) and I have some issues regarding the design and queries. The crucial part is the analysis of the ...
0
votes
1answer
60 views

When to use a multidimensional relationship in an ERD?

When to use a multidimensional relationship in an ERD? My textbook is in Dutch, and the two paragraphs that explain about multidimensional relationships is too vague and brief. I don't understand when ...
1
vote
2answers
34 views

DB for storing simple time-stamped values

I don't have that much experience in databases but I need to accomplish this as best as I can. It is rather specific. Database will contain only data structured like this: dataID-timestamp-value ...
0
votes
0answers
58 views

Suitable database to store GPS track data

I have a network of vehicles. Each vehicle is equipped with a GPS sensor sending data over 3G to my FTP server. As a first solution to test the sensors, each vehicle sensor sends a .csv file to the ...
1
vote
1answer
62 views

“Transitive” keys

I have a central table, A, which will have a key that I'll call A_ID. Now, I have a table B in a "one to many" relationship with A (many B's map to one A). Each link will, of course, have a link ...
0
votes
2answers
167 views

How to represent foreign key in an ER diagram?

Suppose I have a 'Transactions' table which has a column 'Customer ID' (Foreign Key) and a Customer Table having 'ID' (Primary key). How do I show the relation between the two tables and showing that ...
0
votes
0answers
21 views

Architecture for huge catalog of products

I need to upgrade my current system of product catalog. For currently I have a 12 000 items in catalog, it's not a lot, but I need to improve them for feature. I have a task to reorganize my database ...
1
vote
1answer
115 views

Execution plan index suggestion - difference between similar queries

I am trying to analyze queries on this table: CREATE TABLE [dbo].[Values]( [tid] [smallint] NOT NULL, [t] [datetime2](3) NOT NULL, [v] [real] NOT NULL, CONSTRAINT [PK_Values_Unique] ...
1
vote
1answer
74 views

How to improve this product rental schema?

I have a rental system where each product's stock item can be rented from a location and returned to a different location (think Alamo, Hertz etc.). When saving an order, first an inventory event is ...
1
vote
1answer
71 views

MySQL - varchar length and performance

Is declaring VARCHAR size make sense for performance? Is there any difference (in speed) between VARCHAR(50) and VARCHAR(255)? Or defining length is logic/design constraint?
2
votes
1answer
119 views

Peer Review of Database Design

I'm working on a movie inventory database. This is a personal side project for me. I can use what I have, but I would like to make it the best design that I can while learning more about databases and ...
0
votes
1answer
26 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
32 views

Completion of ERD, uncertainties about generalization/specialization and primary keys [duplicate]

I'm practicing making conceptual databases and I would like to know of I'm on the right track. I've been trying to create an ERD for a scenario as follows: A hotel can take bookings for weddings, ...
1
vote
1answer
30 views

Building dependence between regional data (Street -> City -> PostalCode -> Country)

I'm in the process of designing a database to contain regional data to be used inside a CRM system. So, a user suspects that things like the city or country are automatically filled (or maybe just ...
0
votes
3answers
78 views

Completion of ERD, uncertainties about generalization/specialization and primary keys

I'm practicing making conceptual databases and I would like to know of I'm on the right track. I've been trying to create an ERD for a scenario as follows: A hotel can take bookings for weddings, ...
1
vote
2answers
34 views

Need database design advise

I attached the DB schema, so it will be simple. Problem: Need to get the item records from the company e.g. 'A'. Should I add to the item table company_id field? Will it be a redundancy info as we ...
1
vote
2answers
57 views

Database Design for Preserving Values and Additional columns

My colleague and I are having some trouble coming up with a database design, and I am doing my best to stay away from EAV for now. We have an entity called Preparation that stores configuration data ...
0
votes
3answers
58 views

Best way to create relationship between multiple tables

I have a question about how to best handle a table that would be shared among multiple relationships, but shouldn't really be joined with all these tables. For example, suppose I have a table that has ...
0
votes
0answers
28 views

many to many relationship tables for four or more master tables

We are developing a database for storing licensedetails of source code, archives, shareobjects, binary. We parse a detailed build and extract list of source files that make objects, list of objects ...
1
vote
2answers
182 views

Best practice database design - user rating tables

I want to create a table to store user ratings of items for collaborative filtering algorithms. So far my table looks like this: IID | UID | Rating i.e. item ID |user id |rating. From ...
2
votes
2answers
101 views

SQL order by query results in any arbitrary (but reproducible) manner

For testing purposes I need to get some data from a set of database tables in any arbitrary (but reproducible) order. The idea being that I can later compare two runs using a textual diff tool. Is ...
1
vote
1answer
36 views

Multiple User Types - DB Design Advice

I'm developing a web application that will support user authentication with corresponding roles for each user. Also, my users can be of different types and have different fields associated with them. ...
0
votes
1answer
76 views

Complicated data

I have a requirement i got from my father. He gave me a table and wanted me to digitalis it. So that he can the system can do all the dirty jobs for him ( that's why there are developers in the world, ...
2
votes
2answers
172 views

Disable all constraints and table checks while restoring a dump

I've obtained a dump of my PostgreSQL database with: pg_dump -U user-name -d db-name -f dumpfile which I then proceed to restore in another database with: psql X -U postgres -d db-name-b -f ...
0
votes
0answers
171 views

Need Help in DFD Diagram for online hotel booking system

Hi friends, I am creating a data flow diagram for online hostel booking system. not sure if i created a correct diagram or not any help would be appreciated. thanks in advance