Need Advice On Planning For DataBase Changes

May 16, 2005

Hello;

View 8 Replies


ADVERTISEMENT

Planning A Database

Aug 7, 2007

Hi all,

I'm very new to SQL and am learning via books and whilst on the job. I'm putting together my logical design at the moment and was wondering if anyone could suggest any websites that might give me an insight into the best way to go about this in an effective manner.

TIA,

SamuelT

View 1 Replies View Related

Database Capacity Planning

Sep 27, 2001

Does any one know where I can locate a document or template for database capacity planning on the web? Any help would be greatly appreciated. thanks.

View 1 Replies View Related

Planning For Creating A Database

Nov 16, 2007

Dear Experts,
now i was allotted as a complete DBA for one client and i've to take care from the creation itself.

we've understood the data will be around 20 GB initially, and from there onwards, 1GB data will grow in the database. total number of tables are around 1400. and we have primary key on each table.

Now you Experts, please guide me that how can i take the Fragmentation levels for best performance? or i need to give you more information regarding that.....

i need your valuble suggesions and guidence

View 2 Replies View Related

Planning Database On SQL Server 2005

Apr 30, 2007

Hello,
We are establishing a database server for our product suite containg 14 products- these products is basically intended to be used by CAs and Accountants.

my databaseserver will have 14 databases-
4 are very small, 4 are complex and 6 are Very complex- there is a close intraction between all these databases.
at any time there will be around 500 users using these products but since these products are seasonal there is a chance that all 500 users are connected to one database only.(but there is also a possiblity that load is equally distributed on all the databases)
My product will run on intranat.

My requirement is:
1. What is best server configuration for hosting such type of database.(sqlserver 2005)
2. How many concurrent users sqlserver supports(MSaccess supports 15 concurrent users)
3. I want that if user has license for 10 users my Database should bear load of only 10 user.

View 1 Replies View Related

Model Database Recovery Planning

Mar 29, 2007

I cannot think of any reason, in our environment, why I would recover the model database. Change framework has all databases coming from DEV & QA before landing on PROD. We have never used the model database as framework of new databases either.

So, if I discontinued backup of the database, what is my recovery method if it become corrupt? Since mine is not used, can I simply copy it from another server?

View 5 Replies View Related

Planning Database Storage For SQL Server 2005

Feb 13, 2008

Here are my planning details:

RAID 1:

2 disks RAID 1 for OS and BINS
2 disks RAID 1 for Backups.

RAID 10

4 disks RAID 10 for data
4 disks RAID 10 for log
4 disks RAID 10 for TEMPDB

Should i put the master and other system database on RAID 10 along with TempDB.

Or what else a guru fellow will advise in above setup.

thanks,

View 5 Replies View Related

Database Advice

Dec 8, 2007

 Hi,I recently contacted my hosting company's customer support about my databases not working - saying that I use sql express (which they support).The guy recommended:
"I would suggest you to upgrade the db's to use mssql 2005." "This
is because, sql express is built for development environment. When you
are in development environment, you are accessing everything with
administrator permission. However, in live hosting environment (when
there are differnet kind of permission restrictions), sql express often
failed on attaching database." Does anyone have any opinion on that? Would it be best to change db's to use mssql 2005? How complicated/time consuming will it be to upgrade?Thanks!Jon 

View 1 Replies View Related

Advice On Database Structure

Jun 4, 2007

 I am thinking of doing a fake PC company site for my ASP project. so
what they will have is a chat, products with reviews, and users can
have "Buddies".So my DB so far (Tables):ProductPC - ID, Processor, RAM, HDD, Graphics, LCD ...ProductHardware
- ID, Title (Like "Intel C2D E6600"), Description, Price, Rating (0-5
stars, so integer), Category (CPU, HDD, Graphics)ProductSoftware - ID, Title (eg. "Adobe CS3"), Description, Price, Rating, Category (eg. Design, Programming)Reviews - ID, ProductID, Title, Content, DateChat - ID, TopicID, Title, Content, DateUsers - ID, Username, Password,The problem, how do i connect Reviews to the products since they are from diff tables.How do i get the "buddy" system workingChat i think its not as simple as thatBut i just need a simple ASP project, so no need to get too complex, but i still hope to learn as much.

View 12 Replies View Related

Advice On The Best Way To Update A Database

Jun 17, 2007

Hi,Apologies if this has already been asked, but I couldnt find a thread that asked exactly what I wanted.Im making an administration panel for a site where you can change various settings, options, and categories that data can fall into. When editing, adding or deleting a record i COULD make a trip to the database every time, but this feels very inefficient as I understand that establishing the connection is usually the biggest performance hit when querying a database.An alternative plan is for me to simply record the changes made in the panel and have a "save" button. When this is clicked, ONE database connection would be opened and all the data would be saved/updated/deleted as necessary. However, this would involve several "for" loops while the connection is open.The question is; which method would you recommend and why? And does having several "for" loops while the connection is open nullify the advantage gained by only opening one connection?Any advice would be very much appreciated. Thank you  

View 2 Replies View Related

Need Advice On Database Plan. Thank You.

Dec 16, 2005

Hello,I am working on a web site which will use SQL 2005.I am planing my first SQL database and I am looking for advice.1. There will be two types of users: students and professors.2. Both users types will have login information.   (Username, Password, AccessLevel)   3. The remaining information on students and professores is different.   Student (Name, Email, Phone, ...) / Professor (Name, Email, Phone, Subjects, ...)4. Professors can publish documents.   Each document has some info (Type, Title, Description, ...)My plan in this moment is to:A. Create the tables Students, Professors, Login and Documents.B. Students table would be connected to Login table.   Professors table would be connected to Login table and Documents table.C. The field [Type] in documents table should include the type or   should I create a table DocumentsTypes where I add codes for each type.   I have seen this. What is the advantage?Can someone give me some advice?Thank you Very Much,Miguel

View 1 Replies View Related

Database Design. Need Advice. Thank You.

Oct 19, 2007

Hello,

I am creating a database where:
- I have a Blogs and Folders system.
- Use a common design so I can implement new systems in the future.

Users, Comments, Ratings, View, Tags and Categories are tables common to all systems, i.e., used by Posts and Files in Blogs and Folders.

- One Tag or Category can be associated to many Posts or Files.
- One Comment, View or Rating should be only associated to one Post or one File. I am missing this ... (1)

Relations between a File / Folder and Comments / Ratings / View / Tags / Categories are done using FilesRatings, FoldersViews, etc.

I am using UniqueIdentifier as Primary Keys.
I checked ASP.NET Membership tables, a few articles and few features in my project, such as renaming files with the GUID of their records.
I didn't decided yet for INT or UNIQUEIDENTIFIER.

I am looking for some feedback on the design of my database.
One thing I need to improve is mentioned in (1)

Thank You,
Miguel

My Database Script:

-- Users ...
create table dbo.Users
(
UserID uniqueidentifier not null
constraint PK_User primary key clustered,
[Name] nvarchar(200) not null,
Email nvarchar(200) null,
UpdatedDate datetime not null
)

-- Categories ...
create table dbo.Categories
(
CategoryID uniqueidentifier not null
constraint PK_Category primary key clustered,
[Name] nvarchar(100) not null
)

-- Comments ...
create table dbo.Comments
(
CommentID uniqueidentifier not null
constraint PK_Comment primary key clustered,
AuthorID uniqueidentifier not null,
Title nvarchar(400) null,
Body nvarchar(max) null,
UpdatedDate datetime not null,
constraint FK_Comments_Users
foreign key(AuthorID)
references dbo.Users(UserID)
)

-- Ratings ...
create table dbo.Ratings
(
RatingID uniqueidentifier not null
constraint PK_Rating primary key clustered,
AuthorID uniqueidentifier not null,
Value float not null,
constraint FK_Ratings_Users
foreign key(AuthorID)
references dbo.Users(UserID)
)

-- Tags ...
create table dbo.Tags
(
TagID uniqueidentifier not null
constraint PK_Tag primary key clustered,
[Name] nvarchar(100) not null
)

-- Views ...
create table dbo.Views
(
ViewID uniqueidentifier not null
constraint PK_View primary key clustered,
Ticket [datetime] not null
)

-- Blogs ...
create table dbo.Blogs
(
BlogID uniqueidentifier not null
constraint PK_Blog primary key clustered,
Title nvarchar(400) null,
Description nvarchar(2000) null,
CreatedDate datetime null
)

-- Posts ...
create table dbo.Posts
(
PostID uniqueidentifier not null
constraint PK_Post primary key clustered,
BlogID uniqueidentifier not null,
AuthorID uniqueidentifier not null,
Title nchar(1000) null,
Body nvarchar(max) null,
UpdatedDate datetime not null,
IsPublished bit not null,
constraint FK_Posts_Blogs
foreign key(BlogID)
references dbo.Blogs(BlogID)
on delete cascade,
constraint FK_Posts_Users
foreign key(AuthorID)
references dbo.Users(UserID)
on delete cascade
)

