Showing posts with label detail. Show all posts
Showing posts with label detail. Show all posts

Monday, March 19, 2012

Newbie need help for database design

Hi,

I am designing a table for classrooms with many features. Following is
the detail of the table (let's say the name of table is CRoom):

1. Room Name (key)
2. Building name (foreign key)
3. Capacity
4. Chairs
5. T-arm chairs
6. Tables
7. Desks
8. Lectern
9. 35 mm slide projector
10. Dual 35 mm slide projector
11. 3/4" video player
12. 1/2" video player
13. Chalkboard
14. Markerboard
.....

My questions are:
a. Should I put everything in the same table?
or
b. If there is chairs in a classroom then there will be no T-arm
chairs there,
vice versa. So should I create a sepearte table for chairs and
t-arm chairs
and use the key for this as a foreign key in the CRoom table?
c. For number 11 and 12, some classrooms have only 3/4" video player,
some
classrooms have only 1/2" video player and some classrooms have
both.
Should I create another table for them and set value 1 for 3/4"
video player
2 for 1/2" video player and 3 for both? Then use the value 1, 2, 3
in the
CRoom table to represent the three differnt situations. If this is
not
proper, then how should I deal with this one?

Thanks a lot in advance.>> I am designing a table for classrooms with many features. <<

Some of the attributes are part of the room itself, like square
footage, maximum allowed seating, and chalkboards that are bolted to
the walls. You can put those attributes into the Classrooms table.
Things that can be moved around (slide projector, video player) would
be in other tables and assigned to classrooms by an inventory location
table.

Monday, March 12, 2012

Newbie Here: headers print even though drill down not clicked

I have a report containing drill down detail. The headers for the drill down
detail prints even at the summary level. This is causing two pages to print
for every one due to the headings. How can I turn the headers off unless the
user has selected to view the drill down data.
Any help would be greatly appreciated. Thanks!Hello,
Try setting the visibility of that header row to toggled by the same field
as the detail row.
Cheers,
Kathy
"Wishing I was skiing mom" wrote:
> I have a report containing drill down detail. The headers for the drill down
> detail prints even at the summary level. This is causing two pages to print
> for every one due to the headings. How can I turn the headers off unless the
> user has selected to view the drill down data.
> Any help would be greatly appreciated. Thanks!|||Thanks for your suggestion. Unfortunately I receive an error message
indicating that the toggle item must share the same scope.
Thanks again,
Jackie
"Kathy" wrote:
> Hello,
> Try setting the visibility of that header row to toggled by the same field
> as the detail row.
> Cheers,
> Kathy
> "Wishing I was skiing mom" wrote:
> > I have a report containing drill down detail. The headers for the drill down
> > detail prints even at the summary level. This is causing two pages to print
> > for every one due to the headings. How can I turn the headers off unless the
> > user has selected to view the drill down data.
> >
> > Any help would be greatly appreciated. Thanks!

Wednesday, March 7, 2012

Newbie - What is the CLR Keyword/Method for @@IDENTITY - thanks!

What is the CLR Keyword/Method for @.@.IDENTITY? I'm doing some master detail inserts and when doing the insert for the child records, i need the new key that was generated for the parent records. Thanks!
Think I may have found the answer at the following site,

http://davidhayden.com/blog/dave/archive/2006/02/16/2803.aspx

It basically says that on your insert statement to append the following statement onto the end of the insert statement:

"SET @.MyParameter = SCOPE_IDENTITY()"


And then on your command object to pass in a parameter with the name of @.MyParameter (with Direction set to output) and then access the parameter after executing the command. Haven't tried it yet but hopefully it works. Is this correct as far you guys know? Is there a better way, lemme know, thanks!