Jump to content
#StayAtHome ×

Archived

This topic is now archived and is closed to further replies.

DangerM0use

Making sure they type in a URL

Recommended Posts

Hi, not sure if this is in the right forum, so sorry if it is!

I am doing an assignment where I have to create an SQL database. I am just wondering what the constraint is to make sure they type in a web address.

Cheers

Share this post


Link to post
Share on other sites

Do you know how to use HTML?

Do you know how to use PHP or ASP?

Are you talking about SQL or MySql?

 

Do you have a webserver or are you going to use your computer to do this?

Share this post


Link to post
Share on other sites

Sorry I thought I should have put more info.

I don't need to create a website to go with this. Basically I am creating a database that will run a website for purchasing art. Part of the requirement is to log the url of an artists bio (if they have one!)

The database will be created and stored in my own student database on the uni server.

I have completed just about every other aspect of it and am going through it all once more to try and get a few extra marks.

I currently have it set so www is default but don't think this will really work too well. I also think that they would be told to type in the websites url on the form in the website, but if I can I want to try and limit what is typed in.

Share this post


Link to post
Share on other sites

Are you using SQL or MySql?

 

Can you post a url from your university Website were you will have the students feel out the form?

Share this post


Link to post
Share on other sites

SQL and no there is no actual form. The database has to be created for an imaginary website that isn't actually there

Share this post


Link to post
Share on other sites

Okay, so how are you going to input the data to the database?

How are you going to display the data, after retriving it from the database?

 

Do you have some sort of administration module, that lets your run commands on the database?

Share this post


Link to post
Share on other sites

I use SQL Query Analyzer, this is connected to my database so any queries are run and then executed and effect the database. I can check what tables have been created using SQL Server Enteprise Manager. But currently there is nothing to display the data with other than that as this is just a database module and we are not required to do anything other than create the database

Share this post


Link to post
Share on other sites

Okay, so now you have to create your structure.

The table the fileds and the type of fileds, and index, do one id field and set an index on it.

 

So before you hard code it, make a flow chart of what you want to do.

Share this post


Link to post
Share on other sites

I've already designed and created all of the database, I am now going through it again trying to get a few extra marks here and there. One of the bits I am looking at again is the bio_location field in the Artist table. I want this to only allow web addresses in and not sure what the best way to do this is

Share this post


Link to post
Share on other sites

In web development, usually the testing for input is done when the user submits the data, via a website page, using JavaScript, or in your script page, using PHP, ASP, etc.

 

Now I do not use SQL - which MS, but MySql, still I am not sure if their is a generic function in the field that can test for url input only, in both SQL and MySql.

If you are required to have the database to do such a thing, it is a bit illogical, because what happens if it is not an url, do you get an error?

 

You see my point! Anyway maybe you should ask your professor if such a thing is required to do by the database itself, not the input script - you will not have an input script.

 

And if your professor says yes, then look up SQL manual for such a function and, or ask the question again in this thread and see if one of our senior members, skilled in SQL can help you.

 

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.