-- PostsCategories ...
create table dbo.PostsCategories
(
PostID uniqueidentifier not null,
CategoryID uniqueidentifier not null,
constraint PK_PostsCategories
primary key clustered (PostID, CategoryID),
constraint FK_PostsCategories_Posts
foreign key(PostID)
references dbo.Posts(PostID)
on delete cascade,
constraint FK_PostsCategories_Categories
foreign key(CategoryID)
references dbo.Categories(CategoryID)
)

-- PostsComments ...
create table dbo.PostsComments
(
PostID uniqueidentifier not null,
CommentID uniqueidentifier not null,
constraint PK_PostsComments
primary key clustered (PostID, CommentID),
constraint FK_PostsComments_Posts
foreign key(PostID)
references dbo.Posts(PostID)
on delete cascade,
constraint FK_PostsComments_Comments
foreign key(CommentID)
references dbo.Comments(CommentID)
on delete cascade
)

-- PostsRatings ...
create table dbo.PostsRatings
(
PostID uniqueidentifier not null,
RatingID uniqueidentifier not null,
constraint PK_PostsRatings
primary key clustered (PostID, RatingID),
constraint FK_PostsRatings_Posts
foreign key(PostID)
references dbo.Posts(PostID)
on delete cascade,
constraint FK_PostsRatings_Ratings
foreign key(RatingID)
references dbo.Ratings(RatingID)
on delete cascade
)

-- PostsTags ...
create table dbo.PostsTags
(
PostID uniqueidentifier not null,
TagID uniqueidentifier not null,
constraint PK_PostsTags
primary key clustered (PostID, TagID),
constraint FK_PostsTags_Posts
foreign key(PostID)
references dbo.Posts(PostID)
on delete cascade,
constraint FK_PostsTags_Tags
foreign key(TagID)
references dbo.Tags(TagID)
)

-- PostsViews ...
create table dbo.PostsViews
(
PostID uniqueidentifier not null,
ViewID uniqueidentifier not null,
constraint PK_PostsViews
primary key clustered (PostID, ViewID),
constraint FK_PostsViews_Posts
foreign key(PostID)
references dbo.Posts(PostID)
on delete cascade,
constraint FK_PostsViews_Views
foreign key(ViewID)
references dbo.Views(ViewID)
on delete cascade
)

-- Folders ...
create table dbo.Folders
(
FolderID uniqueidentifier not null
constraint PK_Folder primary key clustered,
[Name] nvarchar(100) null,
Description nvarchar(2000) null,
CreatedDate datetime not null,
URL nvarchar(400) not null
)

-- Files ...
create table dbo.Files
(
FileID uniqueidentifier not null
constraint PK_File primary key clustered,
FolderID uniqueidentifier not null,
AuthorID uniqueidentifier not null,
Title nvarchar(400) null,
Description nvarchar(2000) null,
[Name] nvarchar(100) not null,
URL nvarchar(400) not null,
UpdatedDate datetime not null,
IsPublished bit not null,
Type nvarchar(50) null,
constraint FK_Files_Folders
foreign key(FolderID)
references dbo.Folders(FolderID)
on delete cascade,
constraint FK_Files_Users
foreign key(AuthorID)
references dbo.Users(UserID)
on delete cascade
)

-- FilesCategories ...
create table dbo.FilesCategories
(
FileID uniqueidentifier not null,
CategoryID uniqueidentifier not null,
constraint PK_FilesCategories
primary key clustered (FileID, CategoryID),
constraint FK_FilesCategories_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesCategories_Categories
foreign key(CategoryID)
references dbo.Categories(CategoryID)
)

-- FilesComments ...
create table dbo.FilesComments
(
FileID uniqueidentifier not null,
CommentID uniqueidentifier not null,
constraint PK_FilesComments
primary key clustered (FileID, CommentID),
constraint FK_FilesComments_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesComments_Comments
foreign key(CommentID)
references dbo.Comments(CommentID)
on delete cascade
)

-- FilesRatings ...
create table dbo.FilesRatings
(
FileID uniqueidentifier not null,
RatingID uniqueidentifier not null,
constraint PK_FilesRatings
primary key clustered (FileID, RatingID),
constraint FK_FilesRatings_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesRatings_Ratings
foreign key(RatingID)
references dbo.Ratings(RatingID)
on delete cascade
)

