Please, How To Realize Generalization In Sql Server Database

Dec 12, 2006

please help, I need professional approach how to realize generalization
(parent_table <- child_table) idea in sql server databse?

in my Oracle db I can have PK of child_table as FK from parent_table: let's
have shop with shoes, selling shoes, and foosd as well. Example of keys in
my tables:

Product (=parent_table)
-------------
1
2
3
4
5

Food (=child_table)
-------------
2
3
4

Shoes (=child_table)
-------------
1
5

Is that good idea, or not, and may I have the same in SQLServer (2005) ?
(and, what about administrative aspects (like
performance/concurency/updating ..) of generalization in RDMS?)




regards

View 1 Replies


ADVERTISEMENT

How Realize Windows Authentication In Small Networks?

Jun 14, 2006

Hello,

In SQL Servern Books is written:
SQL Server Authentication is provided for backward compatibility only. When possible, use Windows Authentication.

How can Windows Authentication be realized in small networks from two ore more computers running Windows XP?

Having all a application written in VB Net 2005 for example, which connects to a central database on one computer. Where the cost and afford for a domain controller running Windows Server is not necessary.

If Windows Authentication can't be realized or can't be realized easy in such a scenario, and SQL Server Authentication is not supported any more, then SQL Server can't be taken as database server for this scenario, where the focus is at simplicity and low cost.

Regards,
Markus

View 5 Replies View Related

Accuracy Vs Generalization

Apr 15, 2006

Hi!

So sorry for posting yet another one of my silly posts about the correct way of doing things!



I am using Stored Procedures to do various things in my database (inserting/deleting/updating) and using SQL Server 2000 SP4



The current situation is that I have a stored procedure which checks certain user details and returns either -1 or 1 as a success indicator to the caller.



Now, obviously if we executed several queries in this stored procedure, performance will be an issue.

However, I have no idea how to balance up the whole "more useful information" vs "general information". What I mean is this:

if we are checking 3 items in a table, I want to return the success value back to the caller - in this case, we could do an IF statement to see if the record exists, if it does, set the return value to 1, else, -1.



But then you may want to be more informative to the user, specifically stating what part of the information they entered is incorrect/invalid. So having this in mind, we would then need to execute, say, 3 queries to return a more specific "error" value.



What should I do in this case?

I want to check the username, password and if the account is activated.

Currently I have this query going on:



IF EXISTS (SELECT [ID] FROM Users WHERE username = @un AND [password] = @pw AND activate = 1)

SET @theResult = 1

ELSE

SET @theResult = -1



firstly, is that the good way of doing things? if not - then what is the better way?

secondly, if we decide that we want a specific detailed return value/error message, it would mean I have to check the results I want using a couple more queries, such as one query to check username, one query to check password and another to check if the account is active or not and then return the appropriate value back to the caller.



is this a good way of doing things? I am confused and stuck!



Many thanks for your valuable response :)

View 3 Replies View Related

Generalization/specialization

Aug 2, 2007



I have a db design which includes generalization/specialization. How can I implement this in sql server?
thanks so much!

View 4 Replies View Related

SQL For Modeling Generalization Hierarchies

Jul 20, 2005

Is there a good approach to modelling many heterogeneous entity typeswith that have some attributes in common?Say I have entities "employees" which share some attibutes (e.g.firstname, lastname, dateofbirth) but some subsets of employees (e.g.physicians, janitors, nurses, ambulance drivers) may have additionalattributes that do not apply to all employees. Physicians may haveattributes specialty and date of board certification, ambulancedrivers may have a drivers license id, janitors may havepreferredbroomtype and so on.There are many employee subtypes and more can be dynamically addedafter the application is deployed so it's obviously no good to keepadding attributes to the employees table because most attributes willbe NULL (since janitors are never doctors at the same time).The only solution I found for this is a generalization hiearchy whereyou have the employee table with all generic attributes and then youadd tables for each new employee subtype as necessary. The subtypetables share the primary key of the employee table. The employee tablehas a "discriminator" field that allows you to figure out whichsubtype table to load for a particular entity.This solution does not seem to scale since for each value of"discriminator" I need to perform a join with a different table. Whatif I need to retrieve 1,000 employees at once?Is that possible to obtain a single ResultSet with one SQL statementSQL?Or do you I need to iterate look at the discriminator and thenperform the appropriate join? If this kind of iteration is necessarythen obviously this generalization hierarchy approach does not work inpracticesince it would be painfully slow.Is there a better approach to modelling these kind of heterogeneousentities with shared attributes that does not involve creating a tablefor each new employee type or having sparce tables (mostly filled withNULLS)I guess another approach would be to use name/value pairs but thatwould make reporting really ugly.Seems like a very common problem. Any ideas? Is this a fundamentallimitation of SQL?Thanks!- robert

