Storing History In Database

Nov 25, 2003

Does anyone currently do this. I want to store an audit history for changes made in the database through our web application.





I would like some kind of history table structure. I would be interested to see if anyone else has done this and what your structure looks like.





ScAndal

View 1 Replies


ADVERTISEMENT

Which Is Better? Storing Data In The Database OR Storing It In The File System

Dec 29, 2006

Hello there,I just want to ask if storing data in dbase is much better than storing it in the file system? Because for one, i am currenlty developing my thesis which uploads a blob.doc file to a web server (currently i'm using the localhost of ASP.NET) then retrieves it from the local hostAlso i want to know if im right at this, the localhost of ASP.NET is the same as the one of a natural web server on the net? Because i'm just thinking of uploading and downloading the files from a web server. Although our thesis defense didn't require us to really upload it on the net, we were advised to use a localhost on our PC's. I'll be just using my local server Is it ok to just use a web server for storing files than a database?    

View 6 Replies View Related

Database History

Jan 14, 2008

hello,
I'm am looking for a smart solution for keeping history of changes in records in my sql database. Not only history of a record but also which user caused the change and when (I have the username in session).
for now I added 4 fields to each table: "created by","created on","cancelled by",cancelled on", when the user create a record the 2 first fields are filled and and a user delete a record the two last fields are filled and the record is not really deleted but it won't be shown again (I'm using "where createdby is null").
this solution is taking the performance down and it does not solve the editing record tracking. creating new records and cancelling old ones for editing/changing solve that but than I m having problems with the primary key and relations to other tables.
I tried also to use a table that holds records that descirbes every change in records in my tables. it's very hard to search old data that way.
I know that oracle databases has a smart solution for history...   please someone advise me..
Elad.

View 1 Replies View Related

Database Restore History

Jul 16, 1998

When I go to the database restore tab the "backup history" window shows the database backups and log backups from all the way back when the database was initially created. How do I purge the old database and log backup entries?

View 1 Replies View Related

Trading History Database Help

Sep 27, 2007

I'm creating a db to be used to store historical trades which will then be used to report on various strategies/returns etc...

I'm struggling with the correct way to store things like price etc...

Right now I have a table tStock which has pkStockId,StockName,Sector
I have a table tPrice which stores the historical prices which has pkCounter,fkTickerId,fkDate,Price,Volume. This seems odd to me since dates are being repeated. Right now I have about 100 stocks in table tStock and the tPrice table has 10 years of price data for each stock so there are a date range of historical prices which is approximately 252,000 records. That isn't a ton but I will probably end up with 500+ stocks and 20 years of data. Am I storing this correctly? Right now I have the pkStockId indexed and the pkCounter index and I also created an indes using fkTickerId and fkDate. Is there a way to create the tables such that looking up a price is faster? The reason I would like it to be faster is that when analyzing the trade history I need to get the portfolio market values based on various dates so at a certain date I will sum all buys - all sales for every stockid in the portfolio table and then look up the prices for each to get the market value of the portfolio on a particular day. I feel like I am missing something in the design process but don't have experience in this so I am asking for help.

Thanks

View 3 Replies View Related

Designing A Database Within A Database... Design Question Storing Data...

Jul 23, 2005

I have a system that basically stores a database within a database (I'msure lots have you have done this before in some form or another).At the end of the day, I'm storing the actual data generically in acolumn of type nvarchar(4000), but I want to add support for unlimitedtext. I want to do this in a smart fashion. Right now I am leaningtowards putting 2 nullable Value fields:ValueLong ntext nullableValueShort nvarchar(4000) nullableand dynamically storing the info in one or the other depending on thesize. ASP.NET does this exact very thing in it's Session State model;look at the ASPStateTempSessions table. This table has both aSessionItemShort of type varbinary (7000) and a SessionItemLong of typeImage.My question is, is it better to user varbinary (7000) and Image? I'mthinking maybe I should go down this path, simply because ASP.NET does,but I don't really know why. Does anyone know what would be the benifitof using varbinary and Image datatypes? If it's just to allow saving ofbinary data, then I don't really need that right now (and I don't thinkASP.NET does either). Are there any other reasons?thanks,dave

View 7 Replies View Related

DB Engine :: Determine Database Access History?

Jul 31, 2015

I was asked to determine the last time 2 databases were accessed.

Are the .trc files an accurate way to determine the database access history?

View 5 Replies View Related

SQL 2012 :: Database Failover History In AlwaysOn Group

Jun 16, 2014

If there is a history kept somewhere of failover events of a database in an AO group? I have 2 replicas with automatic failover and I'm looking for a history of failovers.

View 0 Replies View Related

Storing XML In Database

Jul 20, 2012

best way to store questionnaire data in a database.Since different questionnairs have different questions and formats i.e dropdown, radio, checkboxes etc building such a database model becomes highly complex.

I've read that if data schema is complex and higly variable it may be better to use an xml document and store that in a databse. However I dont quite understand how you store xml to a database. Do you simply store the entire structure in something like a nvarchar column or is there some other way to store xml to a database.

If you store the entire structure to the databse then how do you query the content to generate reports.

example xml:

Code:
<survey>
<meta>
<id>sample</id>
</meta>
<questions>
<question id="1" type="singlechoice" page="1">

[code]...

View 3 Replies View Related

SQL Server Admin 2014 :: Restore Database Without Backup History In MSDB

Jul 23, 2014

What is the best way to restore a database from a folder of backups (including full, diff and log backups) without using the backup history in msdb?

I have a restore process that restores all backups on a regular schedule in order to fully verify their integrity. To do this, I use the backup history in msdb on each server that I'm monitoring. I had a thought the other day that I would be in trouble if I lost msdb. Then my backup history would only be as good as the last backup of msdb.

What I'd like to do is read a folder of backup files and generate a restore script up to a specified time. Would I use RESTORE HEADERONLY to do this? If so, would I use PowerShell to traverse each file in the folder?

View 6 Replies View Related

Storing Hh:mm:ss In Database Which Datatype?

Jan 13, 2004

I have a bit of a dilema, that maybe someone can give a reccomendation on. I have a vb app that will calculate a duration that a process runs in hours:minutes:seconds. My question is should I store this in the database as a date/time field or calculate total seconds and store it as an integer field? I will be using this field for basic summing calculations in the future. Thanks for any help.

View 1 Replies View Related

Storing Numbers In Sql Database

Feb 24, 2004

Hello-

Im currently storing an account id in a sql table. Is there any column data type that would presere the numbers but make it appear as a series of letters and nmumbers when someone looks at the database table?

If not can someone give me a strategy

thx

View 4 Replies View Related

Storing Files In Database

Dec 22, 2000

Hi,
can we keep a file like word file or html file in the sql server database?
if yes, then can we search any thing in these stored file?
regards
mihir

View 2 Replies View Related

Storing Image In Database

Dec 15, 2004

How do you store an image in a database? I know this is not the preferred method for storing images but would like to know anyways…thanks.

View 1 Replies View Related

Storing Images In The Database???

Sep 22, 2004

hello ... i have a project this semester and i had to study is storing images in a database ( using Microsoft Access ) is good or bad ? so any one could tell me the advantages and the disadvantages please ...
thanks
bye

View 5 Replies View Related

Storing Images In A Database

Oct 6, 2005

An odd question from me, I know, but this time, I assure you a twist.

I have a group that wants to store images in either a database or a file share, in order to make a certain website able to run on a load balanced web farm. These images are around 1KB each in size, and have a lifespan of exactly one use (think of graphs). I went a-googling, and found no shortage of articles that say "don't do it, but here's how you can do it", but I did not find any real hard statements as to why to not do it. Needless to say, this is hurting the case for not putting these images in the database. I have found an article that says images over 8KB will have worse performance, but I can not use that factoid here. For the moment, I have the developers leaning toward the fileshare, because they will be writing transaction logs all day, which will be more work than the fileshare needs to do....I think. The best I can do, is cut the text/image datatype overhead, and have them create the table as varbinary(2000), but even then, I don't like the look of the idea.

Anyone out there have good articles/whitepapers that detail the differences between writing single-use images to a fileshare vs. a SQL database? <baiting=blatant>Failing that, do any of the Microsoft development team have an opinion?</baiting>

Alternatively, what is the general opinion of keeping session state information in a database (because I bet that will be my next battle). I see .NET includes a session state server, but not being a programmer, I can not create an opbjective test.

View 5 Replies View Related

Storing Pictures In Database

Sep 13, 2007

Hy, could someone help me in this:In design mode, i want to put pictures in database. I made column namedpics, and its type as image. How can I put pictures or some address of thesepictures in that column, or i maybe need to put pictures in Add_Data folderand make reference from there, or what I need to do?could someone explain me that process of putting at least one picture indatabase, I'm using Microsoft SQL Server 2005thanks everyone

View 4 Replies View Related

Storing Passwords In Database

Jul 20, 2005

hi,I would like to store windows passwords and usernames in database.Please tell me where to start?What database can I use?Can I use free microsoft database?ThanksBart

View 6 Replies View Related

Storing Files In Database

Apr 10, 2008



Hey I currently have a foreach loop container working which scans a folder, loops through the files in this folder and then moves them to a new folder.

At the same time I also do an SQL insert into a table logging the details of the transfer.

What I would like to do next is to store the actual PDF in binary in my DB (varbinary format). How would I go about this ?

View 6 Replies View Related

Storing SMS To My SQL Database..help Guys!!!

May 8, 2007

i use a teltonika t-modem gsm modem..

it's quite new actually and it is connected to my PC thru a usb port..



my problem now is that

i can,t seem to get the hang in storing received messages in

my SQL database..

the code goes like this..

a receive button is clicked to generate an instance

where all SMS sent to my sim card would then be accessed by my gsm modem..



private void btnReceive_Click(object sender, EventArgs e)

{

ListViewItem Component;

Cursor c = Cursor.Current;

Cursor.Current = Cursors.WaitCursor;

listView1.Items.Clear();

btnReceive.Enabled = false;

objGsmIn.Device = cmbDevice.SelectedItem.ToString();

objGsmIn.LogFile = txtLogging.Text;

if (cmbDeviceSpeed.SelectedIndex == 0)

{

objGsmIn.DeviceSpeed = 0;

}

else

{

objGsmIn.DeviceSpeed = System.Int32.Parse(cmbDeviceSpeed.Text);

}

objGsmIn.Storage = fMsgStore.MsgStorage;

if (fMsgStore.DelMsg == true)

{//deletes your message after receiving

objGsmIn.DeleteAfterReceive = 1;

}

objGsmIn.Receive(); //this checks your new incoming messages

if (objGsmIn.LastError == 0)

{

objGsmIn.GetFirstMessage();

while (objGsmIn.LastError == 0)

{

//continously receive all messages..

Component = listView1.Items.Add(objGsmIn.MessageSender);

Component.SubItems.Add(objGsmIn.MessageData);

objGsmIn.GetNextMessage();

}

txtResults.Text = "Messages Successfully Received..";

}

else

{

//error in message receiving process..

txtResults.Text = "Error " + objGsmIn.LastError + "(" + objGsmIn.GetErrorDescription(objGsmIn.LastError) + ")";

}

btnReceive.Enabled = true;

Cursor.Current = c;

}



now my problem is that i cant figure out where i would place my stored procedure

in storing those messages to my database..



the problem is that..

if i place my stored procedure on the 1st "IF" statement..

it will only save my 1st incoming message..



but another thing is that if i put it under my "WHILE" statement..

dont you think that it will continiously loop?

meaning to say that the next tym i tried to access all my received messages

it would definitely store all the previously read messages again to my database..

which then creates multiple copies of my previously stored messages again and again



well i hope you get the gist of what i mean..

its quite complicated to explain..

but then again thanks a lot for taking notice on my post regarding this..

thanks!!^_^



another thing..i used the active xperts c# application in order to

create this application..

View 2 Replies View Related

Storing The Big File In SQL Database

Nov 5, 2007

How can I store the big files in the SQL Database, like MP3 files or an image or an video file?

View 3 Replies View Related

What Is The Use Of Storing Data In 2 Database ? And How To Do That ?

Mar 5, 2008





Can I know answer of this question ? in detail explanation.

View 1 Replies View Related

Storing The Image Urls In Database

Mar 29, 2007

hi friends,
i want to show images in repeater control dynamically.
i want to store the image url in database
like i have stored the images on onefolder c:images this will contain images
how can i store and use the urls in database
or atleast how can i show the images from the folder dynamically
please help me out

View 3 Replies View Related

Storing Checkbox Values To Database

Mar 19, 2008

Hi i am trying to store the checkbox values on my page to the database, but im stuck on what to do. I have the following code already;protected void Btn_Subscribe_Click(object sender, EventArgs e)
{SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["streamConnectionString"].ConnectionString);
string strSQL = "INSERT INTO Newsletter(emailAddress) VALUES (@emailAddress)";SqlCommand Command = new SqlCommand(strSQL, conn);
Command.Parameters.Add("@emailAddress", SqlDbType.VarChar);Command.Parameters["@emailAddress"].Value = txtEmail.Text;
conn.Open();
Command.ExecuteNonQuery();
conn.Close();
}
How do i now insert the values from my checkbox, this is how i am setting the checkbox;public void Page_Load(object sender, EventArgs e)
{ArrayList values;if(!IsPostBack)
{
//Build array of data to bind to checkboxlistvalues = new ArrayList();
values.Add("Sport");values.Add("Gardening");values.Add("technology");
AlertList.DataSource = values;
AlertList.DataBind();
}
If i am going about it the wrong way please let me know, thanks

View 15 Replies View Related

Best Method For Storing A Time In A Database

May 22, 2008

Hi,I have a table which I need to store times in. What is the best way of doing this? The only way I can think of so far is to save the times as a datetime such as '1/1/1900 03:00 PM' then format the date as "hh:mm tt" so that the day isn't displayed. Is this the best method?Thanks,Curt.

View 6 Replies View Related

Storing A XML File In A SQL Server Database

Jun 23, 2004

I have records with 50 plus fields of data.I was thinking of writing all the fields data into a XML file and then store it in a SQL server database for retrieval later on.Is there anyway i can go about doing this?

View 6 Replies View Related

Storing Rich Text In A Database

Jan 27, 2005

Hey folks,

Just a quick question to ask what is the best field to store the data held in a rich text box/control. Just want to make sure that i get it right first time you know. Not sure about the amount of characters that needs held but its going to be quite a lot as this field shall contain most of my pages content.

Appreciate any help

Thanks

Turklad

View 3 Replies View Related

Storing Arabic String In SQL Database

Apr 19, 2005

I am having a problem in a VB.NET application, i have a form that the user fills to store data in the database, the problem is that when i enter Arabic string, it gets stored in the database as question marks '??????'
The database field type is nvarchar, anybody went across this problem?

View 1 Replies View Related

Storing Hierarchical In A Relational Database

Dec 27, 2005

What is the best approach for storing hierarchical
data in a database? For example, if I need to store a tree menu system,
how would I do that allowing for the most normalization within the
database, using the least number of queries/resources when pulling the
data out, and using the least amount of overhead both in storage and
retrival?

-Chris

View 3 Replies View Related

How Would I Go About Storing Pictures In A SQL Server Database?

Aug 18, 2004

I'm constructing an image gallery for my site and was wondering how to store the pictures in the database? Would the best way to do it, by storing the link instead of the image in the database?

How would I use the insert and select with it? :confused:

View 1 Replies View Related

Storing An Image Into Sql Server Database

Jul 23, 2005

Is there any way of storing an image file into a specific Table .It would be of great help for me if i come to know something about it.

View 2 Replies View Related

Storing Documents (.doc .xls .pdf .jpg Etc) In A Database Column

Jul 31, 2007

Does anybody know how to store objects like files in a database column/
I am familiar with MSAccess (use BLOB) and Oracle (use varchar200?

Raymond

View 1 Replies View Related

Storing Files To Server, Directory Or Database, Which Is Better?

Feb 9, 2007

Which is better, to store the files onto the server's folders or to a database?
I tried storing to MSSQL 2000 but the varbinary does not allow me to set "MAX" for the data type.
 

View 1 Replies View Related







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