Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Database basics (the mechanics) tutorial

    Hi, all. I used to be an avid database programmer during the dBase III days, when we used flat .dbf files. It was simple.

    I understand coding. I understand fields, types and keys. I understand relations.

    What I don't get is the drastic change in mechanics since the old days. Things like access strings, links, adapters, JET vs. OLE, etc. This stuff just did not exist and most tutorials seem to assume it is already known. Not to mention the differences in features between MySQL, SQLLite, Access, etc. and why you might pick one over the other.

    I call all this the mechanics (the under the hood stuff). Does anyone know of a good tutorial, so I can get past square one and start some coding?

    For example, in Vis. C#, if you want to link to a database, it asks what type data model I want to use. Dataset or Entity Data. What are these? That is one question. It assumes you already have a database created. What tools would I use to create what kinds of databases? That is another. The list goes on, but all this stuff is just mechanics.

    Thanks.
    Last edited by JeffInTexas; 07-28-2011 at 09:48 PM.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,436
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    Well, if you are going to work in C#, odds are pretty good you are going to use some flavor of SQL Server. And if that's the case, then you will also use some flavor of SQL Server Management Studio (either regular or Express version). And that's the best place to start with creating your DB.

    But if you opt to use MySQL, then there are several tools available that make working with it more GUI-oriented. MySQLWorkbench is a good example. But there are others.

    As to the difference between Dataset and Entity Data: Those are pretty much ADO.NET concepts and you'd be better off asking about all that in one of the MS forums dedicated to C#. Or, if you are going to create web pages, look into www.asp.net

    And, yes, you are clearly correct that there are important differences between the different databases. The fundamentals tend to be all the same, but the details can be daunting. Just such a simple thing as what format a literal DATE must be in when making a query:
    MySQL: 'yyyy-mm-dd' only
    Access: #mm/dd/yyyy# or #yyyy/mm/dd#
    SQL Server: 'mm/dd/yyyy' or 'dd/mm/yyyy' or 'yyyy/mm/dd' depending on a setting

    And we won't even talk about the differences in builtin functions! Urk.

  • #3
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What is the best database to use with C#, keeping in mind a goal of not worrying about security, but wanting instead to be able to distribute copies of the program to end users without having to go through any trouble getting them a database and being able to programatically change the end users' database structure when new version of the program are released later. i.e., don't want to have to touch the end user's computers. They just download the updated program, it makes changes to the database as needed, and runs.

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,436
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    The moderators will surely move this to another forum, but for now...

    How big a database do you need?

    And how many simultaneous users do you need to handle?

    MS has a SQL Server Compact edition that is pretty easy to deploy. Has limitations, but...

    It's kind of like asking us "What kind of vehicle should I buy?" without telling us that you need to travel 500 miles per hour and by the way you have this football team you need to lug around. Versus "I need to go to the store every other Sunday, and it's just me, and the store is 2 miles away."

  • #5
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    The moderators will surely move this to another forum, but for now...

    How big a database do you need?

    And how many simultaneous users do you need to handle?

    MS has a SQL Server Compact edition that is pretty easy to deploy. Has limitations, but...

    It's kind of like asking us "What kind of vehicle should I buy?" without telling us that you need to travel 500 miles per hour and by the way you have this football team you need to lug around. Versus "I need to go to the store every other Sunday, and it's just me, and the store is 2 miles away."
    I can't imagine storing more than a few 10's of megs.

    Number of users? Most will be solo users. Some might want to network, but I can't imagine more than 5 doing so simultaneously.

    This is a desktop app. Not web-based.

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,436
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    Yes, I could tell you meant desktop, else deployment wouldn't be an issue.

    5 users? Under 2GB of DB space? SQL Server compact edition will probably do the job quite well.

    Plus it deploys pretty easily.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •