Suppose I have two tables
1st table emp
EmpID | EmpName|xyz...coloums
1. | Hrishi |
2. | Nikhil |
3. | Hrishi |
2nd Table Department
DeptId |EmpId |Deptname....Xyz coloum
1. |1 |computer
There is a one-to-many relation between emp and department table.
Now I want to call a stored procedure where
empName wil...
Hello
Imagine that I have a Customer table.
And in this table is an ID column, Primary Key int, Identity, all that jazz. Our Customer also has a Name.
Now, if I was to send out information in a report, or an e-mail blast, where there was a link back into my website to uniquely identify that Customer, would it be good practice to use ...
Currently, I have an 'add your ad here' page, with a form.
Now, the user must select what category he will want to post an ad into...
So I have a table for each category in mysql.
Now my question, how would I make each ad unique, with an ID nr?
If I have several tables, the 'auto increment' might turn out to be the same in some ads, a...
Hi. I am in the early stages of developing a sports statistics website (ultimate frisbee) and would like to know your opinions if Google App Engine is right for me.
I am writing it in Python using Django and have been comfortable with standard RDBMS for years but this site is a long term project and I am expecting very large amounts of ...
How do i create a database for scalability? I am in the middle of http://www.slideshare.net/vishnu/livejournals-backend-a-history-of-scaling which i cant read ATM and need to leave. But i would like to know more about creating a database that scales well. Somethings that it mentioned and occur in my mind are
Separate handles for reads ...
There is a report table for overdue DVD rentals. The store has multiple copies of the same DVD (they are all numbered to be identified). How can I normalize this data to meet 3NF requirements?
...
I was wondering about this. Let's say I need to store in a datawarehouse the data for several measures vs time:
t | x'
-------
1 | 20
2 | 50
3 | 30
t | x''
-------
3 | 23
4 | 56
6 | 28
and so on..
t | x''n
-------
5 | 35
6 | 92
7 | 23
If I need to build some large fact table composing the previous data in ways not yet...
I have several database tables that just contain a single column and very few rows, often just an ID of something defined in another system. These tables are then referenced with foreign keys from other tables. For example one table contains country codes (SE, DK, US etc). All values are always unique natural keys and they are used as p...
I am planning to make a project management with PHP/MySQL/Codeigniter.
It will have 10 - 20 users and 20 - 30 projects going on at the same time.
Let's say John is a member of project A, B and C. Cindy is in A, D, F G etc.
I want to make it only members of project can access the project.
Now I am not sure how to approach this.
Wha...
I'm trying to confirm or deny whether you can define a table column in MS Access 2003 as a set. It seems this is implemented in Office 2007 - you can define a column to have a 'multi-select list' in the query/lookup, but this feature appears to be unique to the new access 2007 file format as far as I can determine.
Worded another way, ...
This might get a little complicated. Here goes.
Say we have a parent-child relationship like this:
A Project contains many Tasks. A Project may also have any number of Revisions.
And the database schema for these tables look something like this:
Projects:
ProjectID
ProjectName
ProjectRevisions:
ProjectRevID
ProjectID
ProjectRe...
Hi , I have read a lot of articles about whether we should have primary keys that are identity columns, but I'm still confused.
There are advantages of making columns are identity as it would give better performance in joins and provides data consistency. But there is a major drawback associated with identity ,i.e.When INSERT statement ...
Hello everybody
I have some type an architect(?) question
I develop an application, based on Spring and Hibernate (annotated configuration)
For each table in my database I added 4 fields: createdBy and modifiedBy(String), created and modified (Datetime). Respectively each entity class also has this fields and getter/setter pairs. So I...
Hi guys,
I've been using the adjacency model for hierarchical data for the longest time and was searching the internet for a more efficient way to traverse trees until I read about Nested Sets yesterday. I liked the idea but have a few doubts.............
Now I just wanted to know if it is possible to use the Nested Sets model for many...
Let's say you have a table Orders with a foreign key to a Customer Id. Now, suppose you want to add an Order without a Customer Id, (whether that should be possible is another question) you would have to make the foreign key NULL... Is that bad practice or would you rather work with a link table between Orders and Customers? Although the...
So I'm working on a framework-esque system with one of my co-workers. Our current challenge is how to best implement statuses. Oftentimes, a status will carry with it unique data (a color for a table row, or text to be displayed to a user. etc). Currently, we have a statuses table which contains all this data. Contained in that table is ...
I have a table [User] and another table [Salesperson] in my database. [Salesperson] defines a unique UserID which maps to [User].UserID with a foreign key. When I generate the model with Entity Framework I get a 1-to-Many relationship between [User]-[Salesperson], meaning that each User has a "Collection of Salesperson", but what I want ...
Okay so here is "in a nutshell" what I'm trying to accomplish...
Users of my application can go and create a new group. They can specify criteria about other users which they will allow/deny to determine who is allowed to join the group.
Example:
Age: 12 - 16 yrs old
Height: 5 - 6 feet
The data table that stores the rules would be li...
How can a user be found using the following properties providing that user do not have any id
Name
Father's Name
Mother's Name
Date of Birth
Sex
Remember that user may make mistake while typing :(
Please share your ideas....
...
I am designing a table that has several fields that will be used to record weight and lengths.
Examples would be:
5 kilograms and 50 grams would be stored as 5.050.
2 metres 25 centimetres would be stored as 2.25.
What T-SQL data type would be best suited for these?
Some calculation against these fields will be required but using a de...