Say I have these tables and Oldbookings is an archive table containing rows from Bookings made a year ago. Also, assuming that such constraints were already defined in Bookings:
FOREIGN KEY (cusNo) REFERENCES Customers(cusNo)
FOREIGN KEY (flightNo) REFERENCES Flights(flightNo)
Would it make sense to define these contraints (foreign ke...
Background: School counselors will login and make comments about their meetings with students.
Issues: PHP 4 server
Flat File or CSV
Suppose I have HTML form with the following text fields
user id
date
comments
How can I create an effective record keeping to be able to display the comments that have been made and next to them ...
Situation
Say I have the following:
a table items
a table lists to which these items can be linked
a table users
Condition: a list can belong to all or one specific user
What I'd like to do is create "global" lists that exist for ever user. But there should be a possibility to "overwrite" this global list with a user-specific one. E...
I know that this isn't exactly normalised, but bringing all of the localised data throughout my application into just a few tables will help me out a lot.
I have to be able to link some generic table to a LocalisedContent table which will contain different rows for each of the localised key-value pairs of the generic table joined to it....
Do you always design databases in at least Third Normal Form (3NF)? Why?
...
What is the recommended way in this situation:
Customer ..* <-------------> 0..1 Car
So there is a Customer table and a Car table, Customer can have zero or one Car, the Car can be linked to many Customer tables.
Should I add a nullable CarID column to Customer
or
Should I create a Customer_Car_Map table containing CustomerID and Ca...
Hello experts, this is undoubtedly a newbie question, but I haven't been able
to find a satisfactory answer.
When creating a link table for many-to-many relationships, is it better to
create a unique id or only use two foreign keys of the respective tables (compound key?).
Looking at different diagrams of the Northwind database for exam...
Greetings, all,
I'm working on an application in Ruby on Rails where we need to keep track of a bunch of external services for each user (for example, Facebook, MySpace, Google, SalesForce, Twitter, WordPress, etc) that the app will access on behalf of the user. For some services, we will need to store an (encrypted) username and passwo...
I'm creating this little show scheduler thing.
I have the table shows, with title:string and description:text. I want to add days and times to the show (each show can have multiple days, and each day has their OWN times). How might I go about doing this?
I was thinking of making a times table. With the columns (show_id, day, and time)....
I am building a small database for a lab. We have some rules to make a ID String for every Item, so i do not want to store it in my database. The problem is that some times changes in data, for example the person response for that item changed, causes the chang of ID String. But i can not correct it for printed docs. How can i store the...
Hi all,
Which type (Float or decimal) is best used to store prices in a database?
Thx
...
For a rating system that is dependent on factors such as votes, how do they store the reputation? Eg. Stackoverflow.
Do they calculate it everytime the page loads? eg. searching all posts and adding and multiplying?
Store it in a reputation field on the user table and increment it everytime a vote is being casted?
Which is the most ...
Ok I have a question and it is probably very easy but I can not find the solution.
I have 3 tables plus one main tbl.
tbl_1 - tbl_1Name_id
tbl_2- tbl_2Name_id
tbl_3 - tbl_3Name_id
I want to connect the Name_id fields to the main tbl fields below.
main_tbl
___________
tbl_1Name_id
tbl_2Name_id
tbl_3Name_id
Main tbl has a Uniq...
A feature that is currently missing from one of my web apps is that a single user can only be logged in on one machine at a time. That is, if the users logs in elsewhere, his previous session will be logged off.
This is due to my current users table having the columns:
user: id, username, hash, salt... cursession
When each user logs ...
Hello.
I have to model classes and database tables for a "User" entity.
This "User" entity have this properties:
User
Name
Age
Gender
Email
But I have 2 user's type: "Paid users" and "Free users". Each one have his own properties:
Paid User
Fee
Rate
Free User
Expiration Date
Level
"Paid User" and "Free User" ar...
I have spent most of my career developing data warehouses\marts as Star Schemas because they were typically used in conjunction with Microsoft's Analysis Services. However, we are starting to leverage MicroStrategy 9.0.1, and I have been told that Star Schemas are less than optimal for this platform. MicroStrategy does not have an offi...
At my worki we have data stored in a database, the data is not normalized. I am looking for a way to find what data was duplicated.
Our Data base has 3 rows columns, Name, State, Strategy
This data might looks something like this:
OldTable:
Name | State | Strat
-----+-------+------
A | M | 1
A | X | 3
B | T | 6
C ...
I have 2 tables Product
Product
--------
ProductID
ProductName
and SalesTransaction.
SalesTransaction
--------
TransactionID
ProductID
ProductName
User's requirement state that "Product's name can change over time but this modification must not have any effect on already exist transaction". I want to know, is my design good for thi...
I am trying to build a Content Management System in java I wish to use Struts as my MVC framework.How should i proceed and what things should i need to keep in mind while developing my own CMS?How should i design my database.?
I am working on a project where i will require managing user articles,events,communities..etc.
...
So, I think I understood what to put in dimensions, what in the fact table, and how to achieve this.
Now I got the problem, that I have this dimension 'product' and a dimension 'productProperties'. I had to split this, cause otherwise my natural key in 'product' wouldn`t have been unique anymore. I asked this in
this question.
So my '...