Classes Per Table ( And Vice Versa ) Design

Sep 5, 2004

I work on the Clinical Surgery Department Data Application.
The patient gets through the Admission, Surgery, PostSurgery and Discharge stages during his staying in the department. The Doctors just insert their medical data in to the different tables. I have three main classes: User, Patient and Portfolio ( patients portfolio ) and all the business bases on these classes.
The problem is with the Classes per Medical Data Tables. The Medical tables should exist cause it includes the medical data about the patient however what is not clear: Whether I should create Business and Entity classes per each medical data table ( and this is something like 50 tables ) or I should insert all the functions in the Portfolio class and then there will be a mess of functions in one class? What is the accepted way to perform it ?

View 1 Replies


ADVERTISEMENT

Join Small Table To Big Table Or Vice Versa, Does It Matter?

Jul 23, 2005

If I join Table1 to Table2 with a WHERE condition, isit the same if I would join Table2 to Table1 consideringthat the size of the tables are different.Let's assume Table2 is much bigger than Table1.I've never used MERGE, HASH JOINs etc, do any ofthese help in this scenario?Thank you

View 3 Replies View Related

Registering SQL Server 7.0 In 6.5 And Vice Versa

May 10, 1999

Hi all,

Does anyone know if it is possible to register SQL Server 7.0 in SQL Server 6.5 and vice versa?

I can't find the SQLOLE70.SQL file in SQL Server 7.0 installation disk.

Thanks in advance

View 1 Replies View Related

How Do I Convert Int To Nvarchar And Vice Versa

Jul 4, 2007

Hi guys, how are you? I was wondering how I do to convert int to nvarchar and vice versa?
Thank you very much.

View 10 Replies View Related

MySQL To MSSQL Or Vice Versa

Jun 3, 2007

Hey Guys, are you aware of anyone moving from MYSQL to MSSQL or vice versa - what were your experiences - Mark Smith

View 3 Replies View Related

From Sql2005express To Sql2000 && Vice Versa

Jun 29, 2006

My asp.net website is using sqlexpress2005. I am planning to use sql2000 with this existing website. My questions:

1. How can I transfer the database definitions and actual data from 2005 to 2000? is this possible?
2. What if I have exisiting database in sql2000, can I convert it to be used in sql2005?
3. should I manually recreate the database when converting from one version of sqlserver to another? and how abt the actual data?

PLS HELP. big thanks!

View 4 Replies View Related

Converting A Hex String To A Varbinary Or Vice Versa

May 5, 2006

I'm using SQL Server 2005. How can I convert a hex string to a varbinary or the opposite of that?

View 6 Replies View Related

Replication From SQL Server 2005 64 To 32 Bit And Vice Versa

Apr 26, 2007

Hi,



We have setup SQL Server 2000 32-bit (Publisher/Subscribers) replication with 5 different locations. We are planning to purchase SQL Server 2005 Enterprise Edition 64-bit and/or 32-bit. I need suggestion, if we have both version of 2005 Enterprise, can we setup replication with SQL Server 2005 64-bit with SQL Server 2005 32-bit? is that supporting?



Also can we run replication with SQL Server 2005 64-bit (Publisher) with SQL Server 2000 32-bit (Subscriber).



- Publisher Subscribers

--------------------------------------------------------------------------------------------------------

1- SQL Server 2005 64-bit SQL Server 2005 32-bit

2- SQL Server 2005 64-bit SQL Server 2000 32-bit





Shamshad Ali

shamshad_ali74@hotmail.com

shamshad_ali74@yahoo.com

View 3 Replies View Related

Can I Call Tigger In Store Procedure Or Vice Versa And How?

Jun 19, 2006

Can i call Tigger in store procedure or vice versa in sql server 2000.
 
 and How it implement  ?

View 1 Replies View Related

Query To Change Rows Into Columns And Vice Versa

Nov 13, 2007

I would like to change rows into columns and columns to rows for the query output table




If the query output is shown the table below (including the column names in the first row).

