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
1answer
38 views

pass data from deleted table to another

This is the situation: I have a table, with name TABLE_1 I would like delete TABLE_1 and then create another table with the same name and some of its columns. TABLE_1 has records, but I need to pass ...
0
votes
0answers
39 views

performance questions in database design

I need to describe a set of studies that are practiced to a patient, every patient have a "Clinical History", that are described in another table called "Clinical History Lines"(hclines) Every visit ...
1
vote
3answers
232 views

Heterogeneous ordered list of value

I have the following object model: class A { List<Thing> orderedListOfThings; } interface Thing { } class X implements Thing { int attr; } class Y implements Thing { String ...
0
votes
1answer
51 views

DBF corrupted database

I'm in great trouble here. I'm using Microsoft Visual FoxPro 9.0 on my Windows 7 machine. I had some DBF files which was created in MS Visual FoxPro. The files were undoubtedly valuable since they ...
0
votes
0answers
20 views

What is the optimal way to get a tabular view from an Entity-Attribute-Model table?

Following up on my previous question, I have created a table for storing measurements of different physical quantities. The schema looks like this: CREATE TABLE sensorreadings ( time TIMESTAMP, ...
0
votes
0answers
70 views

Database design for large incoming data

I've been tasked to design a database to handle a large volume of incoming traffic from sensor readings, possibly 1,000s an hour when it's at full strength. Each reading will be relatively short - ...
0
votes
1answer
84 views

How to model when you could have many (thousands of) attributes to a table (product)?

We have a main table, let's say, Product. It has several general attributes like 'Product Name', Manufacturer ID, etc. As of now, all these attributes are implemented in the data model as columns to ...
1
vote
1answer
122 views

Handling a chat room in a database

I have been searching all day to find a better answer to my question but those I found was useful but do not critically analyse my question. I am building a chat room using php, mysql, jquery and ...
0
votes
0answers
94 views

How to share Users table between Clients and Customers?

I have a rental system where the system admin can add clients and their users. Each client's user can manage products, categories, orders etc., as well as their own customers. However, while ...
0
votes
1answer
77 views

Mixed search in multiple columns

I have a table which has a particular column of type JSON, where some user's contact information are stored. I can alter the table and add new columns with cached values to increase search performance ...
0
votes
0answers
35 views

employees Evaluation System database

I am new to database designing I want to design an Employees Evaluation System for a company. Based on Competencies Rating Each Manager will rate his/her employees at the end of each year for 6 ...
1
vote
2answers
97 views

getting one day timestamp in mysql

Please consider the following stored procedure I have: ORIGINAL Stored Procedure: -- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments ...
1
vote
1answer
138 views

Enforce referential integrity between two groups of data

I have two sets of records: A collection of rules. A collection of actions to perform based on those rules. What I'm trying to model is something like this: Multiple rules can be grouped ...
0
votes
2answers
33 views

primary_key problem in MySql view

I have 3 tables. and I want to create a view. There is no problem about generating SQL qeury and creating a view. but when I want to use this view in my web app it says me (LIKE THIS): "your view's ...
0
votes
1answer
86 views

SQL or NoSQL for structured clinical data [closed]

I'm designing a database for a primary health center, the idea We basically have a Patient with many Encounters, also the Encounters have to be entered from different Users (Health Professionals). ...
1
vote
2answers
380 views

Optimizing large MySQL SELECT WHERE IN clauses

How can the following SELECT WHERE IN case be optimized? I have a table with over 100 million rows with only 3 columns. The primary key (col1) is a 127 varchar. I am performing a SELECT col1 WHERE ...
-1
votes
1answer
136 views

database normalization to 3NF [closed]

I am just at a complete lost. I need help with this. There should be 12 tables (or perhaps 11 since one table has just a single attribute) when you are finished with the normalization and merging of ...
2
votes
0answers
30 views

How do I design a database for different sets of measurements on different subjects?

I'm conducting a research project that consists in sampling different physical quantities on about 30 buildings, most of them single-family houses. Some of those physical quantities will be common to ...
1
vote
1answer
21 views

Datatype for different categories in a database

I have got the following categories for accounting and cash flow purposes: Equity Contribution Distribution Valuation Debt Issuance Payment Valuation Allowance Interest ...
0
votes
2answers
32 views

Design for table with multiple links to other table

I am designing a database to keep track of our network equipment. My db has 2 tables: sites & circuits (circuit = cable) & (site = property location) Each circuit runs between two sites, so ...
1
vote
1answer
175 views

Update new column with value from old columns for all the rows

I've got an odd db design in place that was here when I got on my new work space. We have a column named params which contains some string data which appears that it belongs in more than one column, ...
0
votes
0answers
67 views

set error message on out variable in mysql stored procedure

I have a stored procedure: fill_DATA (serial varchar(20), OUT oError) I am doing an Insert operation here. so what I want is to SET value of oError for any error message in case the query fails to ...
0
votes
0answers
67 views

MySQL Table with 568 columns: 1118, 'Row size too large…'

I'm currently migrating a database from Oracle to MySQL5.6. One table consists of 568 columns. When atempting to create the table I received this Error 1118, 'Row size too large..' I already ...
1
vote
1answer
79 views

Data modeling with many attributes where few apply to each record [closed]

I'm pretty new to data modeling, so please excuse me if I've missed something obvious. I'm trying to decide on a schema (or possibly a DBMS) to work with some data where there are quite a few possible ...
1
vote
1answer
147 views

CRM Address table and it relation

Hi I want to ask about I have this DBD for my CRM I am trying to have the addresss in one table(customer and Employee Address) and both customerID and Employee ID are guid I have in address table FK ...
0
votes
1answer
68 views

Pros and cons of master status table vs private status table?

I am the only DBA at our company and am relatively new in the profession (having 2.5 years of experience now). The developers and I are currently having a discussion about how to properly design the ...
4
votes
2answers
169 views

Database instance and database

I did some research and finally came to this conclusion: Database instance = processes + memory Database = (physical) log files + control files + data files. Is this understanding correct? ...
0
votes
0answers
108 views

Uploaded files corrupted except txt/csv

I have an ASP.NET MVC 4 Application with standard CRUD functionality plus a file Upload capability. Currently I am struggling with the files being corrupted after the download. I created a ...
0
votes
2answers
101 views

Are #tables and #procedures 'not best practice' or 'bad practice'?

I am working on a project and part of it is an interface tool that executes SQL code stored in a xml file to import/export files. In the file, temp procedures and temp tables are used quite heavily ...
0
votes
0answers
55 views

Having a Table to store information about “Feedback”/“Enquiry”/“Complain”

I am creating a database for an application and I want to be able to capture feedback information (Enquiry, complains or comments) from users using a form. My question is : Do I have to create a ...
2
votes
1answer
104 views

How do I add versioning to this CMS I'm designing?

As you can see, my CMS consists of several widgets (for example an Articles widget), of which you can create several instances, which I call blocks, and those blocks are linked to pages and the ...
0
votes
1answer
26 views

single table or different tables [closed]

I am very new to PHP & Mysql. I am currently working on database structure of website. I have been a keen follower of this website. I have found that many posts have discouraged use of multiple ...
0
votes
1answer
75 views

Optimization for 100 GB Real-time info table

I have a table of device information feed which is filled by data from remote device units. There will be like 1000 units each sending an update per minute which will be stored as a row in that ...
1
vote
1answer
213 views

Time series and gap filling

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. ...
-1
votes
2answers
40 views

query multiple unrelated tables

Just learning mysql and db so guess this is a general schema design question. Say i have 10 different types of widgets and each widget transaction has a date, amount and 8 other unique columns to that ...
1
vote
1answer
90 views

Personal and Global messaging database design

I am trying to implement a database design system that will be sending messages to a person(thus 1 to 1) or many persons (1 to many). table --users |u_id | Name | | ...
1
vote
3answers
131 views

Relational Database design best practice

I am a student and I am trying to design a simple database, so if the ideas seem bad please let me know how to improve. I have three tables in my mind, one for Professors and one for Students. Both ...
1
vote
1answer
35 views

Understanding how relationship sides works

So, I have this relations on my tables (see image) and I need to understand some things. I'll enumerate what I understand and what I need from yours is to say if I'm right or not and in case I'm not ...
0
votes
0answers
542 views

eCommerce product table design - MySQL

I am designing database for an web application, I have designed the product and specification details database as follows, create table pr_size ( size_id int not null auto_increment, ...
0
votes
1answer
21 views

compare file-based systems and a relational database

I don't know the exact difference of both can you please compare file-based systems and a relational database?
0
votes
1answer
134 views

Duplicate Relationships in Rails/MySQL Healthcare Application

Overview of the Application I am building a Ruby on Rails application to organize medications, using MySQL. The goal of this application is to provide dosage specific treatment recommendations, and ...
0
votes
0answers
29 views

Redesign tables, multiple foreign key and related table to same table

Hello I have this database: Table Teams is used in each one table. Match table contains teamA and teamB and round contains team that win the SET and team that start the set. But I dont know how I ...
0
votes
1answer
80 views

How to model ski rental equipment

I've spent a good amount at time at looking at related posts regarding products for rent but still have a few unanswered questions. If we consider the just the requirements at hand which is how to ...
0
votes
4answers
300 views

Database/Storage engine suggestion for a project involving heavy inserts?

I am looking into a project which involves large number of inserts daily.I will have a list of user's (for example a user set of 500k ) , for which I need to monitor daily certain activities ...
2
votes
1answer
72 views

Table income and expense is better to have it together or apart

I am developing a small system where I have to record incomes and expenses of the company, and even I can not determine if the income and expense table should be in one table or in separate tables. ...
1
vote
1answer
52 views

How to create trigger with NOT FOR REPLICATION

I tried adding "NOT FOR REPLICATION " in many parts in the below code but ended up in the below code. I searched a lot for an example where I can see how its done with a trigger. Can any one show me ...
0
votes
2answers
58 views

One table with a flag or two tables

I have a problem with the design of a database: In my Android application i need to store the upload (the status, so if the file is in upload it will report the % of the upload) of a file and a list ...
0
votes
1answer
34 views

Need DDL for an Oracle Table that would be 1 row = 1 8K Block

For performance testing in our performance environment we want a means to turn over SGA the way production does. Our performance environment is a fraction of production and production's very nature ...
0
votes
1answer
144 views

Best relationship database design to manage types for different entities

Suppose we have to manage phone types for: Clients, Employees and Suppliers. Each of these can have multiple phone numbers, so for better management I would like to add phone type. Each entity can ...
1
vote
1answer
119 views

Difference between Relational database and time series database?

I have a bit stupid question maybe. I recently came across a term "time-series database". I would like to ask what is time series database and is it same as relational database? Thanks,