-- FilesTags ...
create table dbo.FilesTags
(
FileID uniqueidentifier not null,
TagID uniqueidentifier not null,
constraint PK_FilesTags
primary key clustered (FileID, TagID),
constraint FK_FilesTags_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesTags_Tags
foreign key(TagID)
references dbo.Tags(TagID)
)

-- FilesViews ...
create table dbo.FilesViews
(
FileID uniqueidentifier not null,
ViewID uniqueidentifier not null,
constraint PK_FilesViews
primary key clustered (FileID, ViewID),
constraint FK_FilesViews_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesViews_Views
foreign key(ViewID)
references dbo.Views(ViewID)
on delete cascade
)


-- Run script
go

View 2 Replies View Related

Database Expansion Advice

Feb 13, 2008

I'm at a new installation where there's no DBA at all, so, as a Coldfusion programmer, I'm now the DBA, LOL.

The main SQL2000 DB we use is approximately 100MB with about 7MB of free space and is allocated to expand by 10%.

I am adding a new, large table, about 60 columns with lots of variable-length unicode fields, mostly nvarchar. It's being used to track non-USA user-form information. Even though the DB is set to expand, I'm concerned that due to the potential size/volume of records, that the auto-expand could cause performance issues.

The SQL2000 server has plenty of room, about 49GB, so I'm wondering if I should expand the size of the current DB, or if the auto-expand feature will be ok.

At this point I'm not sure what the volume of the user-form records will be in the new table. It won't be a million records certainly, but I'm guessing it could climb to maybe 10-20,000 records.

If I should expand the DB, can I do this while the DB is still online?

thanks...

View 4 Replies View Related

Inheritance Advice In A Database...

Jul 20, 2005

hi folks,i'm puzzled over this one, anyone with some solid db experience might beable to enlighten me here.i'm modelling a file system in a database as follows, and i can't figure outto cleanly implement an inheritance mechanism.i have a hierarchy of folders in an sql table. every folder has aparentFolderID, if this value is 0 then it means it's a root folder.then, in a 'files' table, every file has a parentFolderID to give it alocation in the structure. fairly basic.the hard part is that each file record has an attribute 'STYLE' that can beexplicitly specified, or inherited from it's parent folder, or it's parentsparent folder, or.. all the way back to the root.the 2 ways i've come up with representing it are:1) if the style is being inherited, enter a null value in the STYLE field.then to figure out what style applies to a file or folder, i trace backthrough it's parentFolderID records until i find a style attribute that isnot null.the good thing about this is that if i change the style that is applied tothe entire filesystem, it only takes one update.the bad thing is when i want to figure out what style applies to a file, ihave to traverse back through possibly several records to locate the folderthat actually specifies the style being inherited by the file.2) explicitly state all style values in each record.this is good for accessing the style of a file or folder because you get itstraight out first time from the db.the bad thing is if i update the entire file system, i might have severalhundred / thousand update sql statements to execute to update all the valuesin every folder and every file. nasty!thanks for any help, i'm really stumped with this and i'm thinking theremust be a more elegant way to implement inheritance.thankstim

View 2 Replies View Related

Advice On A Database Replication

May 1, 2006



Hi,

I.m trying to find the best practice for my solution.

This is the situation.

My application has two databases and 2 client interface. One with a windows forms having a database (sql server 2000) running in an office (on a static IP but on a slow connection). the second one is an web application running on the net with an online database. Both these databases have to have same information. Users can add records to both databases independently but these databases should be synchronize at a point. I hope the situation is cleare. Is there a standard way of doing this. If some one knows good article of how this can be done pls forward it to me.

Many thanks.

-VJ

View 11 Replies View Related

Database Design. Need Advice. Thank You.

Oct 21, 2007

Hello,

I am creating a database where:
- I have a Blogs and Folders system.
- Use a common design so I can implement new systems in the future.

Users, Comments, Ratings, View, Tags and Categories are tables common to all systems, i.e., used by Posts and Files in Blogs and Folders.

- One Tag or Category can be associated to many Posts or Files.
- One Comment, View or Rating should be only associated to one Post or one File. I am missing this ... (1)

Relations between a File / Folder and Comments / Ratings / View / Tags / Categories are done using FilesRatings, FoldersViews, etc.

I am using UniqueIdentifier as Primary Keys.
I checked ASP.NET Membership tables, a few articles and few features in my project, such as renaming files with the GUID of their records.
I didn't decided yet for INT or UNIQUEIDENTIFIER

I am looking for some feedback on the design of my database.
One thing I think need to improve is mentioned in (1)

But any advices to improve it would be great.