View 13 Replies View Related

SQL Server Admin 2014 :: How To Position 5 Database Server For Centralized Database For Application

Jun 3, 2014

1) We are providing a e governance solution for an organization,where we are providing a centralized database,Client have provided 5 Database server for the same.how can we position the Database Server? there are 5000 Concurrent users and 25000 users,SAN Storage for approx. 60 TB,Database size of 2 TB and growth of 1 TB every year

2) How many instance can we have for above said Case?

3) How much RAM Required ?

View 0 Replies View Related

SQL Server Test Database To SQL Server Production Database -- Data Migration

Feb 25, 2006

Hi,

Is there any tool available to migrate the data from the SQL Server test database to SQL Server production database. Data Migration should be based on a condition which can be given as an input for a table by the user. The dependant tables also should be migrated based on the given condition. i.e data subsetting based on the matching conditions.

Ex : Salary > 2000

The rows of the table which matches the condition alone need to be migrated for the corresponding table. Also its dependant table's rows should be migrated based on the given condition. Please help me with a tool which can automate this.

Thanks,
MiraJ

View 4 Replies View Related

Select Data From Table In One Database Server While Connected To Another Database Server.

Dec 18, 2007



Hi,


Is there a way in SQL Server 2005 to use a select statement to fetch data from a table in another Server while running the query in one Server.

Like using a database Server Link in oracle...


Thanks
Pramod

View 8 Replies View Related

Moving An Sql Server 2005 Database To A Sql Server 2000 Database

Dec 12, 2006

I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database.
I'm not sure the best way to do this.......
Can anyone enlighten me?.....
 

View 4 Replies View Related

SQL Server 2005 Express: The Database Principal Owns A Schema In The Database, And Can Not Be Dropped.

Jan 11, 2006

I recently added a new user to my database.  Now I want to delete that user, but I keep getting the error above.  What do I need to do to delete my recently added user?

View 4 Replies View Related

SQL Server 2008 :: How To Update The Database Physical File Location In Master Database

Mar 8, 2015

I had to to relocate the database log file and I issued an Alter database command but by mistake I put a space in the file name as below. The space is at the beginning file name. Now I am unable get the database loaded to SQL Server. The database has 2 replications configured, so deleting and re-attaching the database means the replication needs to be re-configured. Is there an alternative way to issue a command to update the database FILENAME ? Not sure if this can be edited in master database (sys files).

ALTER DATABASE [User_DB]
MODIFY FILE (NAME = User_DB_log, FILENAME = 'I:SQLLogs User_DB_log.ldf')
GO

View 1 Replies View Related

I Have A Database On A Network Drive That I Use For Archiving Purposes, But When The Server Is Rebooted The Database Becomes Suspect.

Mar 31, 2007

I created the db with the attached script and I am able to access ituntil I reboot the server. I've tried enabling flag 1807 via the SQLserver service and the startup parameters of the instance. In allcases the database always come up suspect after a reboot. There wasone instance where I was able to recover, but I am not sure how thathappened.Does anyone have an idea of how I can reboot the server without thedatabase becomming suspect?USE MASTERGODBCC TRACEON(1807)GO--DBCC TRACEOFF(1807)--DBCC TRACESTATUS(1807)GOCREATE DATABASE ReadyNAS ON( NAME = ReadyNAS_Data,FILENAME = '\NAS1NASDiskSQL ServerReadyNASReadyNAS_Data.mdf',SIZE = 100MB,MAXSIZE = 20GB,FILEGROWTH = 20MB)LOG ON ( NAME = ReadyNAS_Log,FILENAME = '\NAS1NASDiskSQL ServerReadyNASReadyNAS_Log.ldf',SIZE = 20MB,MAXSIZE = 100MB,FILEGROWTH = 10MB)

View 5 Replies View Related

Question: Can I Synchronize The Mobile Device Which Has A SQL Server CE Database With The Access Database On The Desktop?

Sep 26, 2006

Dear All,
i have a question abt winCE 4.2 and SQL server CE.
i am using VB.net of Visual Studio 2005
My platform is using a PDA with winCE 4.2 and SQL server CE. The Host program is using dbf files on desktop side.


I got a problem of how to sync / read the sql CE data from a windows application.

so, i wanna ask,

