Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

create tables and database Expand / Collapse
Author
Message
Posted Wednesday, July 16, 2014 4:11 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 16, 2014 4:13 PM
Points: 1, Visits: 9
I am trying do the below. I can create simple table like in steps (a) and (b) but not sure how to apply points (c) and (d). I am new to this sql thingy so I will appreciate any help out there:

Create tables for a contact Database for my mechanic shop with the following:

a) Database to contain a list of people, their addresses, email addresses, and phone numbers. b) Database to contain a list of cars, their names, their type (2 doors,4 doors, etc.), and their colour. c) Database to allow only one owner per car d) Database to allow multiple people to be able to act upon behalf of one car. (Disclosure of MOT details, request change of parts, etc)
Post #1593318
Posted Wednesday, July 16, 2014 11:05 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 1:29 PM
Points: 35,612, Visits: 32,206
It doesn't sound like multiple databases would be the thing to do. It sounds like one database with some properly normalized tables would do.

This also sounds like homework because no one in their right mind would assign this type of thing to a newbie and no newbie in their right mind would take such an assignment.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1593379
Posted Thursday, July 24, 2014 2:42 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: 2 days ago @ 4:04 AM
Points: 71, Visits: 523
Are you trying your hand at creating a database for your own business or is this just homework?

Post #1595818
Posted Thursday, July 24, 2014 12:31 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, November 14, 2014 8:28 AM
Points: 301, Visits: 597
This sounds like homework...

MCSA SQL Server 2012
Post #1595986
Posted Thursday, July 24, 2014 12:39 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 3:05 PM
Points: 31,284, Visits: 15,750
You can read more here about designing this: http://www.sqlservercentral.com/articles/Stairway+Series/70199/

In terms of practical stuff, you'll want to learn how to CREATE TABLE as well as using constraints or unique indexes to prevent multiple values.

This can also help: http://www.sqlservercentral.com/articles/Database+Design/72054/







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1595988
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse