Tagged Questions

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

Postgres table contains 1 column, and that column is PK. How to insert new record?

In my application, I have an abstract base class, and 2 derived classes. The number of derived classed will probably not increase. If it does, it won't be more than a few. The class structure looks ...
0
votes
1answer
44 views

ERD Design for Employee Leave

I found the following ERD design: Which trying to capture as much information about employee leave (i.e sick, travel, etc). What am trying to understand is what does the columns: Table : ...
1
vote
1answer
14 views

Schema Design Inquiry

In a timesheets data model, suppose I have an employee table, and a job table. Then, I also have an employeeInJob table to store an employee's rate for a given job e.g. employeeInJob ( ...
1
vote
1answer
73 views

Help in designing mysql table for large project [closed]

I am planning to create a website which allows different Companies to register in it. It will have Employees module. Each company will have a CompanyId. How do I maintain the Employees table, since in ...
0
votes
0answers
24 views

Two types of rows with mutual fields and unique fields

I have a question about DB design. (MySQL) In my website, users can leave reviews for Stores and Products. Right now, there's a table for stores and a table for products. Each item ('item' = either ...
0
votes
2answers
35 views

Design a Lab Report tables [closed]

I need to design tables for a laboratory test. I will have Lab test name, and its component to be saved. The component can be changed with time. I need to design a UI for update. Also each ...
0
votes
1answer
46 views

How do I organize tables for simple lottery game? mysql [closed]

I am building a simple lottery web game that will let users pick a number that is in between that weeks given range. A number will be randomly select to determine the winner. I have a table for users ...
0
votes
2answers
44 views

How to configure Standby database in oracle for read/write

I have configured a physical standby database in Oracle 11gR2, and the standby database it's working fine. All the changes in the principal database are replicating to the standby database, the ...
1
vote
1answer
36 views

Database setup for datalogging

We're currently starting to build a version 2 of our system and one of the things we've noticed with version 1 is that we'll have quite a bit of data so we started to rethink our approach to how to ...
1
vote
1answer
44 views

Tables names in a supertype/subtype schema

I have 3 types of users in my app. The users share some common attributes, but they also have quite a bit of stuff that pertains uniquely to each user type. I have a person table that contains limited ...
0
votes
0answers
17 views

Merge colums from two different databases using phpMyAdmin

Is there a way to: Replace all the data from database1 > table1 > column2 With Data from Database2 > table1 > column2 ONLY under the condition that the ID value in database1 > table1 > column1 ...
2
votes
0answers
49 views

CouchDB and document versioning

I'm currently working on a wiki-esque application using CouchDB and am trying to implement a document versioning scheme. The way I see it there are two ways of doing this: Store each version as a ...
1
vote
0answers
58 views

How to represent directed graph with multiple parents?

http://dirtsimple.org/2010/11/simplest-way-to-do-tree-based-queries.html provides an algorithm for inserting and deleting from a Closure Table. I'd like to model a similar data structure, except that ...
1
vote
2answers
73 views

Unique column values between tables

I'm keeping track of teams and their members. Each team has one leader, one contact person, and any number of players, and each of them has a unique email address. The problem is that one physical ...
3
votes
2answers
53 views

I have this two models, which one is better?

what is a better design?? Model 1: +------+ +--------+ | type |-|--+ | Data | +------+ | +--------+ | id | | | Mach ID| | type | | | Time | | len | ...
0
votes
1answer
29 views

Is it possible to create this type of database for a massive forum? [closed]

Kind of like how craigslist you select a state, then a city, and you're in that community. How do I make my forum website's home page have 2 drop menus for a state and city, then it would bring the ...
0
votes
0answers
14 views

Handle a Search on 2 Big Tables

Hello i want to realize a exchange system with 2 tables. 1 Table for "the user is looking for" 1 Table for "the user has to share" the Tables are very simple id bigint user_id bigint object_id ...
1
vote
1answer
150 views

Database design for an online babyShop ,Toy shop

Hi i'm designing a database for a toy shop this shop offer many products with different categories. boystoys,girlstoys,puzzles,beds,stroller, etc i designed my database as it is consists of 5 tables ...
2
votes
1answer
46 views

Supertyping Inventory Transactions

I am trying to wrap all interactions with inventory items into one transactional table. Currently I calculate QoH by querying multiple fact tables (production, acquisition, shipment, return order, and ...
0
votes
1answer
69 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
87 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
39 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 ...
1
vote
1answer
25 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
16 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
28 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
59 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
75 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
40 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
30 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
57 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
223 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
84 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
74 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
50 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
47 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
58 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
32 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
41 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
182 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
31 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
268 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
85 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
14 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
63 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
36 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
84 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
776 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 ...