I made a small program for a Doctor's office, but I had to manually install SQL Server on the PC and manually create the Database and Tables.

How do professionals make a program dynamically create a database? Do they even use databases?

Thank you for the info dudes.

Yes, they use databases.

When we install software on a client we have some huge SQL files that create all the tables, indexes, and restrictions that we need.

If you want more info on the subject you can google CREATE DATABASE or CREATE TABLE SQL commands.

Yes, they use databases.

When we install software on a client we have some huge SQL files that create all the tables, indexes, and restrictions that we need.

Do I have to program those SQL files on the aplication end, or on the SQL end?

What is the term used for this case, so I can google some info.

>What do you mean, the "SQL end"? Or "the application end"?
>I don't understand those terms.
I think they're rather self-explanatory. Are you being intentionally obtuse again?

>Do I have to program those SQL files on the aplication end, or on the SQL end?
You program them wherever you want, but it's easier to test as you go if you write them from within SQL Server's management utility. Alternatively you can create the database manually during development and then script it into a sql file that can be run on the production database server. Note that these files are separate from your application and should be run as an installation step during deployment.

What do you mean, the "SQL end"? Or "the application end"? I don't understand those terms.

Application end = Program it in the IDE

SQL end = Program it in the SQL Server Management Studio

What are the correct terms for future use?

>What do you mean, the "SQL end"? Or "the application end"?
>I don't understand those terms.
I think they're rather self-explanatory. Are you being intentionally obtuse again?

>Do I have to program those SQL files on the aplication end, or on the SQL end?
You program them wherever you want, but it's easier to test as you go if you write them from within SQL Server's management utility. Alternatively you can create the database manually during development and then script it into a sql file that can be run on the production database server. Note that these files are separate from your application and should be run as an installation step during deployment.

Thanks for a great answer. I think I'll do what you suggest and have my program execute the SQL script.

This question has already been answered. Start a new discussion instead.