Hi all
sometime we need to use database in our application.
But when the data is small in quantity,may be it would be better if
we use small DB or tiny which can be embeded inside the application itself.
Is such kind of small DB available ?
Or is there any example of using any way to be used like a tiny db ?
thanks & regard
han
Loading
Sam HobbsPosted Nov 23, 2009, 11:28 PM
Sam HobbsPosted Nov 23, 2009, 1:18 PM
A primary key in XML is apparently specified using a Unique Element; see Mapping unique XML Schema (XSD) Constraints to DataSet Constraints. Also see Map Relations Specified for Nested Elements (ADO.NET)
DataTable.WriteXml Method shows another way to store XML from data in memory.
Kirtan PatelPosted Nov 23, 2009, 1:14 PM
New Name space called System.Data.SqLite
then we can perform operations as we do with other databases :)
and Greate thing is its working with windows Mobile too :D
http://sqlite.phxsoftware.com/
Sam HobbsPosted Nov 23, 2009, 12:47 PM
Kirtan PatelPosted Nov 23, 2009, 12:42 PM
SQL Server Compact edition Needs that SQL Server Compact Edition to be installed on System in order to run the application that uses Compact Edition database
While SQL Lite does not need any Extra Support then just its one dll file and it will work even if its not installed on a system :) thats why its very portable and used in many applications.
XML is good choice but still its hard to build Primary key and Foreign key relationship in XML files :)
Sam HobbsPosted Nov 23, 2009, 12:27 PM
If you need to save the data as a database, you can use SQL Server Compact Edition (CE). It is used in Windows Mobile but it can also be used in a desktop application. It is free.
You can use XML to store the data. Use the XmlSerializer Class to read and write the data.
In your program, you can use many classes in the System.Data Namespace (), such as the DataSet Class (System.Data) and DataTable Class (System.Data). You can create objects of those classes in memory during execution and get and put the data from wherever you need to. The .Net classes and framework offer many ways to work with "objects"; it is possible to write a simple program that uses objects, and there are complete books about how to use objects.
Microsoft uses the term "bound" to refer to forms and controls that can automatically get and put data. That is a bit of an over-simplification and you need to learn about how it works. You can read data into and write data from XML and store the data in memory as objects and bind forms to the objects.
Also look at Language-Integrated Query (LINQ) and LINQ. It is like a complete database system all in memory.
Also there is a lot to read in Accessing Data. See Data Walkthroughs for some examples of things that can be done; not all examples use SQL Server.
Note also that if you choose to use SQL CE (Compact Edition), most SQL Server samples can be converted to using SQL CE by changing the classes to use the SqlCe prefix instead of Sql; for example, the SqlCeConnection Class is the CE quivalent of the SqlConnection Class. Also, for connection strings, a SQL CE connection string usually consists of only a database file path, as in:
Data Source=C:\Temp\Temporary.sdf
hanafi tanudjajaPosted Nov 22, 2009, 6:08 PM
thank you for your info,
I will come and take a try Sql Lite
regard
han
Kirtan PatelPosted Nov 22, 2009, 10:47 AM
SQL Lite is small db that can be integrated with Application
for example Firefox Browser using SQL Lite Database to Store its Settings
For Connecting SQL With .net use SQl Lite .net connector
http://www.sqlite.org/index.html