Thank You,
Miguel

My Database Script:





-- Users ...
create table dbo.Users
(
UserID uniqueidentifier not null
constraint PK_User primary key clustered,
[Name] nvarchar(200) not null,
Email nvarchar(200) null,
UpdatedDate datetime not null
)

-- Categories ...
create table dbo.Categories
(
CategoryID uniqueidentifier not null
constraint PK_Category primary key clustered,
[Name] nvarchar(100) not null
)

-- Comments ...
create table dbo.Comments
(
CommentID uniqueidentifier not null
constraint PK_Comment primary key clustered,
AuthorID uniqueidentifier not null,
Title nvarchar(400) null,
Body nvarchar(max) null,
UpdatedDate datetime not null,
constraint FK_Comments_Users
foreign key(AuthorID)
references dbo.Users(UserID)
)

-- Ratings ...
create table dbo.Ratings
(
RatingID uniqueidentifier not null
constraint PK_Rating primary key clustered,
AuthorID uniqueidentifier not null,
Value float not null,
constraint FK_Ratings_Users
foreign key(AuthorID)
references dbo.Users(UserID)
)

-- Tags ...
create table dbo.Tags
(
TagID uniqueidentifier not null
constraint PK_Tag primary key clustered,
[Name] nvarchar(100) not null
)

-- Views ...
create table dbo.Views
(
ViewID uniqueidentifier not null
constraint PK_View primary key clustered,
Ticket [datetime] not null
)

-- Blogs ...
create table dbo.Blogs
(
BlogID uniqueidentifier not null
constraint PK_Blog primary key clustered,
Title nvarchar(400) null,
Description nvarchar(2000) null,
CreatedDate datetime null
)

-- Posts ...
create table dbo.Posts
(
PostID uniqueidentifier not null
constraint PK_Post primary key clustered,
BlogID uniqueidentifier not null,
AuthorID uniqueidentifier not null,
Title nchar(1000) null,
Body nvarchar(max) null,
UpdatedDate datetime not null,
IsPublished bit not null,
constraint FK_Posts_Blogs
foreign key(BlogID)
references dbo.Blogs(BlogID)
on delete cascade,
constraint FK_Posts_Users
foreign key(AuthorID)
references dbo.Users(UserID)
on delete cascade
)

-- PostsCategories ...
create table dbo.PostsCategories
(
PostID uniqueidentifier not null,
CategoryID uniqueidentifier not null,
constraint PK_PostsCategories
primary key clustered (PostID, CategoryID),
constraint FK_PostsCategories_Posts
foreign key(PostID)
references dbo.Posts(PostID)
on delete cascade,
constraint FK_PostsCategories_Categories
foreign key(CategoryID)
references dbo.Categories(CategoryID)
)

-- PostsComments ...
create table dbo.PostsComments
(
PostID uniqueidentifier not null,
CommentID uniqueidentifier not null,
constraint PK_PostsComments
primary key clustered (PostID, CommentID),
constraint FK_PostsComments_Posts
foreign key(PostID)
references dbo.Posts(PostID)
on delete cascade,
constraint FK_PostsComments_Comments
foreign key(CommentID)
references dbo.Comments(CommentID)
on delete cascade
)

-- PostsRatings ...
create table dbo.PostsRatings
(
PostID uniqueidentifier not null,
RatingID uniqueidentifier not null,
constraint PK_PostsRatings
primary key clustered (PostID, RatingID),
constraint FK_PostsRatings_Posts
foreign key(PostID)
references dbo.Posts(PostID)
on delete cascade,
constraint FK_PostsRatings_Ratings
foreign key(RatingID)
references dbo.Ratings(RatingID)
on delete cascade
)

-- PostsTags ...
create table dbo.PostsTags
(
PostID uniqueidentifier not null,
TagID uniqueidentifier not null,
constraint PK_PostsTags
primary key clustered (PostID, TagID),
constraint FK_PostsTags_Posts
foreign key(PostID)
references dbo.Posts(PostID)
on delete cascade,
constraint FK_PostsTags_Tags
foreign key(TagID)
references dbo.Tags(TagID)
)

-- PostsViews ...
create table dbo.PostsViews
(
PostID uniqueidentifier not null,
ViewID uniqueidentifier not null,
constraint PK_PostsViews
primary key clustered (PostID, ViewID),
constraint FK_PostsViews_Posts
foreign key(PostID)
references dbo.Posts(PostID)
on delete cascade,
constraint FK_PostsViews_Views
foreign key(ViewID)
references dbo.Views(ViewID)
on delete cascade
)

