I'm building a new database for a web-based application and find that I am frequently having to decide between flexibility of the model and meaningful foreign keys to enforce referential integrity.
There are a couple of aspects of the design that lead me towards writing triggers to do what FKs would normally do:
Parts of the model use...
I am working for a client that currently has a DataAttributes table with columns Name, Type, Value, and ParentID. This table is used to store virtually everything such as US states, anatomical items, combo box selections, and system settings. I would seriously like to get rid of this table and break each section into its own table.
Are ...
Here's a tricky normalization/SQL/Database Design question that has been puzzling us. I hope I can state it correctly.
You have a set of activities. They are things that need to be done -- a glorified TODO list. Any given activity can be assigned to an employee.
Every activity also has an enitity for whom the activity is to be perf...
I need to match the given words with their suitable meaning. Please help me as these words are very confusing to me.from " Unique identifier" to " Create-object operation", please find their meaning from a list given below.
Problem 1
For each of the terms in the left-hand column below, select the term in the righthand
column that best ...
Hey,
I have two types of accounts (customer and provider), I chose the single-table strategy for persistence. Customer creates Orders (one2many) and provider bids on the orders in auction style (many2many relationship, because he can bid on many orders as well as other providers). My question is, is it possible to have these relationship...
I am trying to figure out how you design data storage in a document storage system like CouchDB or MongoDB.
I don't use JOIN's anymore in my queries and just stick to searches for rows with certain indexes that meet my criterion. For example, I might look for recent comments (ORDER BY date) or all active users (WHERE status = 1). In ot...
I'm involving in kind of work that i think knowledge about large scale application, large scale web will help me much. What do you think i should take? I mean books to read, courses to take... etc...
Thanks in advance for any suggestion.
PS: maybe applications i mean are not large enough :D, kind of social network for >100k users or rea...
I have the followning tables:
Users
Organizations
Email_Addresses
Email_Address_Relations
Both Users and Organizations may have email addresses, which are stored in the Email_Addresses table and related to via the Email_Address_Relations table.
Structure of Email_Address_Relations
id char(36) NOT NULL
module varchar(64) NOT NULL DE...
I am going to design a DW and I heard about materialized views. Actually I want to create a view and it should update automatically when base tables are changed. Can anyone explain with an query example..
...
If I have a large table with a column which has a rather limited range of values (e.g. < 100), is it reasonable to divide this table into several tables with names tied to that column value?
E.g. a table like with columns:
table "TimeStamps": [Id] [DeviceId] [MessageCounter] [SomeData]
where [DeviceId] is the "limited range" column w...
Hello,
We have a Oracle 9i Database with 7 tables each with 15+ Million records. There is no relation between the table i.e. no foreign keys.
Here is an example of one of the tables
CREATE TABLE GSS.SHOWPD
(
INSERVID VARCHAR2(7 CHAR) NOT NULL,
CAGEPOS VARCHAR2(8 CHAR) DEFAULT NULL,
DETA...
This car dealer company has many branch offices. In each of these branch offices, some sales people are working whose job is selling cars to customers. You need to define your branch offices in your diagram. And also, you need to define sales people who are working in these branch offices.
- This company sells cars, so you must store car...
Objective:
The Leaves Management and Payroll system requires the official weekend hodiday scheme stored in the database to be referred to while generating the monthly salary for each employee in the organisation. Generating flexible Database Schema for storing the weekend scheme is the objective.
Problem:
The database schema should be f...
I have a table in SQL Server 2008 R2 consisting of about 400 rows (pretty much nothing) - it has a clustered index on the primary key (which is an identity). The table is referenced via referential integrity (no cascade delete or update) by about 13 other tables.
Inserts/Updates/Gets are almost instant - we're talking a split second (a...
I'm curious if anyone has implemented or even knows of any bitemporal databases built on NoSQL platforms (e.g., riak).
...
I'm working with a legacy application with surprise surprise, next to no useful documentation on naming convensions or over all data structure.
There are similarly named tables in the database with one of them ending in HX. Does this hold any significance in anyones database experience?
The data seems to be replicated so I would assume...
Hello,
I have about 50 discrete boolean values that I need to store in the database. These are logged every few seconds so I will be storing a lot of them over time.
The way this data would be used is:
1) Access a bulk of time to see flag status history
2) Find times at which flag changed status
Once stored, the records will not be u...
hello,
I'm currently 'learning' codeigniter, php and mySql all at once as I try and create a "checklist" type of website, where visitors sign up, create a project and are asked a list of questions, where they must input certain fields
I'm a little stuck on my mySQL DB-design... (completely stuck actually)
what it comes down to is...
...
I'm doing something different but this is an easier to understand example. Think of the votes here. I add these votes to a separate table and log information about them like by who, when and so on. Would you also add a field to the main table that simply counts the number of votes or is this bad practice.
...
Hi
In the survey, there is a type of question called Matrix which it's like this:
| Is Friendly | Weather | Comments
===========================================
Sydney | Y | 5 | 'bla'
-------------------------------------------
Singapore | Y | 10 | 'test'
------------------------------------...