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
87 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
65 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
880 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
38 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
171 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
87 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
107 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
133 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
36 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
36 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
119 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
35 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
62 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
81 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
227 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
121 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
59 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
83 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, ...
3
votes
2answers
373 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
297 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
2
votes
1answer
39 views

Best way to design a database with one person with different roles

We've been browsing for a while looking for an answer to this, but any of them suited exactly my needs, I hope is a relevant question. We have a database for managing books. In this database, a same ...
1
vote
3answers
62 views

Best approach for Legal/Natural can have many Orders

I'm working on this model: where as you may see one NaturalPerson can have many Order and the same for LegalPerson the only difference between NaturalPerson and LegalPerson are a few so in that ...
1
vote
1answer
120 views

Calculating a running balance to store with transactions

I need to put a read-only copy of balance and transaction data from a legacy system, which will only be used to view/print statements. Balance | id | member_id | product_id | balance | | 1 | ...
1
vote
2answers
628 views

Online Hostel Management System ER Diagram

I have created an ER diagram for an online hostel management system. Please advise me if this diagram makes sense or needs improvement.
1
vote
2answers
90 views

How to architect an analytical BI platform? [closed]

I am working on a new BI project for a medium sized corporation. Right now there is no Analytical infrastructure in place and the reporting is done manually in Excel. There are a few different data ...
5
votes
1answer
110 views

Many-to-many relationship with attributes

I'm working on a project where I need a book database. The problem is as follows: A book can be related to multiple people (authors, editors, traslators, etc.). Then a person may contribute to ...
0
votes
2answers
55 views

How to store user's language knowledge (150+ languages) in mysql DB

Users in my website must be able to select languages they know (English, German, etc), so I have a table languages with 150 languages (id, name) and table users (id and a lot of other fields). ...
1
vote
3answers
88 views

Removing chat history for a particular user from database

I'm currently developing a web chat application using SignleR and SQL server this is my database schema so far I've added an option where the user can Clear Chat history for a particular ...
0
votes
0answers
55 views

Oracle 11 table design for better performance for reports?

We have a requirement to design a report page. A few factors we have are: number of fields in report is 70 computed fields is going to around 14*8 (based on toggles) a filter is going to have ...
2
votes
3answers
132 views

Tracking events in a task database

In designing a task database with the usual set of tables (Users, Tasks etc), I'm wondering if there is an accepted way to track changes to fields in the task table? I could just provide a text log ...
1
vote
1answer
39 views

Should I drop this column or is there a query that can achieve a results table without duplicate columns?

I use a column named active in several of my database tables to adjust whether a particular entry/row/user/etc should be included in future query result tables instead of deleting the information. ...
0
votes
1answer
26 views

Separation of users columns in another table

I've got a quite a lot of columns on the users table and I have been cleaning it up recently. Now since I'm searching over the users I figured it would improve performance if I separated verification ...
0
votes
0answers
14 views

How to model mappings at various levels

I'm trying to design the database model for my application and I'm finding it difficult to design the mappings for user access to various entities stored in the database. If access was only ...
0
votes
0answers
60 views

Storing DB credentials in an application source code?

I am making an app which connects to a DB, and the app will have plenty different userslogins. Is it a good design choice to have a specific DB login/password for the application, using which the ...
1
vote
1answer
68 views

Unique constraint to enforce max one null per item

I am using PostgreSQL 9.3. Suppose we are manufacturing some items of certain types, at any moment we are producing at most one item of a certain type. The following table captures our history of ...
1
vote
0answers
56 views

Relational or non-relational database for a system to pass objects on?

hopefully this is the right place to ask this kind of question. I am working on a system that focuses on helping people give away things that they don't use anymore. So, an object typically has the ...
0
votes
1answer
32 views

How to predict the growth of a PostgreSQL database

I'm looking for a way to predict growth of the database given its fields, indexes, constraints (as foreign key), number of lines, and so. I searched on Google, but I found only means to determine the ...
0
votes
0answers
36 views

DB design, when to split out into schemas

I am building a storage solution to store important themes/concepts referenced in books. At a high level the system will contain one or more catalogs and each catalog will contain one or more books. ...
0
votes
3answers
65 views

How to design database with january-december for every entry [closed]

Need help for designing my database, I have a table named transaction with columns: tr_id, item, item_cost, item_quantity, total and my problem is: I need to divide the item_quantity from january to ...
0
votes
0answers
13 views

How to test if a model is erroneous?

i am trying to realize why the following model is erroneous(or not). i am taking a database course and while i was studying I've found that model.
2
votes
2answers
34 views

Schema for storing historical data on shared identifiers

When user account is assigned an IP address, I create a table entry for the account/IP mapping. This data in the table is updated every 5 minutes. Right now I'm only keeping real-time data but I need ...
0
votes
2answers
47 views

What database should I use? [closed]

I am writing a log analysis program in bash. As part of it, I am compiling a list of known errors, so that I can search and reference those errors as part of the known list. I originally was going to ...
0
votes
2answers
53 views

Need Help maintaining multiple databases for a multi-tenant application?

i need some information about multiple databases for a multi-tenant application ? I am working on a project in which we are maintaining separate database for every company? The Companies Database ...
5
votes
2answers
50 views

How to enforce the structural constraints of rectangularly arrayed data?

(I'm particularly interested in answers that view the question below as a special case of the question: how should a RDBMS enforce structural constraints that are more specific than "one-to-many" and ...
0
votes
2answers
107 views

How to break table into two without losing performance?

According to http://stackoverflow.com/a/174047/14731, splitting away infrequently-needed columns frees up the cache allowing faster retrieval of the commonly-used columns. I've got a table whose ...
1
vote
1answer
53 views

Does a Key-Value type table still needs a auto increment key?

Suppose that I have a very simple table to store variable-like data, like this: +-----------+-----------------+ | key | value | +-----------+-----------------+ | site_url | ...
1
vote
0answers
75 views

How to handle many columns / variable schema?

I apologize in advance in case this question has been asked already. I'm working on revamping a reporting application used within my company. The requirements are: Support addition of new fields ...
2
votes
1answer
40 views

Hierarchy for dimensional model

I am trying to model a DW where I have many levels of geography (Neighborhood, District, City, State). I have several demographic data that should be included in the model. These data include count ...