create tables and database

  • 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)

  • 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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Are you trying your hand at creating a database for your own business or is this just homework?

  • This sounds like homework...

    MCSE SQL Server 2012\2014\2016

  • 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/

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply