| Author |
Topic |
|
jimmyjimjim
Starting Member
6 Posts |
Posted - 2005-12-02 : 08:04:57
|
| I am new to using SQL Server but will be having to get to know it at work and have downloaded SQL Server 2005 Express to tinker with at home.What are the easiest methods to set up a relational database?Are there any tools you can download to give SQL Server or the express version functionality similar to Access?Can you get a tool to allow you to not only design tables in design view but then go on to create relationships and a database model?Please excuse my ignorance if this is possible already, can anyone provide any links to getting started links?There seems to be plenty out there about writing queries and stored procedures etc. but I haven't found as much about setting up a database from scratch.Thanks in advance,JJJ. |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2005-12-02 : 08:23:36
|
mmm.... why not try doing it using sql statements.CREATE TABLE, PRIMARY KEY, FOREIGN KEY, CONSTRAINTLearning that from the start gives you a nice knowledge of how thngs work in your db and it makes you look really hardcore if you can show this off to your freinds.Books OnLine and MSDN have very good examples of how to do this - they will probably also be able to tell you how to do it using some sort of GUI :)Duane. |
 |
|
|
jimmyjimjim
Starting Member
6 Posts |
Posted - 2005-12-02 : 09:22:16
|
| Yes I am aware of those and will definitely be using those at work. I was interested to know other easier to use methods as several SQL books I've looked at don't touch on it enough (if at all in some cases).Nevermind, I will resort to going back to searching online.Thanks anyway. |
 |
|
|
jhermiz
3564 Posts |
Posted - 2005-12-02 : 09:56:45
|
You can use Enterprise Manager (if that's what it is still called to visually create tables). I can't think of other tools that might help, I think understanding relational databases is the key. If you can draw it with pencil and paper then you should be able to do it in EM. Keeping the web experience alive -- [url]http://www.web-impulse.com[/url] |
 |
|
|
jimmyjimjim
Starting Member
6 Posts |
Posted - 2005-12-02 : 10:02:01
|
| Yeah, I've come across Enterprise Manager. It's nice and easy to create simple tables but when relationship come in to play I don't know how useful it is to do this or whether or not it is possible at all.I think the tool is missing from SQL Server Express too but something similar will be released at a later date.Thanks for your reply. |
 |
|
|
jhermiz
3564 Posts |
Posted - 2005-12-02 : 10:23:16
|
It's not missing you just have to go into the properties of that table. That will list the indexes and relationships. You then tell it primary key to foreign key. Keeping the web experience alive -- [url]http://www.web-impulse.com[/url] |
 |
|
|
jimmyjimjim
Starting Member
6 Posts |
Posted - 2005-12-02 : 10:35:46
|
| Don't seem to have those options, maybe something to do with permissions, no idea. But I was referring to the Express version where certain things were missing from the first releases. I've read something about it in several places. |
 |
|
|
George1111
Starting Member
2 Posts |
Posted - 2005-12-02 : 10:36:44
|
| Enterprise Manager is great - the problem is that you don't have Enterprise Manager unless you have SQL Server PROPER - If you have SQL Server Express you get a command line utility as a download option.My question to the gurus is, how do you Create a SQL Server Database Programatically ?ie, Not manually using Enterprise Manager. |
 |
|
|
jimmyjimjim
Starting Member
6 Posts |
Posted - 2005-12-02 : 10:43:12
|
| The first response in this topic mentions some of the simpler methods. There are tools such as ERwin (commerially available) which allow you to draw database diagrams and set up relationships and generate the script that will create the database.I can see what jhermiz was referring to about setting things up in Enterprise Manager now, thanks jhermiz. Will have to wait for the release of Enterprise Manager for SQL Server Express before I can play at home or use the command line tool. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-12-02 : 11:23:09
|
| "Yeah, I've come across Enterprise Manager. It's nice and easy to create simple tables but when relationship come in to play I don't know how useful it is to do this or whether or not it is possible at all."In that scenario you could use E.M.'s DIAGRAM tool, instead of the Table Design tool. it is a lot like the way Access table DDL designer works. You can just link tables, add/change columns etc., and all graphically - whereas Table Design using "Property" dialog boxes. Horses-for-courses.I dunno about the tools in SQL 2k5 though ...Kristen |
 |
|
|
jimmyjimjim
Starting Member
6 Posts |
Posted - 2005-12-02 : 12:21:24
|
| Thanks to all those that have been helpful. |
 |
|
|
George1111
Starting Member
2 Posts |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-12-03 : 13:12:49
|
| You could also use Visio if you have it. Visio Enterprise Edition comes with the ability to create data models, do reverse engineering, etc. For database design, I would start by searching google for "database design theory" and "database normalization".MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|