A B C D E
a1 b1 c1 d1 e1
a2 b2 c2 d2 e2
a3 b3 c3 d3 e3
a4 b4 c4 d4 e4
a5 b5 c5 d5 e5

The table needs to be converted to (the rows become columns and columns become rows).

A a1 a2 a3 a4 a5
B b1 b2 b3 b4 b5
C c1 c2 c3 c4 c5
D d1 d2 d3 d4 d5
E e1 e2 e3 e4 e5



Thanks
KK

View 12 Replies View Related

Partner Works From Mirror To Principal, But Not Vice Versa.

Nov 7, 2006

We were having problems setting up the mirroring, so I did it via command lines. I found out the "alter...set partnership" command works on the mirror server going to the principal, but gets a 1418 error when going from the principal to the mirror.
So if A is the principal and B is the mirror, A to B fails but B to A works.
If I reverse it so that B is the principal and A is the mirror, B to A fails and A to B works.
Any suggestions?

View 3 Replies View Related

Can I Call Tigger In Store Procdure And Vice Versa??(urgent)

Jun 19, 2006

Can i call tigger in store procdure and vice versa??
 
if yes how it ?????????

View 2 Replies View Related

Transact SQL :: Convert Time In Specific Timezone To UTC (and Vice-versa)

Nov 17, 2015

In C#, I can convert UTC time to a specific timezone using:

TimeZoneInfo localTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
DateTime UTCTime = TimeZoneInfo.ConvertTimeToUtc(localTime, localTimeZone);

Is there any equivalent function in T-SQL (SQL Server 2014 / SQL Azure)?

Specifically, I want to be able to convert a time into UTC before inserting it into a table. Right now I am doing:

INSERT INTO Incident (IncidentDescription, dtOccurred)
VALUES (@IncidentDescription, DATEADD(hour, 8, @dtOccurred))

I don't want to hardcode "8" and I want it to adjust for daylight savings time (DST). 

Is there any concise solution that does not require me to define SQL functions or have lookup tables? I also don't want to use the difference between GETDATE() and SYSUTCDATETIME(), because the timezone of my server is not my local timezone.

View 5 Replies View Related

Loading 32 Bit Database Into A 64 Bit Database And Vice Versa

Oct 9, 2007

1. Is it possible and what would be the gotchas for taking a backup of a database in a 32 bit instance of sql server 2000 and loading it into a 64 bit instance of 2000? How about 2005 to 2005?

2. Is it possible to reverse that and go from a 64 bit to a 32 bit?

3. How about going from a 32 bit sql server 2000 into a 64 bit sql server 2005?

We're on the verge of upgrading a rather large database from sqlserver 2000 (32 bit) into 2005 (32 bit) but they anticipate eventually upgrading the hardware to 64 bit at least for production. The test node would remain at 32 bit.
Thanks for any help.

View 5 Replies View Related

Connect To Oracle Stored Procedure From SQL Server Stored Procedure...and Vice Versa.

Sep 19, 2006

I have a requirement to execute an Oracle procedure from within an SQL Server procedure and vice versa.

How do I do that? Articles, code samples, etc???

View 1 Replies View Related

Compact Framework SqlClient Classes Don't Actually Inherit From System.Data.Common.Db* Classes?

May 23, 2007

As you all know, in Framework 2.0 on the desktop platform you have the convenient "abstract" Db* classes that can be used to write more generic code. For instance System.Data.SqlClient.SqlConnection inherits from System.Data.Common.DbConnection, and so forth. Now the docs clearly say that this applies to the corresponding classes in the Compact Framework. And i have seen this implied by other web searchs I've done. However this does not seem to be the case -- or, I'm missing something somewhere.

The following simple code on the desktop platform compiles OK:

using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
DbConnection conn = new SqlConnection();

However it doesn't compile in a compact framework project: "Cannot implicitly convert type 'System.Data.SqlClient.SqlConnection' to 'System.Data.Common.DbConnection'".

Reflector also indicates that the Compact Framework class doesn't inherit from DbConnection.

OK, so am I missing something here, or what was the reason that Microsoft did it differently??

View 1 Replies View Related

SSIS Classes -- Recommendations (Brian Knight's Classes Are Full)

Aug 18, 2006

Anyone have a recommendation on SSIS classes (providers and instructors)? It looks like Brian Knight's classes must be at the top of the list. His classes are always full!

View 5 Replies View Related

DB Design :: Table Design For Packages

Aug 18, 2015

I would like to create a table called product. My objective is to get list of packages available for each product in data grid view column while selecting each product. Each product may have different packages type (eg:- Nos, CTN, OTR etc). Some product may have two packages and some for 3 packages etc. Quantity in each packages also may be differ ( for eg:- for some CTN may contain 12 nos or in other case 8 nos etc). Prices for each packages also will be different that also need to show.  How to design the table.. 

Product name   :  
Nestle milk |
Rainbow milk
packages  :
CTN,OTR, NOs |

CTN, NOs
Price:
50,20,5 |
40,6

(Remarks for your reference):CTN=10nos, OTR=4 nos  
| CTN=8 Nos

View 3 Replies View Related

Treating Db Tables As Classes?

Dec 9, 2005

I'm still trying to transition from a DB-centric view to an OO view,
and I could use some help from any of you OO-design wizards out there. A very common db representation is Table A, Table B, and Table A_B, which maps the two in a one-to-many relation. E.g., create table Companies (  companyId int,  name varchar ); create table Products (  productId int,  name varchar ); create table Companies_Products (  companyId int,  productId int ); So how does this translate into object-land? I started with: public class Product  public id as integer  public name as string end class public clas Company  public id as integer  public name as string  public products as generic.list(of Product) end class OK,
so far, so good -- I've represented most of my data. But I've lost some
important information: given a Product object, I have no easy way to
find out which company sells it. SQL: scan the Companies_Products table OO: iterate through companies, nested iteration through company.products. Do I just add a function to my data access layer that does the lookup? Is that allowed? On
a side note: can anyone recommend a good intro to OO design
specifically for database programmers? It seems like most of my
confusion comes from issues of translating tables into classes. Thanks!

View 3 Replies View Related

SQLXML Classes Deserializing.... Nothing....

Jul 20, 2005

I am using SQLXML to pass data back and forth, well I am trying to. Itry to follow a tutorial but it didn't work completely. Here is myproblem. After everything executes with NO errors, my class has nodata. Here were my steps.1. In Query Analyzer, I ran my Select statement....Select * From Notifications Where UserID = '4192' and ParentID ISNULL for XML AUTOIt returned...<Notifications ID="1" UserID="4192"CreatedWhen="2004-08-31T00:00:00" ModifiedWhen="2004-08-31T00:00:00"ModifiedBy="1" Class="1" Name="CONSILIUMSOFT" Enabled="1"/>2. I saved the result in Test.xml.3. Ran XSD on it. C:Test>XSD TEST.XMLThis MS utility wrote out the schema file, TEST.XSD4. Ran XSD on it to create the class. C:Test>XSD TEST.XSD /classes/language:csThis MS utility wrote out the CS class file, TEST.cs5. Added the CS file to my project, create a class around it and thecode is below.My problem is that when I put a break point where is says BR (in thecode below), pNotifications has no data in it. All the values areNULL.ANY ideas? I getting desperate....I should mention that I am doingthis in ASP.NET and SQL 2000 sp3Ralph Kraussewww.consiliumsoft.comUse the START button? Then you need CSFastRunII...A new kind of application launcher integrated in the taskbar!ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpg************CODE*******************public class CNotifications{SqlXmlCommandobjXMLCommand = newSqlXmlCommand(ConfigurationSettings.AppSettings["XMLConnectionString"]);NotificationspNotifications = new Notifications();public CNotifications(int iID){try{objXMLCommand.RootTag = "Notifications";objXMLCommand.CommandText = @"Select * From Notifications WhereUserID = '" + iID + "' and ParentID IS NULL for XML AUTO";objXMLCommand.CommandType = SqlXmlCommandType.Sql;objXMLCommand.ClientSideXml = true;XmlReader pXMLReader = objXMLCommand.ExecuteXmlReader();XmlSerializer pSerializer = newXmlSerializer(pNotifications.GetType());pNotifications = (Notifications)pSerializer.Deserialize(pXMLReader) ;pXMLReader.Close();}catch (SqlXmlException objEx){objEx.ErrorStream.Position = 0;string strErr = (new StreamReader(objEx.ErrorStream).ReadToEnd());throw new Exception (strErr);}BP}}

View 1 Replies View Related

Sql Server CE Supported Classes

Jul 27, 2006

ahi all

iam new to VS.net 2005 and iam trying to convert ready made application from vb.net 2003 to vb.net 2005

and i cant find the sqlcedataadapter

its a windows CE application uses SQL Server CE

and i imported the system.data.sqlsrverce

and i added the sqlserverce refrence

may be its a new classes?

View 1 Replies View Related

DTS Classes Not Showing In Visual Studio

Feb 27, 2007

I am trying to use VB.NET to run SSIS packages. However I don't have the various dts namespaces available. When I attempt to import them I only have Microsoft.SqlServer.Server in intellisense.

I am running on XP sp2, VS 2005 (full install) and even went so far as to install sql 2005 sp1 full install on my local machine.

What gives with only having Microsoft.SqlServer.Server available?

thanks,

Scott

View 10 Replies View Related

Sql Query Statements &&amp; ADO.NET Connected Classes.

Oct 9, 2007

Hi all,

Do I still need to write the .sql query statements (in SSMS) if I use the ADO.NET connected classes like GetSchema method or the DbDataAdaptor Object?

I'm very new to Visual Studio 2005 & SQL Server 2005..

Thanks!

View 3 Replies View Related

Showing Classes And Structs In ReportViewer

Nov 22, 2006

I show business objects in the ReportViewer as it is described in the MSDN article [1]. In the article they only use intrinsic types like int and string as properties of the business object.

My business objects contains also structs and classes (e.g. Point) as Properties. I expected the Reporting Services to call the ToString() method if it is not an intrinsic type. But it only shows the error string "#Error" in the TextBox.

How can I show a Struct property of my business object as a report value?



[1] MSDN article: "Walkthrough: Using a Business Object Data Source with the ReportViewer Windows Forms Control in Local Processing Mode"

View 1 Replies View Related

How To Refresh Linq-To-SQL Classes After Schema Changes Without Dropping And Adding

May 28, 2008

All --
Please help. 
I need to know how to refresh Linq-To-SQL classes after schema changes without dropping and adding them.
Now, when I make a schema change (such as add or delete a column to a table), I want to "refresh" the Context.dbml file.
The only way that seems to work is to drop the table from the Context.dbml designer and then add it back in.
Is there a better way to do this?
How are others doing this?
Please advise.
Thank you.
-- Mark Kamoski

View 5 Replies View Related

Microsoft.SqlServer.Management.Smo Backup And Restore Classes

Jan 10, 2006

Hi,

Hopefully someone out there will be able to help me with this question. I'm trying to setup my C# program to use the Backup and Restore classes to perform backups and restores on an SQL Express 2005 database.

From the documentation I've read... it seems that when you go to restore the database, it's a good idea to backup the current transaction log. But when I do this using the Backup.SqlBackup method I get an error saying that no database backup is detected so a log backup can't occur. I'm not sure if this has something to do with the fact that I moved my backup files from the default SQL Express/Server Backup folder to a different location. Shouldn't it know I've already performed a backup though?

And does anyone know how to set a parameter to backup to a different file location than the default? I've been doing a backup then a file move. Works the same, but it would be nice to have everything together in the Backup object.

Thanks!

View 4 Replies View Related

DB Design :: Insert / Update FACT Table From Staging Table

May 6, 2015

We need to Insert/Update a Fact Table from staging Table. currently we are using a SP which update Fact Table for Each region.  this process is schedule,  every 5 min job is run and Update fact table.but time of Insert and Update too long from  staging  to Fact, currently we are using merge statement for Insert and update.in my sp we are looping number  how many region we need to update and at a time single Region we are updating using while loop in current SP.

View 7 Replies View Related

DB Design :: Table Partitioning Using Reference Table Data Column

Oct 7, 2015

I have a requirement of table partitioning. we have 10 years of data on a table which is 30 billion up rows on 2005 server we are upgrading it to 2014. we have to keep 7 years of data. there is no keys on table or date column. since its a huge amount of data and many users its slow down the process speed. we are thinking to do partition on 7 years for Quarterly based. but as i said there is no date column on table we have to use reference table to get date. is there a way i can do the partitioning with out adding date column on table? also does partition will make query faster? 

I have think three ways to do it.
1. leave as it is.
2. 7 years partition on one server
3. 3 years partition on server1 and 4 years partition on server2 (for 4 years is snapshot better?)

View 3 Replies View Related

Query Analyzer Does Not See Enterprise Manager Database And Vise Versa

Jul 23, 2005

I am using SQL Server 2000.I have created a new database in Query Analyzer but I cannot see it inEnterprise Manager.I then created a new database in Enterprise Manager, but I can't see it inQuery Analyzer.How do I get these applications to see the databases that the other creates?Thanks,Greg

View 1 Replies View Related

Transact SQL :: Script To Set DB In Simple Recovery Mode And Visa-Versa

Jun 15, 2015

Wondering whether I can have following included in a script file:

1. set the current single user db from Full to Simple recovery mode.
2. Checkpoint and shrink the transaction log file (release all unused space)
3. set the current single user db from Simple recovery to Full recover mode.

View 7 Replies View Related

SQL Server 2008 :: How To Improve Speed Of Initial Query Vice Subsequent Queries

Apr 23, 2015

I have a pretty large DB and a fairly complex query. If I drop buffers and clear cache the query runs in 20 seconds returning 25K rows. Subsequent runs are 2 seconds. Is this the result of the results being cached, execution being cached, other? Are there good ways to close the gap between the initial and later runs? Does the cache stay present until the service restarts or does SQL recycle the memory and if so, based on what criteria?

View 5 Replies View Related

DB Design :: Insert Data From One Table To Another Table

Jul 30, 2015

I have to tables like given below Landing table "A" (Data load will happen over here, No primary keys mentioned over here) table "B" .Now I want to move the data from A to B.I have made use of below query insert into B select * from A...Landing table "A" has huge no of records, MS SQL server is taking huge amount of time.any alternative way to make this insertion process faster?

View 6 Replies View Related

Table Design

Apr 30, 2008

Hi, I am developing an application to a garment factory. I have a doubt in designing a table.Basic tables:Jobs, JobColors, Material, Units, Currencies ...These tables are designed with normalization rules.I got a problem at PurchaseOrderDetailsMain
table is JobMaterial. It has materialid, jobid, supplierid, description
and TypeFactor(which represents the type of order) means that the
material is ordered based on size or colors or total qty.1 for ByColor, 2 for BySize, 3 for ByQty, 4 for By Contrast colorsThe main problem at the details of the sub table.JobMaterialDetailsIf typefactor is by size, i need to store the details based on sizeex: S - 2000pcs, M - 4000pcs, L - 4000pcs, XL - 2000pcsSo I will have 4 records per each sizeIf it is by color, White - 3000pcs, Portabella - 5000pcs, Black - 2000pcs.If it is by general, Total qty 10000pcsHow
can I design this table. If I take, ColorOrSize column, it will refer
different values for diffrent typefactor. When by size, it will have
Size and when by color, it will refer colorcode.But colors are having referential integrity. So it is violated other than by color as typefactor.What is the best way to design this table?Can anybody suggest?Thanks in advance

View 2 Replies View Related







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