1. any method to access the data from winCE data by windows application? or can i convert the sdf file to windows readable files? or any others?

2. Can i use a MDB to sync with SQL server CE?
can i synchronize the mobile device which has a SQL Server CE database with the Access database on the desktop?

last question,
3. is that windows CE .net 4.2 not support pocket access (cdb) anymore?

please help me out

View 1 Replies View Related

SQL Attached Mdf Database Files VS Database Imported Into Or Created In SQL Server 2005

Apr 8, 2007

 Hi all (newbie @ asp.net)(oldie @ ASP 3)What is the purpose of using an attached MDF database files in the App_Data folder on a web site as to importing it into the SQL server directly or creating it on the SQL server. Does a mdf database attached file purely use the SQL server as a connection interface.Is it something similiar to DSN(ODBC) Connections for ms access databases.

View 2 Replies View Related

How To Change The Data Format For A Single Database In A SQL Server Group Of Database

Nov 1, 2001

Hi all,

I have to change the date format for one database in a group of databases in my sql server 2000,Can you please tell me how to change the date format.


thanks in advance

View 1 Replies View Related

SQL Server Admin 2014 :: Restoring A Database Even If No Database Or Backup Encryption

Sep 3, 2014

I did tried the encryption on server "A" for database "AdventureWorks2012". Then I tried to restore to server "B". There was the certificate issue, and I thought "of course : it's encrypted ! Let's deactivate it". So here I go "ALTER DATABASE AdventureWorks2012 SET ENCYRPTION OFF".I look at sys.databases : not encrypted.I backup using no encryption, I verify using msdb.dbo.backupset : not encrypted.

I move my backup to my other server where encryption was never configured (so no certificate, nothing...), and I have the error :
Msg 33111, Level 16, State 3, Line 1

Cannot find server certificate with thumbprint '0xFA130E58C999C4919B8975999C83A75A403B11D8'.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

View 6 Replies View Related

SQL Server 2008 :: Script To List All Database Level Permissions In A Database?

Aug 4, 2015

I found this script online..

SELECT prin.[name] [User], sec.state_desc + ' ' + sec.permission_name [Permission]
FROM [sys].[database_permissions] sec
JOIN [sys].[database_principals] prin
ON sec.[grantee_principal_id] = prin.[principal_id]
WHERE sec.class = 0
ORDER BY [User], [Permission];

but the results are this: 2 columns - User and Permission

User Permission
User1 GRANT CONNECT
User2 GRANT CONNECT

IS there a way in SQL Server (2005/2008/2012) to run a script against a Database that will show all users that have permissions to that Database and the type of permissions?

View 7 Replies View Related

SQL Server 2014 :: Restoring Database Programmatically But Not Over Existing Live Database

Aug 6, 2015

I want to restore a database (from an encrypted .bak file) - but *not* over the live original if you take my meaning. Encryption is the standard AES-256 that comes with Sql Server 2014 btw. I don't want the original touched/altered in any way. I would like to capture a success message if possible.I can extract the physical device name of the database in question using the following code:

SELECT physical_device_name, *
FROM msdb.dbo.backupmediafamily
WHERE media_set_id =(SELECT TOP 1 media_set_id
FROM msdb.dbo.backupset
WHERE database_name='MyDatabase'
AND type='D'
ORDER BY backup_start_date DESC)

I would like if the newly restored database was rename to something different than 'MyDatabase' (as shown above) and has different logs than the original. If possible, and capture a success message when restored.

View 5 Replies View Related

ODBC Connection From Access 2007 Database To SQL Server 2005 Database

Feb 29, 2008

I need detailed instructions on how to connect to a database from a Microsoft Access 2007 database to a Microsft Office Accounting 2007 database. The accounting database is an SQL 2005 datbase. It has an instance name of "MSSMLBIZ".

When I try I get an SQL error 53. Do not have permissions or database does not exist.

Thanks in advance for any help.,

View 1 Replies View Related

Not All Database Failover To Mirrored Database Server When MSSQL Service Stopped

Sep 4, 2007

We have a Prinicipal, a Mirror and a Witness server. We have automatic failover configured between the Prinicipal and Mirrored server. When we stop MMSQL service on Prinicipal, not all the databases failover to the Mirrored instance.
Any suggestions would be welcomed as we have a tight deadline to get this in Production.

View 5 Replies View Related