-- Folders ...
create table dbo.Folders
(
FolderID uniqueidentifier not null
constraint PK_Folder primary key clustered,
[Name] nvarchar(100) null,
Description nvarchar(2000) null,
CreatedDate datetime not null,
URL nvarchar(400) not null
)

-- Files ...
create table dbo.Files
(
FileID uniqueidentifier not null
constraint PK_File primary key clustered,
FolderID uniqueidentifier not null,
AuthorID uniqueidentifier not null,
Title nvarchar(400) null,
Description nvarchar(2000) null,
[Name] nvarchar(100) not null,
URL nvarchar(400) not null,
UpdatedDate datetime not null,
IsPublished bit not null,
Type nvarchar(50) null,
constraint FK_Files_Folders
foreign key(FolderID)
references dbo.Folders(FolderID)
on delete cascade,
constraint FK_Files_Users
foreign key(AuthorID)
references dbo.Users(UserID)
on delete cascade
)

-- FilesCategories ...
create table dbo.FilesCategories
(
FileID uniqueidentifier not null,
CategoryID uniqueidentifier not null,
constraint PK_FilesCategories
primary key clustered (FileID, CategoryID),
constraint FK_FilesCategories_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesCategories_Categories
foreign key(CategoryID)
references dbo.Categories(CategoryID)
)

-- FilesComments ...
create table dbo.FilesComments
(
FileID uniqueidentifier not null,
CommentID uniqueidentifier not null,
constraint PK_FilesComments
primary key clustered (FileID, CommentID),
constraint FK_FilesComments_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesComments_Comments
foreign key(CommentID)
references dbo.Comments(CommentID)
on delete cascade
)

-- FilesRatings ...
create table dbo.FilesRatings
(
FileID uniqueidentifier not null,
RatingID uniqueidentifier not null,
constraint PK_FilesRatings
primary key clustered (FileID, RatingID),
constraint FK_FilesRatings_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesRatings_Ratings
foreign key(RatingID)
references dbo.Ratings(RatingID)
on delete cascade
)

-- FilesTags ...
create table dbo.FilesTags
(
FileID uniqueidentifier not null,
TagID uniqueidentifier not null,
constraint PK_FilesTags
primary key clustered (FileID, TagID),
constraint FK_FilesTags_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesTags_Tags
foreign key(TagID)
references dbo.Tags(TagID)
)

-- FilesViews ...
create table dbo.FilesViews
(
FileID uniqueidentifier not null,
ViewID uniqueidentifier not null,
constraint PK_FilesViews
primary key clustered (FileID, ViewID),
constraint FK_FilesViews_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesViews_Views
foreign key(ViewID)
references dbo.Views(ViewID)
on delete cascade
)


-- Run script
go

View 2 Replies View Related

Much Needed Advice About Database And Javascript

Feb 27, 2008

hi,
iam thinking of changing my ajax slideshow so that it gets the data from the databse. currently i am finding it hard to add text functianlity the way i want with the slide show.
what my query is, that if i to using a datalist can i add javasscript functionality to the data being retrived. for example, currently i have written some javascript so that a series of text is diplayed one after the other in a sequence from just one button click. so if im pulling data out of a databse can i still add this javascript functionality to it? i hope this makes sense, if it doesnt then i am willing to elaborate. please can any one offer any advice or examples or any suggestions on how i can do this. any help is much appricated as i am struggling to find a solution as i orinally wanted to be able to add this javascript functionality with the play button of the slide show but i couldnt find a solution.also i think its better to use some kind of database as i can use the editing funtions visual web developer offers
thank you

View 2 Replies View Related

Database Flexibility (Need Expert Advice)

Mar 13, 2008

Hi All Professionals Programmers,
I would like to ask a question that is very important for me. The question is how can i create a flexible data base in which i m able to create the inner levels as much as i can.
Like i have a table building, then i have another child table floor, then the floor become parent and i have its child rooms, then the rooms become parent and i have its child floor tiles etc.
you can see i am going to inner dept, so i need a flexible database because its very costly and intimadting to change the database and every time create a new table and relationships.
Hope you have understood what i am going to say and need advice of professional and expert user to resolve it.
Any concise quality material like articles, white paper etc will also be suitable for me.
Thanks in Advance

View 3 Replies View Related

Trying To Refine Database Structure - Advice?

May 22, 2008



Greetings,

Have an interesting issue in a database I'm trying to design and I'm trying to find a better way to setup the structure, if there is one. Going to generic example of my issue.

