Wrox Programmer Forums
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 24th, 2010, 11:37 AM
Registered User
 
Join Date: Oct 2010
Posts: 8
Thanks: 3
Thanked 0 Times in 0 Posts
Default Questions about ASPNETDB.MDF

hello everybody,

in my web site i have two databases, ASPNETDB.MDF and a self created one (database.mdf). (The don't contain a lot of data yet)
But i need a relationship (foreign key) between a table in ASPNETDB.MDF and a table in database.mdf.

So i guess i need to merge both databases first, would you just extend the "ASPNETDB.MDF" with the tables from "database.mdf" ?
or better configure "database.mdf" for the asp.net Applicatoin Services and then delete "ASPNETDB.MDF" ?
Is "ASPNETDB.MDF" even meant to be used in a production online web application?

(Right now i'm using sql server express but i will probably use sql server when deploying Site to a shared host)

thanks a lot for answers
 
Old October 24th, 2010, 12:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I think this may help: http://weblogs.asp.net/scottgu/archi...25/423703.aspx

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
ibmkahm (October 25th, 2010)
 
Old October 25th, 2010, 04:01 AM
Registered User
 
Join Date: Oct 2010
Posts: 8
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thanks for the link Imar,

so you would recommend to configure my self created database (database.mdf) for the asp.net Applicatoin Services and then delete "ASPNETDB.MDF" right ??
extending ASPNETDB.MDF is not a good idea ?
 
Old October 25th, 2010, 05:23 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The net result is the same: both the required ASP.NET stuff and your own stuff end up in the same database. Whether you add ASP.NET features to your database, or your features to an ASP.NET enabled database doesn't really matter; the resulting database is the same.

However, I prefer to name my databases differently from the default name. I could be working on a number of sites at the same time, and if all databases have the same name of ASPNETDB.MDF, things can get confusing pretty quickly. That's why I prefer to add ASP.NET features to an existing database.

And yes, you can delete the old ASPNETDB.MDF database after you ran aspnet_regsql. Just be aware that no data migration takes place.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
ibmkahm (October 25th, 2010)





Similar Threads
Thread Thread Starter Forum Replies Last Post
about ASPNetDB.mdf bela_sush ASP.NET 3.5 Basics 1 October 18th, 2010 12:14 PM
about ASPNetDB.mdf bela_sush BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 18th, 2010 10:56 AM
ASPNETDB.mdf again Will BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 April 28th, 2009 04:30 PM
ASPNETDB.mdf Will BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 April 27th, 2009 01:07 PM
aspnetdb.mdf Jackxxx ASP.NET 2.0 Basics 0 January 9th, 2007 01:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.