Create Database Permision Denied In Database ' Master' (MS SQL SERVER, ERROR 262

Feb 17, 2007

Cn not do anything with my sql server, everything i trt to do i get this message, user does not have permision, etc, ,

I am running windows Vista Business, SQL SERVER 2005

so what going on here

View 23 Replies View Related

SQL Security :: Cannot Expand List Of Database Tables Using Contained Database Login With Server Management Studio

Jul 30, 2015

In SSMS, I connect Object Explorer to a partially contained database using a contained user login with password. This user has a database role of dbdatareader. When I try to expand the Tables in the database, I get the error: 

The SELECT permission was denied on the object 'extended_properties', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)

Is there a way to set permissions for the contained user so that this could be done?

View 4 Replies View Related

Converting From Express Database To Main Sql Server 2005 Database

Jan 23, 2008

Hi,
What are the steps required to migrate or upgrade  data or database from a sql server 2005 express database to main sql server 2005 database?
Regards,Sandy

View 1 Replies View Related

Transfer Data From A Foxpro Database File To Sql Server Database

Jun 11, 1999

i have a old database in foxpro and it has to be converted to sql server 6.5 database . the table in the foxpro has been broken into more than 1 tables in the sql server . so how can i transfer the data from 1 foxpro table to different tables in sql server 6.5.
vineet

View 1 Replies View Related

Upgrading Sqlce 2.0 Database To Sql Server For Mobile Database On Desktopn

Oct 23, 2007

can we upgrade a sqlce forgotten password database to sql server for mobile database on our desktop


Thanks & Regards
Mukesh Gupta

View 1 Replies View Related

SQL Security :: Log Ship Database In Server Instance In One Domain To Database

Jul 2, 2015

I had created 2 Sql server instance in 2 servers created using VMware. From the primary server I log shipped the required databases into the secondary. Both the servers were in the same domain whose active directory was also in another server in the same virtual lab environment. My question can we have the primary sql server in one domain and the secondary sql server to which the logs are shipped in another domain by including a router also between the 2 networks for connectivity?

View 6 Replies View Related

SSIS Synchroniseing Of A Access Database &&amp; Sql Server Database So They Both Run In Parrallel

Apr 19, 2008

Hi I am wondering if anyone knows of a way of synchroniseing two versions of a database one in access and one in sql server so they can both run in parrallel in ssis for updates etc.

Also can anyone recommend a book which is easy to use or resources as I can't find what I am looking for in the online help.

Thanks in advance

View 4 Replies View Related

How To Enable The Option Of Create New SQL Server Database From Database Explorer

Nov 10, 2006

Hi there

I am working on Visual Web Developer Express Edition 2005. When I right click on database explorer to create an SQL server database then I always find the option " Create New SQL Server database " Disabled.

Can any one tell me how to enable that option please ?

View 4 Replies View Related

Recreating A Sql Server 2000 Database As A 2005 Database

Jan 25, 2007

 
I am working on a project that was written in Visual Studio 2003 using asp.net and C#.  The project accesses a SQL Server 2000 database. I need to test the application. What I want to do is to copy the database over to a test server. The problem is that the test server only has SQL Server 2005 on it. Would it be a problem if I backed up the database using SQL Server 2000 and then recreated it on the server as a SQL server 2005 project? Would my source code accept the new database even though it would now be in sql server 2005? 
 

View 2 Replies View Related

How To Transform An .MDF Database Into A Permanent Database In Sql Server Express?

Apr 10, 2007

Hi, i have a MDF file used by an asp.net application (with sql server 2005 express).
I want to make it to a permanent database in sql server express.
I know that i can attach it from Management Studio, but is there no better way?
Does it exist a way to 'import' or 'migrate' or copy' a .MDF.database into the central sql server, as if created directly in sql server express? After that, i can delete the .MDF file.
Thanks
Tartuffe

View 3 Replies View Related

Replication - Changes To Server Database's Impact To Local Database

Jul 20, 2005

We have a SQLSERVER database that is replicated to many users.We are currently in an expansion phase where we need to make changesto the server database. Each time we rollout a new release, we aredeleting the local replicating database and recreating.Is there any way to automatically transfer the changes from the serverto existing local database without deleting?

View 1 Replies View Related

Upgrade SQL Express Database To SQL Server Standard Database

Dec 6, 2006

Can I upgrade SQL express database to SQL server Standard database? Please give information to me! Thank you!

View 4 Replies View Related

Can I Import Backup Database Into Another Database Server.

Jan 12, 2008

 I have a backup of sqlserver  2000 data base . Now presently i am working on sqlserver 2005. Is there any facility to IMPORT entire 2000 database intosqlserver 2005.Please help me if there is any chance.  Thanks in advance.  

View 1 Replies View Related







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