There is a database on a local SQL Server 2014 server with four 1.5 GB tables. The essence of the program to search in the database records with the criteria that the user sets The program is written and works fine. It is necessary to make the program work for other users who do not have a server installed. How to implement it? There was an idea to serialize the data, but as I understand it, you will have to deserialize all the data and only then look for the necessary records.
- For example, you can turn a program into a WCF server, let client programs connect to the server and get results. - VladD
- And what prevents the program from connecting to the server from other machines? Hinting at the client-server architecture. Well, in general, about the architecture of the solution they think BEFORE how to implement it, otherwise redoing almost everything. - nzeemin
- The program was written for training purposes, and it completely satisfies me, the question concerns the implementation of WITHOUT server - Khoren Mansuryan
- Give a typical query. It is possible that SQL can be replaced by searching by index in a specialized format. - George Polevoy
- Still, it is desirable to provide a data scheme. - George Polevoy
|
2 answers
Use embedded DBMS. For example, SQLite
You can use this package: System.Data.SQLite
- Do you have time to show / explain how to do this? skype xoro-masiv - Khoren Mansuryan
- And what to explain? Connect the package via nuget and use. DBMS as DBMS. There is no storage, but it works so well. - Pavel Mayorov
- Okay I will try. Unsubscribe, Thank You - Khoren Mansuryan
- Thanks for the answer. Everything works out, but now the problem with unicode ... Known problem in SQLite - Khoren Mansuryan
- @KhorenMansuryan uh ... what's the problem with unicode? If something is wrong, ask a separate question better. - Pavel Mayorov
|
Options for solving the problem:
- for example, use SQL Server CE and install a database file * .sdf for each user. Of course, you will also have to change the sql connector.
- serialize data (for example, in xml format) and search directly in files without using a DBMS. In this case, it is possible to search for data without deserialization, simply by line reading and parsing data from files, including archived ones.
|