StudentList --- This table is the list of all College Students(with Primary Key of StudentID)
MajorsList --- This is a table listing all of the majors available at the College (PK of MajorID)
CourseList --- This is the list of all of the courses at the school (PK of ClassID)


This college allows students to take 1 or more majors, with the number of majors unknown.
-- Any number of students can take the same majors or different majors.
-- -- (aka 1 StudentID -> 1+ Majors & 1 Major -> 1+ StudentID's)
The majors all have different numbers of courses in them.
-- Many of the majors can have the same, or different courses in their lists.
-- -- (aka 1 Major -> 1+ Courses & 1 Course -> 1+ Majors)

I'm looking to see if their is a better way of tieing together the Students -> Majors and Majors -> Courses.
If done properlly, a single select and a few joins should bring up every class a student is taking for all their majors, or any other relationship to any of the three main tables primary keys.

Currently, to tie the three tables together, I have made two Interrum tables:
-- StudentMajors - - With only two columns
-- -- StudentID (ForeignKey tied to PrimaryKey StudentID in StudentList)
-- -- MajorID (FK tied to PrimaryKey MajorID in MajorList)
and
-- MajorCourses - - with only two columns

-- -- MajorID (FK tied to PrimaryKey MajorID in MajorList)
-- -- CourseID (FK tied to PrimaryKey CourseID in CourseList)

These tables give clear and definate ties between the tables, but my worry is that there is no primary key for these two tables, and no column in the tables is elledgeable for becoming PK, because, in this example the StudentMajors table can lis tthe studentID multiple times, each with a different MajorID. Sames goes with MajorCourses.

Is there a better structure method for reaching this same goal?

Additional, I don't know how to do a contraint that should be in place of:
-- In StudentMajors, for each value of studentID, there can be no duplicate values on MajorID
-- -- (same in MajorCourses tables in relations to classid's)
Any advice on how to do this constraint?

View 3 Replies View Related

Kindly Advice On How To Test Faulty Connection To Database?

Jun 2, 2008

Hello,
I have an asp.net application which connects to SQL Server 2005 database.
One out of 15 times (approx) the applicaiton does not make connection to the database and an exception is thrown.
I am not sure how to debug this. Should I write some code which can make connections in a loop to test how much stress the sever can handle?
Kindly suggest some ideas. Thanks.

View 3 Replies View Related

Protecting Database From Code Stealing And Installer Advice

Aug 24, 2005

Dear GroupI'd be grateful if you can give me some advice on the following.An application I wrote uses an MSDE backend and I wonder whetherthere's a way (even for the system administrator) of not seeing ortracing stored procedure code, view and table designs?And I also wonder whether you can advise me on an installer thathandles MSDE and database setup during installation without too mucheffort but is still affordable < USD 1000.Any articles, resources, advice hints for these two topics are veryappreciated.Thank you very much for your help & efforts!Martin

View 3 Replies View Related

DR Planning Help....

Mar 8, 2007

I was told that my company is thinking about inplementing a "backup" server for out content loading server (aka load server)... this server loads files from several companies and then replicates the data out to our production environment to be seen. This server has serveral DTS/IS packages that do all this data movement and manipulation... I am not too up to date on technology for what they are asking so I thought I would ask here for some recommendations to head in the right direction...

I am not sure if clustering will work or maybe mirroring the database...

The server now is a publisher so the backup server would have to pick up if the #1 failed and then give command back to #1 once it is good... this is the part I have no idea about...

The #2 server would not have to really do anything but keep its data up to date unless #1 fails so you could say it would be fine to be a passive server...

Any ideas on what direction I should look into???

Thanks ahead of time.

View 8 Replies View Related

Planning To Install SP3

Jan 8, 2001

Hi All

I am planning to install SP3, anyone have suggestion before installation what are the precaution I need to take. please post your comments. Thanks in advance.

Thanks

Regards
Leong

View 1 Replies View Related

Capacity Planning

Nov 4, 2000

hi, can any one tell me what is the meaning of capacity planning and where do I get info about it,and how does this help me in sql server admin role
thanks

Ahmed

View 1 Replies View Related

Replication Planning

Feb 8, 2001

Hi every body,

my company wants implements transactional replication. We have three servers one in chicago(production)
second server in chicago, third server in kansas city.Can give me plan for implementing the replication.

Thanks

View 1 Replies View Related

Capacity Planning

Dec 11, 2000

What si capacity planning?
Where can i find more stuff on it?

View 1 Replies View Related

New SQLSERVER Planning?

May 26, 2004

Hi Guys,

We are planning for a new SQLSERVER for one of our application. The database will receive around 58 million events/year is roughly 160,000 messages/day

Making the assumption that an average message size is 2K. The messages comes to database through edi processes.

Any suggestion about database server configuration, and any other steps that need to be take care of before even thinking about creating a database??

help is greatly appericated..

View 3 Replies View Related

Capacity Planning !!!

May 28, 2001

Hi Everybody,

Can anybody explain me, what is Capacity Planning and what is Load Balancing?

tks in advance
sri

View 1 Replies View Related

Project Planning

Feb 13, 2007

HelloBased on three tables (Projects, Tasks and UserCalender) I would liketo work out the total amount of available resources (UserCalendertable contains a entry for each user for each day, day being 7.5hours) and total required effort (sum of Tasks.EstimateLikley) splitover 12 months.For example:Jan:Available Resources: (4 Users, 7.5 hours per day, 5 working days perweek, 23 Working days in Jan) = (23 x 4) = (92 * 7.5) = 690 AvailableHoursRequired Resources:Project Start Date: 1/1/2007Project End Date: 1/6/2007Total Required effort (Sum of Tasks.Hours for above project): 500Hours Average over 6 months = 83.33 Hours per month, so in Jan I needto deduct 83.33 from 600 = 516.67 Hours.etcHow could I do this, I have tried several ways but finding it hard.Thanks

View 1 Replies View Related

Planning On Going With Dynamic SQL, But...

Jun 13, 2007

I've read a few posts on the stored procedure vs dynamic sql debate. I ran a few performance test for myself and it appears to be a wash.



Given that, I'm leaning toward dynamic sql mostly because it would mean one fewer place to have things.



But, before we go that route we wanted to ask the question:



Is there any compelling reason why we shouldn't abandon all of our stored procs and just write the SQL inside inside our functions in our business layer (essentially our data access layer)?



Or, is it just preference these days?



I was leaning toward procs, but I have to admit it would be nice not to have to keep up with all of them per all of our functions that call them.



Thanks,
Ron

View 3 Replies View Related

Planning A Replication

Aug 5, 2006

hallo
we have a sql2000 in the headquarter, and 3 new remote branches opening in few weeks with no sql servers installed yet.
We plan to setup a merge replica. The headquarter will have the highest activity on the replicated tables.
Shall we use all SQL2000 in the remote branches? Or could we use SQL2005, using a 2005 as a publisher and distributor?
TIA

View 3 Replies View Related

Planning Ahead W/ SQL Server...

Jan 3, 2004

With the current web app that I am writing, I am starting to plan ahead to the scalability problems that I am planning on encountering with the number of users that I may have...

My hosting plan now allows for a 50MB SQL Server database, but, I know that will not last long, each user will be using 3-5MB each of the database, so I am going to outgrow my space fast.

Would looking into (until i have enough subscribers to get a dedicated host), SQL Hosting be a good idea? Atleast to start off with something like http://www.alentus.com/hosting/sqlserver.asp ?

But then again, would a SQL Database growing to large get bad? Within a few years, i expect to have at max 5,000 users, so that could grow to a 25GB database... with millions of rows.

Would breaking it up into smaller databases for each N amount of users be a wise idea? Or would it not really matter?

Any help is much appreciated

Happy New Year
Harold.

View 1 Replies View Related

Planning Multiple Queries

Dec 2, 2005

I'm cleaning data which involves updating ~12 million rows with threedifferent models, progressively. First clean values using the modelwith finest granularity, then the remainder with the next model,finally what's left using the last model. The first model sets ~1/2 ofthe rows, the second ~1/4, the third ~1/5, and the remaining 5% don'tget updated.It's something like this:UPDATE t SET value=value*m.AdjustmentFactor, updateFlag='updated'FROM Table t JOIN Models m ON ....WHERE m.ModelID='first model' AND t.updateFlag IS NULLStart with 'first model' then 'second model' etc.I'm wondering what happens if I submit all three queries together, oras three separate submissions, waiting for the one before to complete.If I do them all as one group, the query planner might plan for thesecond and third updates based on the initial distribution of values.However, the first update removes half of the rows from consideration,so it seems to me a new plan should be prepared for the second query,based on the distribution at that time. If I highlight the queries inQuery Analyzer and execute, are all three plans created at thebeginning? Does putting GO between them (which I do) make anydifference?This is SQL Server 2000.Thanks,Jim

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved